-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.in
308 lines (291 loc) · 7 KB
/
Makefile.in
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
#
# Makefile for Kemo's Dynamo toolkit
# Written by H. Matsui
#
SHELL = @SHELL@
#
# directories of Kemo's Dynamo toolkit
#
SRCDIR = @abs_top_srcdir@
INSTDIR= @prefix@
#
MHDDIR = $(SRCDIR)/MHD
MAKEDIR= $(SRCDIR)/work
BUILDDIR= $(SRCDIR)/bin
MAKE64DIR= $(SRCDIR)/work_64
BUILD64DIR= $(SRCDIR)/bin_64
#
# MPI settings
#
MPICHDIR = @MPIDIR@
MPICHLIBDIR = $(MPICHDIR)/lib
MPICHBINDIR = $(MPICHDIR)/bin
MPICHINCDIR = @MPIINCDIR@
MPILIBS = @MPILIBS@
MPIRUN = @MPIRUN@
#
# compilers
#
F90 = @FC@
CC = @CC@
CXX = @CXX@
AS = @CCAS@
F90_LOCAL = $(F90)
MPIF90 = @MPIFC@
MPICC = @MPICC@
GMAKE = @GMAKE@
AR = @ar_bin@
RANLIB = @RANLIB@
#
# OPENMP_FCFLAGS OprnMP option for fortran compiler
# COCOA_FLAG is defined to use cocoa Framework
# XL_FORTRAN Set "-WF," option for cpp preprocessor
# SSE_FLAG X86 instruction flag
#
OPENMP_FCFLAGS = @OPENMP_FCFLAGS@
COCOA_FLAG = @COCOA_FLAG@
XL_FORTRAN = @XL_FORTRAN@
SSE_FLAG = @SSE_FLAG@
SSE_CPU = @SSE_CPU@
SSE4 = @SSE4@
SSE8 = @SSE8@
#
# optimization
#
F90OPTFLAGS= @FCFLAGS@ @OPENMP_FCFLAGS@
OPTFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
DEPFLAGS= -MM -w -DDEPENDENCY_CHECK
#
# BLAS settings
#
BLAS_LIBS = @BLAS_LIBS@
#
# libpng and zlib settings
#
ZLIB_CFLAGS = @ZLIB_CFLAGS@
ZLIB_LIBS = @ZLIB_LIBS@
PNG_CFLAGS = @PNG_CFLAGS@
PNG_LIBS = @PNG_LIBS@
#
# FFTW3 settings
#
FFTW3_CFLAGS= @FFTW3_CFLAGS@
FFTW3_LIBS= @FFTW3_LIBS@
FFTW3_OMP_LIBS= @FFTW3_OMP_LIBS@
#
# HDF5 fortran wrapper settings
#
HDF5_FFLAGS= @HDF5_FFLAGS@
HDF5_LDFLAGS= @HDF5_LDFLAGS@
HDF5_FLIBS= @HDF5_PFLIBS@
#
# X window settings
#
X_CFLAGS = @X_CFLAGS@
X_LIBS= @X_LIBS@ -lm
#
# OpenGL settings (Requirement: OpenGL, libpng)
#
OPENGL_INC = @GL_INC@
OPENGL_LIBS= @GL_LIBS@
#
# PGPLOT settings (Requirement: pgplot, libpng)
#
PGPLOT_LIBS= @PGPLOT_LIBS@
#
# GTK+ settings (Requirement: OpenGL, libpng)
GTK3_CFLAGS= @GTK3_CFLAGS@
GTK3_LIBS= @GTK3_LIBS@
#
# GLFW settings (Requirement: OpenGL, libpng)
GLFW_CFLAGS= @GLFW_CFLAGS@
GLFW_LIBS= @GLFW_LIBS@
#
# --- Please do not chenge the following ---
#
64BIT_INT= 64BIT_INT
MAKE_MOD_DEP= $(BUILDDIR)/make_f90depends
#
all: makemake makemake64
cd $(MAKEDIR); $(GMAKE)
cd $(MAKE64DIR); $(GMAKE)
$(MAKE_MOD_DEP): $(MHDDIR)/module_dependency/make_module_dependency.f90
if [ ! -d $(MAKEDIR) ]; then \
mkdir $(MAKEDIR); \
fi
if [ ! -d $(BUILDDIR) ]; then \
mkdir $(BUILDDIR); \
fi
$(F90_LOCAL) -c -o $(MAKEDIR)/make_module_dependency.o $<
$(F90_LOCAL) -o $@ $(MAKEDIR)/make_module_dependency.o
depends: $(MAKE_MOD_DEP)
@echo "# Construct dependencies"; \
cd $(MHDDIR) ; \
$(GMAKE) \
GMAKE="$(GMAKE)" \
SRCDIR="$(SRCDIR)" \
INSTDIR="$(INSTDIR)" \
MAKEDIR="$(MAKE64DIR)" \
BUILDDIR="$(BUILD64DIR)" \
MHDDIR="$(MHDDIR)" \
BLAS_LIBS="$(BLAS_LIBS)" \
ZLIB_CFLAGS="$(ZLIB_CFLAGS)" \
ZLIB_LIBS="$(ZLIB_LIBS)" \
PNG_CFLAGS="$(PNG_CFLAGS)" \
PNG_LIBS="$(PNG_LIBS)" \
FFTW3_CFLAGS="$(FFTW3_CFLAGS)" \
FFTW3_LIBS="$(FFTW3_LIBS)" \
FFTW3_OMP_LIBS="$(FFTW3_OMP_LIBS)" \
X_LIBS="$(X_LIBS)" \
X_CFLAGS="$(X_CFLAGS)" \
OPENGL_INC="$(OPENGL_INC)" \
OPENGL_LIBS="$(OPENGL_LIBS)" \
PGPLOT_LIBS="$(PGPLOT_LIBS)" \
GTK3_CFLAGS="$(GTK3_CFLAGS)" \
GTK3_LIBS="$(GTK3_LIBS)" \
HDF5_FFLAGS="$(HDF5_FFLAGS)" \
HDF5_LDFLAGS="$(HDF5_LDFLAGS)" \
HDF5_FLIBS="$(HDF5_FLIBS)" \
COCOA_FLAG="$(COCOA_FLAG)" \
OPTFLAGS="$(OPTFLAGS)" \
F90OPTFLAGS="$(F90OPTFLAGS)" \
CXXFLAGS="$(CXXFLAGS)" \
DEPFLAGS="$(DEPFLAGS)" \
F90LIB="$(F90LIB)" \
F90_LOCAL="$(F90_LOCAL)" \
CC="$(CC)" \
CXX="$(CXX)" \
AS="$(AS)" \
MPIF90="$(MPIF90)" \
MAKE_MOD_DEP="$(MAKE_MOD_DEP)" \
SSE_FLAG="$(SSE_FLAG)" \
SSE_CPU="$(SSE_CPU)" \
SSE4="$(SSE4)" \
SSE8="$(SSE8)" \
depends
makemake: $(MAKE_MOD_DEP)
@echo "# Construct Makefile"; \
cd $(MHDDIR) ; \
$(GMAKE) \
GMAKE="$(GMAKE)" \
SRCDIR="$(SRCDIR)" \
INSTDIR="$(INSTDIR)" \
MAKEDIR="$(MAKEDIR)" \
BUILDDIR="$(BUILDDIR)" \
MHDDIR="$(MHDDIR)" \
MPICHDIR="$(MPICHDIR)" \
MPICHLIBDIR="$(MPICHLIBDIR)" \
MPILIBS="$(MPILIBS)" \
MPICHBINDIR="$(MPICHBINDIR)" \
MPICHINCDIR="$(MPICHINCDIR)" \
BLAS_LIBS="$(BLAS_LIBS)" \
ZLIB_CFLAGS="$(ZLIB_CFLAGS)" \
ZLIB_LIBS="$(ZLIB_LIBS)" \
PNG_CFLAGS="$(PNG_CFLAGS)" \
PNG_LIBS="$(PNG_LIBS)" \
FFTW3_CFLAGS="$(FFTW3_CFLAGS)" \
FFTW3_LIBS="$(FFTW3_LIBS)" \
FFTW3_OMP_LIBS="$(FFTW3_OMP_LIBS)" \
X_LIBS="$(X_LIBS)" \
X_CFLAGS="$(X_CFLAGS)" \
OPENGL_INC="$(OPENGL_INC)" \
OPENGL_LIBS="$(OPENGL_LIBS)" \
PGPLOT_LIBS="$(PGPLOT_LIBS)" \
GTK3_CFLAGS="$(GTK3_CFLAGS)" \
GTK3_LIBS="$(GTK3_LIBS)" \
GLFW_CFLAGS="$(GLFW_CFLAGS)" \
GLFW_LIBS="$(GLFW_LIBS)" \
HDF5_FFLAGS="$(HDF5_FFLAGS)" \
HDF5_LDFLAGS="$(HDF5_LDFLAGS)" \
HDF5_FLIBS="$(HDF5_FLIBS)" \
COCOA_FLAG="$(COCOA_FLAG)" \
OPTFLAGS="$(OPTFLAGS)" \
F90OPTFLAGS="$(F90OPTFLAGS)" \
CXXFLAGS="$(CXXFLAGS)" \
DEPFLAGS="$(DEPFLAGS)" \
F90LIB="$(F90LIB)" \
F90_LOCAL="$(F90_LOCAL)" \
CC="$(CC)" \
CXX="$(CXX)" \
AS="$(AS)" \
MPIF90="$(MPIF90)" \
MPICC="$(MPICC)" \
AR="$(AR)" \
RANLIB="$(RANLIB)" \
XL_FORTRAN="$(XL_FORTRAN)" \
SSE_FLAG="$(SSE_FLAG)" \
SSE_CPU="$(SSE_CPU)" \
SSE4="$(SSE4)" \
SSE8="$(SSE8)" \
makemake
makemake64: $(MAKE_MOD_DEP)
@echo "# Construct Makefile for 64-bit integer"; \
cd $(MHDDIR) ; \
$(GMAKE) \
GMAKE="$(GMAKE)" \
SRCDIR="$(SRCDIR)" \
INSTDIR="$(INSTDIR)" \
MAKEDIR="$(MAKE64DIR)" \
BUILDDIR="$(BUILD64DIR)" \
MHDDIR="$(MHDDIR)" \
MPICHDIR="$(MPICHDIR)" \
MPICHLIBDIR="$(MPICHLIBDIR)" \
MPILIBS="$(MPILIBS)" \
MPICHBINDIR="$(MPICHBINDIR)" \
MPICHINCDIR="$(MPICHINCDIR)" \
BLAS_LIBS="$(BLAS_LIBS)" \
ZLIB_CFLAGS="$(ZLIB_CFLAGS)" \
ZLIB_LIBS="$(ZLIB_LIBS)" \
PNG_CFLAGS="$(PNG_CFLAGS)" \
PNG_LIBS="$(PNG_LIBS)" \
FFTW3_CFLAGS="$(FFTW3_CFLAGS)" \
FFTW3_LIBS="$(FFTW3_LIBS)" \
FFTW3_OMP_LIBS="$(FFTW3_OMP_LIBS)" \
X_LIBS="$(X_LIBS)" \
X_CFLAGS="$(X_CFLAGS)" \
OPENGL_INC="$(OPENGL_INC)" \
OPENGL_LIBS="$(OPENGL_LIBS)" \
PGPLOT_LIBS="$(PGPLOT_LIBS)" \
GTK3_CFLAGS="$(GTK3_CFLAGS)" \
GTK3_LIBS="$(GTK3_LIBS)" \
HDF5_FFLAGS="$(HDF5_FFLAGS)" \
HDF5_LDFLAGS="$(HDF5_LDFLAGS)" \
HDF5_FLIBS="$(HDF5_FLIBS)" \
COCOA_FLAG="$(COCOA_FLAG)" \
OPTFLAGS="$(OPTFLAGS)" \
F90OPTFLAGS="$(F90OPTFLAGS)" \
CXXFLAGS="$(CXXFLAGS)" \
DEPFLAGS="$(DEPFLAGS)" \
F90LIB="$(F90LIB)" \
F90_LOCAL="$(F90_LOCAL)" \
CC="$(CC)" \
CXX="$(CXX)" \
AS="$(AS)" \
MPIF90="$(MPIF90)" \
MPICC="$(MPICC)" \
AR="$(AR)" \
RANLIB="$(RANLIB)" \
XL_FORTRAN="$(XL_FORTRAN)" \
SSE_FLAG="$(SSE_FLAG)" \
SSE_CPU="$(SSE_CPU)" \
SSE4="$(SSE4)" \
SSE8="$(SSE8)" \
64BIT_INT="$(64BIT_INT)" \
makemake
install:
cd $(MAKEDIR) ; \
$(GMAKE) install
install64:
cd $(MAKE64DIR) ; \
make install
clean:
for dir in $(MAKEDIR) $(MAKE64DIR) $(MHDDIR) ; do \
echo "# cleaning $${dir} directory..."; \
( cd $${dir}; \
$(GMAKE) clean )\
done; \
rm -f mpif.h *.o *.mod *~ *.par *.diag *.a *.f90
distclean:
echo "# Back to initial package"; \
rm -fr $(MAKEDIR) $(MAKE64DIR) $(BUILDDIR) $(BUILD64DIR) Makefile config.log