-
Notifications
You must be signed in to change notification settings - Fork 2
/
GNUmakefile
143 lines (113 loc) · 3.37 KB
/
GNUmakefile
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
# Makefile for AmrDeriveSpectrum using AMReX tools and FFTW.
#
# AmrDeriveSpectrum has the following requirements:
#
# - MPI and its headers should be installed. Tested to work with mpich.
# The path to the MPI library is supplied via MPI_HOME.
#
# - FFTW2 and its headers should be installed.
# FFTW2 should have been compiled with MPI support with double precision.
# The path to the FFTW2 installation directory is supplied via FFTW2_HOME.
#
# - The amrex source code should be available, supplied via AMREX_HOME.
#
#############################################
AMREX_HOME ?= ../../..
#############################################
BOXLIB_HOME = $(AMREX_HOME)
BL_NOFAST=TRUE
#
# Variables for the user to set ...
#
########## define EBASE and BL_HAS_FORT here
EBASE = AmrDeriveSpectrum
#BL_HAS_FORT = TRUE
DEBUG = FALSE
PROFILE = FALSE
USE_THREADS = TRUE
DIM = 3
USE_MPI = TRUE
AIXLARGEMEM = FALSE
COMP = g++
FCOMP = gfortran
USE_ARRAYVIEW = FALSE
BUILDCHEM = FALSE
HERE = .
ifndef AMREX_HOME
$(error AMREX_HOME is not defined.)
endif
ifeq ($(EBASE), AmrDeriveSpectrum)
INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Amr
include $(BOXLIB_HOME)/Src/Boundary/Make.package
include $(BOXLIB_HOME)/Src/Extern/amrdata/Make.package
INCLUDE_LOCATIONS += $(FFTW2_HOME)/include
LIBRARIES += -L$(FFTW2_HOME)/lib -lrfftw_mpi -lfftw_mpi -lrfftw -lfftw
endif
include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs
#DEFINES += -DBL_DERIVE_IAMR
#DEFINES += -DBL_DERIVE_HCHEM
DEFINES += -DBL_NOLINEVALUES
#DEFINES += -static
###### arrayview
USE_ARRAYVIEW = FALSE
ifeq (USE_ARRAYVIEW, TRUE)
DEFINES += -DBL_USE_ARRAYVIEW
ARRAYVIEWDIR = .
INCLUDE_LOCATIONS += $(ARRAYVIEWDIR)
endif
CEXE_sources += $(EBASE).cpp
include ./Make.package
DEFINES += -DBL_PARALLEL_IO
ifeq ($(COMP),KCC)
ifeq ($(KCC_VERSION),3.3)
CXXFLAGS += --diag_suppress 837
CXXOPTF += -Olimit 2400
#CXXFLAGS += -fprm n -fptm u
endif
endif
include $(BOXLIB_HOME)/Src/Base/Make.package
VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/Extern/amrdata
VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/Extern/ProfParser
INCLUDE_LOCATIONS += $(HERE)
INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base
INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Amr
INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Extern/amrdata
INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Extern/ProfParser
INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Boundary
ifeq ($(USE_ARRAYVIEW),TRUE)
DEFINES += -DBL_USE_ARRAYVIEW
DEFINES += -DBL_ARRAYVIEW_TAGBOX
endif
ifeq ($(MACHINE),OSF1)
#
# Some additional stuff for our preferred development/debugging environment.
#
ifeq ($(PRECISION),DOUBLE)
FFLAGS += -real_size 64
endif
FDEBF += -C
FDEBF += -warn argument_checking
FDEBF += -warn declarations
ifneq ($(FC), f90)
FDEBF += -warn truncated_source
FDEBF += -warn unused
endif
endif
include $(BOXLIB_HOME)/Src/Boundary/Make.package
INCLUDES += $(BOXLIB_HOME)/Src/Boundary
PATHDIRS = $(HERE)
PATHDIRS += $(BOXLIB_HOME)/Src/Base
PATHDIRS += $(BOXLIB_HOME)/Src/Amr
PATHDIRS += $(BOXLIB_HOME)/Src/Extern/amrdata
PATHDIRS += $(BOXLIB_HOME)/Src/Boundary
ifeq (${BL_HAS_FORT}, TRUE)
FEXE_sources += ${EBASE}_F.F
endif
vpath %.f $(PATHDIRS)
vpath %.F $(PATHDIRS)
vpath %.f90 $(PATHDIRS)
vpath %.h $(PATHDIRS)
vpath %.H $(PATHDIRS)
vpath %.cpp $(PATHDIRS)
all: $(executable)
include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules