forked from xrf/talent-astro-proj2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
107 lines (92 loc) · 2.53 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# This is the initial Makefile input; `configure` will use this file as input
# to generate the actual Makefile.
all: reducereaclib xnet
clean:
rm -fr dist
run: run-xnet
run-reducereaclib: $(RRL_ROOT)/netsu $(RRL_ROOT)/netwinv
run-xnet: \
$(XNET_ROOT)/source/xnet \
$(RRL_ROOT)/INPUT/sunet \
$(RRL_ROOT)/netwinv \
$(RRL_ROOT)/netwinv \
control \
ab \
th
@mkdir -p runs/$(RUN_DIR) && \
cp $(XNET_ROOT)/source/xnet \
$(RRL_ROOT)/INPUT/sunet \
$(RRL_ROOT)/netsu \
$(RRL_ROOT)/netwinv \
control \
ab \
th \
runs/$(RUN_DIR) && \
echo "Running in runs/$(RUN_DIR)..." && \
cd runs/$(RUN_DIR) && time ./xnet
reducereaclib: $(RRL_ROOT)/reducereaclib
xnet: $(XNET_ROOT)/source/xnet
$(RRL_ROOT)/netsu $(RRL_ROOT)/netwinv: \
$(RRL_ROOT)/reducereaclib \
$(RRL_ROOT)/INPUT/rawreaclib \
$(RRL_ROOT)/INPUT/sunet \
$(RRL_ROOT)/INPUT/winvn
cd $(RRL_ROOT) && ./reducereaclib
$(RRL_ROOT)/INPUT/sunet: sunet
cp sunet $@
$(RRL_ROOT)/reducereaclib: $(RRL_ROOT)/reducereaclib.f
$(FC) $(FFLAGS) -o $@ $(RRL_ROOT)/reducereaclib.f
$(RRL_ROOT)/reducereaclib.f: $(RRL)
$(RRL):
mkdir -p $(RRL_ROOT)
@cd $(RRL_ROOT) && \
download() { \
if command >/dev/null 2>&1 -v curl; \
then curl -fL -- "$$1"; \
else \
if command >/dev/null 2>&1 -v wget; \
then wget -O- -- "$$1"; \
else \
echo >&2 "error: missing 'curl' or 'wget'" && \
return 127; \
fi; \
fi; \
} && \
download $(RRL_URL) | tar xzf -
@touch $@
$(XNET_ROOT)/source/xnet: $(XNET)
@cd $(XNET_ROOT)/source && \
touch Makefile_local && \
$(MAKE) -e FC="$(FC)" \
FFLAGS="$(R8) $(FFLAGS)" \
LDR="$(FC)" \
CMODE="$(CMODE)" \
MATRIX_SOLVER="$(MATRIX_SOLVER)" \
R8="$(R8)" \
OPT="$(OPT)" \
TRAP="$(TRAP)" \
DEBUG="$(DEBUG)" \
PROFILE="$(PROFILE)" \
MOD="$(MOD)" \
EXTRA_LINK="$(EXTRA_LINK)" \
LAPACK_LIBDIR="$(LAPACK_LIBDIR)" \
LAPACK_LIBS="$(LAPACK_LIBS)"
$(XNET):
mkdir -p $(XNET_DIR)
@cd $(XNET_DIR) && \
download() { \
if command >/dev/null 2>&1 -v curl; \
then curl -fL -- "$$1"; \
else \
if command >/dev/null 2>&1 -v wget; \
then wget -O- -- "$$1"; \
else \
echo >&2 "error: missing 'curl' or 'wget'" && \
return 127; \
fi; \
fi; \
} && \
download >xnet_public.zip $(XNET_URL) && \
unzip xnet_public.zip && \
rm xnet_public.zip
@touch $@