-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
93 lines (60 loc) · 2.36 KB
/
Makefile
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
.PHONY: test clean all
# Note: This Makefile will NOT properly work with the -j option
PLATFORM := $(shell uname -s)
COMPILER := $(shell ($(CXX) -v 2>&1) | tr A-Z a-z )
ifeq ($(PLATFORM),Darwin)
all: api main install test_binaries
else
# Note: important that all_nv is after all_cpu_basic and all_nv_avx2 for tests to work
all: all_cpu_basic all_nv_avx2 all_nv all_combined test_binaries_nv
all_cpu_basic: api_cpu_basic main_cpu_basic install_cpu_basic
all_nv: api_nv main_nv install_nv
all_nv_avx2: api_nv_avx2 main_nv_avx2 install_nv_avx2
all_combined: api_combined install_combined
endif
clean:
-cd test && make clean
-cd src && make clean
-cd combined && make clean
########### api
api:
cd src && make api
api_cpu_basic:
export BUILD_VARIANT=cpu_basic ; export BUILD_FULL_OPTIMIZATION=False ; cd src && make clean && make api
api_nv:
. ./setup_nv_h5.sh; export BUILD_VARIANT=nv ; export BUILD_FULL_OPTIMIZATION=False ; cd src && make clean && make api
api_nv_avx2:
. ./setup_nv_h5.sh; export BUILD_VARIANT=nv_avx2 ; export BUILD_FULL_OPTIMIZATION=True ; cd src && make clean && make api
api_combined:
cd combined && make api
########### main
main:
cd src && make main
main_cpu_basic:
export BUILD_VARIANT=cpu_basic ; export BUILD_FULL_OPTIMIZATION=False ; cd src && make main
main_nv:
. ./setup_nv_h5.sh; export BUILD_VARIANT=nv ; export BUILD_FULL_OPTIMIZATION=False ; cd src && make main
main_nv_avx2:
. ./setup_nv_h5.sh; export BUILD_VARIANT=nv_avx2 ; export BUILD_FULL_OPTIMIZATION=True ; cd src && make main
########### install
install:
cd src && make install
install_cpu_basic:
export BUILD_VARIANT=cpu_basic ; export BUILD_FULL_OPTIMIZATION=False ; cd src && make install
install_nv:
. ./setup_nv_h5.sh; export BUILD_VARIANT=nv ; export BUILD_FULL_OPTIMIZATION=False ; cd src && make install
install_nv_avx2:
. ./setup_nv_h5.sh; export BUILD_VARIANT=nv_avx2 ; export BUILD_FULL_OPTIMIZATION=True ; cd src && make install
install_combined:
cd combined && make install
########### test
test_binaries:
cd src && make test_binaries
cd test && make test_binaries
test_binaries_nv:
. ./setup_nv_h5.sh; export BUILD_VARIANT=nv ; export BUILD_FULL_OPTIMIZATION=False ; cd src && make test_binaries
# use the default compiler for the test subdir as it tests the combined shlib
cd test && make test_binaries
test:
cd src && make test
cd test && make test