-
Notifications
You must be signed in to change notification settings - Fork 95
/
Makefile
57 lines (43 loc) · 1.4 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
rel: install-relc py
-include Makefile.conf
config: Makefile.conf
Makefile.conf:
@[ ! -f Makefile.conf ] && cp Makefile.conf.tmpl Makefile.conf && echo "\n\n** Adjust the values in Makefile.conf for your system **\n\n" && exit 1
debug: install-debugc py
.PHONY: install-debugc py debug install-relc rel config
Debug/Makefile: Makefile.conf
mkdir -p Debug
ifndef INSTALL_PREFIX
(cd Debug && NUM_DEVS=${NUM_DEVS} DEV_NAMES=${DEV_NAMES} cmake .. -DCMAKE_BUILD_TYPE=Debug)
else
(cd Debug && NUM_DEVS=${NUM_DEVS} DEV_NAMES=${DEV_NAMES} cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX))
endif
debugc: Debug/Makefile
(cd Debug && make)
test-debugc: debugc
ifndef DEVICE
(cd Debug && make test)
else
(cd Debug && DEVICE=${DEVICE} make test)
endif
install-debugc: debugc
(cd Debug && ${SUDO} make install)
Release/Makefile: Makefile.conf
mkdir -p Release
ifndef INSTALL_PREFIX
(cd Release && NUM_DEVS=${NUM_DEVS} DEV_NAMES=${DEV_NAMES} cmake .. -DCMAKE_BUILD_TYPE=Release)
else
(cd Release && NUM_DEVS=${NUM_DEVS} DEV_NAMES=${DEV_NAMES} cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX))
endif
relc: Release/Makefile
(cd Release && make)
test-relc: relc
ifndef DEVICE
(cd Release && make test)
else
(cd Release && DEVICE=${DEVICE} make test)
endif
install-relc: relc
(cd Release && ${SUDO} make install)
py: Makefile.conf
python setup.py build_ext --inplace