-
Notifications
You must be signed in to change notification settings - Fork 1
/
GNUmakefile
52 lines (45 loc) · 1.65 KB
/
GNUmakefile
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
ifndef COMPILER
COMPILER=x64x
endif # !COMPILER
include $(COMPILER).mk
MKFS=GNUmakefile $(COMPILER).mk
.PHONY: all help clean
all: libjstrat$(DEBUG).a libqxblas$(WP)$(ABI)$(DEBUG).a libvn$(DEBUG).a
help:
@echo "gmake [COMPILER=x64x|x200|x64|gnu|nvidia] [MARCH=...] [NDEBUG=optimization_level] [ABI=ilp64|lp64] [WP=...] [all|clean|help]"
libjstrat$(DEBUG).a: $(MKFS)
ifdef NDEBUG
pushd jstrat && $(MAKE) COMPILER=$(COMPILER) NDEBUG=$(NDEBUG) ABI=$(ABI) && popd
else # DEBUG
pushd jstrat && $(MAKE) COMPILER=$(COMPILER) ABI=$(ABI) && popd
endif # ?NDEBUG
libqxblas$(WP)$(ABI)$(DEBUG).a: $(MKFS)
ifdef NDEBUG
pushd qxblas && $(MAKE) WP=$(WP) COMPILER=$(COMPILER) NDEBUG=$(NDEBUG) ABI=$(ABI) && popd
else # DEBUG
pushd qxblas && $(MAKE) WP=$(WP) COMPILER=$(COMPILER) ABI=$(ABI) && popd
endif # ?NDEBUG
libvn$(DEBUG).a: $(MKFS)
ifdef NDEBUG
pushd vn && $(MAKE) COMPILER=$(COMPILER) NDEBUG=$(NDEBUG) ABI=$(ABI) && popd
else # DEBUG
pushd vn && $(MAKE) COMPILER=$(COMPILER) ABI=$(ABI) && popd
endif # ?NDEBUG
clean:
ifdef NDEBUG
pushd vn && $(MAKE) COMPILER=$(COMPILER) NDEBUG=$(NDEBUG) ABI=$(ABI) clean && popd
pushd jstrat && $(MAKE) COMPILER=$(COMPILER) NDEBUG=$(NDEBUG) ABI=$(ABI) clean && popd
pushd qxblas && $(MAKE) WP=$(WP) COMPILER=$(COMPILER) NDEBUG=$(NDEBUG) ABI=$(ABI) clean && popd
else # DEBUG
pushd vn && $(MAKE) COMPILER=$(COMPILER) ABI=$(ABI) clean && popd
pushd jstrat && $(MAKE) COMPILER=$(COMPILER) ABI=$(ABI) clean && popd
pushd qxblas && $(MAKE) WP=$(WP) COMPILER=$(COMPILER) ABI=$(ABI) clean && popd
endif # ?NDEBUG
-$(RM) *.exe
-$(RM) *.mod
-$(RM) *.o
-$(RM) *.optrpt
-$(RM) *.opt.yaml
-$(RM) *__genmod.f90
-$(RM) *__genmod.mod
-$(RM) *.dSYM