-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGNUmakefile
42 lines (26 loc) · 902 Bytes
/
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
NDEBUG := t
MPI :=
OMP :=
MKVERBOSE :=t
COMP := gfortran
# include the main Makefile stuff
include $(FBOXLIB_HOME)/Tools/F_mk/GMakedefs.mak
# to make python libraries, we need to do -fPIC (in gfortran)
F90FLAGS += -fPIC
FFLAGS += -fPIC
CFLAGS += -fPIC
CXXFLAGS += -fPIC
# core BoxLib directories
BOXLIB_CORE := Src/BaseLib
Fmpack := $(foreach dir, $(BOXLIB_CORE), $(FBOXLIB_HOME)/$(dir)/GPackage.mak)
Fmlocs := $(foreach dir, $(BOXLIB_CORE), $(FBOXLIB_HOME)/$(dir))
# include the necessary GPackage.mak files that define this setup
include $(Fmpack)
# vpath defines the directories to search for the source files
VPATH_LOCATIONS += $(Fmlocs)
all: python_module
python_module: $(objects)
f2py3 --fcompiler=gfortran --f90flags="-J t/Linux.gfortran/m/" -c fsnapshot.f90 -m fsnapshot $(objects) -lstdc++
include $(FBOXLIB_HOME)/Tools/F_mk/GMakerules.mak
clean::
$(RM) fsnapshot.so