-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile.astr
More file actions
43 lines (30 loc) · 1.27 KB
/
Makefile.astr
File metadata and controls
43 lines (30 loc) · 1.27 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
# This makefile is used to compile ASTR code.
FC=h5pfc
SRCDIR = ./astr/src ./astr/user_define_module
OBJDIR = obj_astr
BINDIR = bin
CTRDIR = cma
FCFLAGS= -O3
OPTIONS1 = -J $(OBJDIR)
OPTIONS2 = -DHDF5
# OPTIONS3 = -DCOMB -I$(CTRDIR)/include/cantera
EXE=astr
# LIBS= -lz -lm -L$(CTRDIR)/lib -lcantera_fortran -lcantera -lstdc++ -pthread
LIBS= -lz -lm
TARGET = $(BINDIR)/$(EXE)
VPATH = $(SRCDIR):$(OBJDIR)
srs= strings.F90 fdnn.F90 singleton.F90 commtype.F90 stlaio.F90 constdef.F90 tecio.F90 \
vtkio.F90 interp.F90 commvar.F90 utility.F90 thermchem.F90 commarray.F90 fludyna.F90 \
parallel.F90 hdf5io.F90 cmdefne.F90 commfunc.F90 commcal.F90 models.F90 statistic.F90 \
userdefine.F90 filter.F90 derivative.F90 flux.F90 bc.F90 readwrite.F90 \
geom.F90 ibmethod.F90 gridgeneration.F90 riemann.F90 comsolver.F90 solver.F90 \
udf_pp.F90 pp.F90 initialisation.F90 mainloop.F90 test.F90 astr.F90
OBJS=$(srs:.F90=.o)
%.o:%.F90
@mkdir -p $(OBJDIR)
$(FC) $(FCFLAGS) $(OPTIONS1) $(OPTIONS2) $(OPTIONS3) -c -o $(OBJDIR)/$@ $<
default: $(OBJS)
@mkdir -p $(BINDIR)
$(FC) $(FCFLAGS) -o $(TARGET) $(OBJDIR)/*.o $(LIBS)
clean:
rm -fv $(OBJDIR)/*.o $(OBJDIR)/*.mod $(TARGET) $(OBJDIR)/*.mod