-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
191 lines (159 loc) · 4.93 KB
/
Makefile
File metadata and controls
191 lines (159 loc) · 4.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# ============================================================================
#
# Makefile: MPI-based Symmetric Black Box Multigrid (2D and 3D)
#
# =======================================================================
# $license_flag$
# ============================================================================
#
# This is a makefile for a MPI-based parallel implementation of Joel Dendy's
# (Symmetric, Standard Coarsening) Black Box multigrid. To build and install
# the library you may need to
#
# - set the appropriate environment variables
# (see below and/or INSTALL)
# - customize the compiler flags as necessary
# (see INSTALL)
#
# However, the build system provides defaults that should work on most
# systems (particularly, Linux/GNU systems). The most common customization
# is to specify a compiler suite that you'd like to use (see INSTALL).
# Now, at the prompt simply type
#
# make
#
# The libraries ( libboxmg_$(CLEVEL).a, libboxmg-extras_$(CLEVEL).a )
# will be in ./lib.
#
# If you want to run the tests, you first need to build them with
#
# make check
#
# or change directories to the desired test/example
#
# cd tests/boxmg-sym-std-3D/ex_direct_1
# make
#
# This will check that the library is installed, up to date, and build
# the executable. Since, running on parallel systems depends on the
# local environment and batch system, you will need to execute the
# test manually. Notes are included in each tests subdirectory regarding
# the input and output of the test.
#
# Environment Variables:
# ----------------------
#
# BOXMGdist - location of BOXMG distribution
# BOXMGlibp - location to build the BOXMG library
#
# OS - Operating system (e.g., Linux, SunOS )
# CPU - CPU (e.g., intel, sun4u)
#
# ============================================================================
SHELL=/bin/sh
ifndef MAKE
MAKE=make
endif
ifndef BOXMGdist
BOXMGdist = .
endif
ifndef EXTRASdist
EXTRASdist = $(BOXMGdist)/extras
endif
# ============================================================================
# -------------------------
# Standard Global Macros:
# -------------------------
include $(BOXMGdist)/make/global
# -------------------------
# Compiler, Linker:
# -------------------------
include $(BOXMG_ARCHmake)/ARCH.$(BOXMG_ARCH)
# --------------------
# Path Definitions:
# --------------------
#
# Library build path
#
BOXMGlibp = $(BOXMGdist)/lib
#
# BoxMG tests
#
CHECK = $(BOXMGdist)/tests
# =========================================================================
# -----------------
# TARGETS:
# -----------------
makewithflags:
@echo ""
@echo "Building the boxmg library .... "
@( $(MAKE) $(MFLAGS) library )
@echo ""
@echo "Building the boxmg-extras library .... "
@( $(MAKE) $(MFLAGS) lib-extras )
@echo ""
# ------------------------------------
# BoxMG Environment Debugging:
# ------------------------------------
include $(BOXMGdist)/make/environment
# -------------------------
# BoxMG library
# -------------------------
library:
@( $(CD) $(SRC2D); $(MAKE) $(MFLAGS) MPI=yes )
@( $(CD) $(SRC3D); $(MAKE) $(MFLAGS) MPI=yes )
clean: check-clean library-banner
@( $(CD) $(SRC2D); $(MAKE) $(MFLAGS) clean )
@( $(CD) $(SRC3D); $(MAKE) $(MFLAGS) clean )
@echo ""
@echo "========================================================"
@echo ""
distclean: check-distclean lib-extras-distclean library-banner
@( $(CD) $(SRC2D); $(MAKE) $(MFLAGS) clean )
@( $(CD) $(SRC3D); $(MAKE) $(MFLAGS) clean )
@echo ""
@echo "Removing the libraries in $(BOXMGlibp) "
@( $(CD) $(BOXMGlibp); $(RM) -f *.a )
@echo ""
@echo "========================================================"
@echo ""
library-banner:
@echo "========================================================"
@echo "---------------------"
@echo "LIBRARY SOURCE:"
@echo "---------------------"
@echo ""
@echo "Removing objects from: "
# -------------------------
# Extras Library
# -------------------------
lib-extras:
@( $(CD) $(EXTRASdist); $(MAKE) $(MFLAGS) )
lib-extras-clean: lib-extras-banner
@( $(CD) $(EXTRASdist); $(MAKE) $(MFLAGS) clean )
lib-extras-distclean: lib-extras-banner
@( $(CD) $(EXTRASdist); $(MAKE) $(MFLAGS) distclean )
lib-extras-banner:
@echo "========================================================"
@echo "---------------------"
@echo "EXTRAS SUBDIRECTORY: "
@echo "---------------------"
# -------------------------
# Tests
# -------------------------
check: library lib-extras
@( $(CD) $(CHECK); $(MAKE) $(MFLAGS) )
check-clean: check-banner
@( $(CD) $(CHECK); $(MAKE) $(MFLAGS) clean )
@echo ""
check-distclean: check-banner
@( $(CD) $(CHECK); $(MAKE) $(MFLAGS) distclean )
@echo ""
check-banner:
@echo ""
@echo "========================================================"
@echo "---------------------"
@echo "TESTS: "
@echo "---------------------"
@echo ""
# ===========================================================================