-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile.in
72 lines (66 loc) · 2.37 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
# @WARNING1@
# @WARNING2@
#===============================================================================
# FILE: Makefile.in
#
# PURPOSE: Template for Makefile; the top level makefile for Athena. The first
# target (help) documents the rest. When 'configure' is run, a new Makefile
# will be created (overwriting the last) from this template.
#
# TO BY-PASS CONFIGURE: copy this file into Makefile, and edit by hand to set
# the appropriate object files, compiler options, and library paths.
#-------------------------------------------------------------------------------
#
DIRS = bin
help:
@echo "all: create ($(DIRS)) subdirectory and compile"
@echo "dirs: create ($(DIRS)) subdirectory"
@echo "compile: compile the code"
@echo "clean: clean /src subdirectory"
@echo "test: run a MHD benchmark"
#-------------------------------------------------------------------------------
# target all:
all: dirs compile
#-------------------------------------------------------------------------------
# target dirs:
dirs:
-@for i in $(DIRS) ; do \
(if [ -d $$i ]; \
then \
echo DIR $$i exists; \
else \
echo DIR $$i created; \
mkdir $$i; \
fi); done
#-------------------------------------------------------------------------------
# target compile: runs Make in /src and all subdirectories in /src
compile:
ifeq (@FFT_MODE@,FFT_ENABLED)
(cd src/fftsrc; $(MAKE) compile)
endif
(cd src/gravity; $(MAKE) compile)
(cd src/integrators; $(MAKE) compile)
(cd src/microphysics; $(MAKE) compile)
(cd src/particles; $(MAKE) compile)
(cd src/reconstruction; $(MAKE) compile)
(cd src/rsolvers; $(MAKE) compile)
(cd src; $(MAKE) compile)
#-------------------------------------------------------------------------------
# target clean:
clean:
(cd src/fftsrc; $(MAKE) clean)
(cd src/gravity; $(MAKE) clean)
(cd src/integrators; $(MAKE) clean)
(cd src/microphysics; $(MAKE) clean)
(cd src/particles; $(MAKE) clean)
(cd src/reconstruction; $(MAKE) clean)
(cd src/rsolvers; $(MAKE) clean)
(cd src; $(MAKE) clean)
#-------------------------------------------------------------------------------
# test: checks that default configuration runs successfully. Reports error
# compared to fiducial solution, and a speed benchmark. Requires the
# following steps: > configure
# > make all
# > make test
test:
(cd tst/1D-mhd; ./run.test)