-
Notifications
You must be signed in to change notification settings - Fork 3
/
Make.Emu
71 lines (51 loc) · 2.3 KB
/
Make.Emu
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
NUM_FLAVORS ?= 2
SHAPE_FACTOR_ORDER ?= 2
DIM = 3
TOP := $(EMU_HOME)
EBASE := main
include $(AMREX_HOME)/Tools/GNUMake/Make.defs
Bdirs := Source
Bpack += $(foreach dir, $(Bdirs), $(TOP)/$(dir)/Make.package)
Blocs += $(foreach dir, $(Bdirs), $(TOP)/$(dir))
include $(Bpack)
INCLUDE_LOCATIONS += $(Blocs)
VPATH_LOCATIONS += $(Blocs)
Pdirs := Base Particle
Ppack += $(foreach dir, $(Pdirs), $(AMREX_HOME)/Src/$(dir)/Make.package)
include $(Ppack)
DEFINES += -DNUM_FLAVORS=$(NUM_FLAVORS) -DSHAPE_FACTOR_ORDER=$(SHAPE_FACTOR_ORDER)
all: generate $(objEXETempDir)/AMReX_buildInfo.o $(executable)
@echo SUCCESS
generate:
python3 $(EMU_HOME)/Scripts/symbolic_hermitians/generate_code.py $(NUM_FLAVORS) --emu_home $(EMU_HOME)
#------------------------------------------------------------------------------
# build info (from Castro/Exec/Make.auto_source)
#------------------------------------------------------------------------------
CEXE_headers += $(AMREX_HOME)/Tools/C_scripts/AMReX_buildInfo.H
INCLUDE_LOCATIONS += $(AMREX_HOME)/Tools/C_scripts
# we make AMReX_buildInfo.cpp as we make the .o file, so we can delete
# it immediately. this way if the build is interrupted, we are
# guaranteed to remake it
objForExecs += $(objEXETempDir)/AMReX_buildInfo.o
.FORCE:
.PHONE: .FORCE
# set BUILD_GIT_NAME and BUILD_GIT_DIR if you are building in a
# git-controlled dir not under Castro/
EXTRA_BUILD_INFO :=
ifdef BUILD_GIT_NAME
EXTRA_BUILD_INFO := --build_git_name "$(BUILD_GIT_NAME)" \
--build_git_dir "$(BUILD_GIT_DIR)"
endif
$(objEXETempDir)/AMReX_buildInfo.o: .FORCE
echo $(objEXETempDir)
$(AMREX_HOME)/Tools/C_scripts/makebuildinfo_C.py \
--amrex_home "$(AMREX_HOME)" \
--COMP "$(COMP)" --COMP_VERSION "$(COMP_VERSION)" \
--CXX_comp_name "$(CXX)" --CXX_flags "$(CXXFLAGS) $(CPPFLAGS) $(includes)" \
--F_comp_name "$(F90)" --F_flags "$(F90FLAGS)" \
--link_flags "$(LDFLAGS)" --libraries "$(libraries)" \
--MODULES "$(MNAMES)" $(EXTRA_BUILD_INFO) \
--GIT "$(TOP) $(AMREX_HOME) $(MICROPHYSICS_HOME)"
$(SILENT) $(CCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(CXXEXEFLAGS) AMReX_buildInfo.cpp -o $(objEXETempDir)/AMReX_buildInfo.o
$(SILENT) $(RM) AMReX_buildInfo.cpp
include $(AMREX_HOME)/Tools/GNUMake/Make.rules