-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (59 loc) · 1.89 KB
/
Makefile
File metadata and controls
78 lines (59 loc) · 1.89 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
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
HAVE_COMMON_MK := $(wildcard common.mk)
# In most cases, the user must have run ./configure before make
# But we want the user to be able to clean regardless!
ifeq (,$(findstring clean,$(MAKECMDGOALS)))
include common.mk
endif
all: clibs singlestep CreateDerivatives convolution external util tests analysis AbacusPython
common.mk:
ifeq (,$(HAVE_COMMON_MK))
$(error common.mk not found! Did you run ./configure?)
endif
singlestep: ParseHeader
$(MAKE) -C singlestep all
CreateDerivatives:
$(MAKE) -C Derivatives $@
clean: clean_recurse
distclean: clean distclean_recurse
$(RM) abacus.tar.gz
$(RM) common.mk
$(RM) -rf autom4te.cache/ config.log config.status
# One annoyance with common.mk is that we don't want Makefiles to build without it,
# but we would prefer they be able to run clean.
# We could require a second, shadow common.mk be included that prevents CXX from running,
# but that's another line of text in each Makefile and isn't very clean
# So instead we'll just accept that they'll fail
%_recurse:
-$(MAKE) -C ParseHeader $*
-$(MAKE) -C Derivatives $*
-$(MAKE) -C singlestep $*
-$(MAKE) -C Convolution $*
-$(MAKE) -C Abacus/Cosmology $*
-$(MAKE) -C external $*
-$(MAKE) -C Tests $*
-$(MAKE) -C util $*
-$(MAKE) -C Analysis $*
-$(MAKE) -C clibs $*
convolution: ParseHeader
$(MAKE) -C Convolution $@
clibs:
$(MAKE) -C clibs all
util:
$(MAKE) -C util all
tests:
$(MAKE) -C Tests all
analysis: clibs ParseHeader util AbacusPython external
$(MAKE) -C Analysis
external:
$(MAKE) -C external all
AbacusPython:
$(MAKE) -C Abacus all
# Make an abacus.tar.gz file for distribution/archival purposes
dist:
$(RM) -rf .dist
mkdir -p .dist/abacus
cp -r * .dist/abacus
$(MAKE) -C .dist/abacus distclean
tar -C .dist -czf abacus.tar.gz --exclude='.*' abacus
$(RM) -rf .dist
.PHONY:all clean distclean external util tests analysis singlestep dist AbacusPython clibs convolution ParseHeader