forked from cornelius-braun/rhhlgp-rai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·91 lines (56 loc) · 3.01 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
BASE = .
target: src
DEPEND = $(shell find rai -mindepth 1 -maxdepth 1 -not -name 'contrib' -printf "%f ")
################################################################################
src_paths = $(shell find rai -mindepth 1 -maxdepth 1 -type d -not -name 'retired' -printf "%f ")
#contrib_paths = $(shell find -L rai/contrib -mindepth 1 -maxdepth 1 -type d -not -name 'retired' -not -name '.git' -printf "%f ")
test_paths = $(shell find test -mindepth 3 -maxdepth 3 -name 'Makefile' -printf "%h ")
bin_paths = $(shell find bin -mindepth 2 -maxdepth 2 -name 'Makefile' -printf "%h ")
################################################################################
installUbuntuAll: force
@echo "##### calling make installUbuntu in each lib"
+@find rai -mindepth 1 -maxdepth 1 -type d -exec make installUbuntu -C {} \;
printUbuntuAll: $(DEPEND:%=inPath_printUbuntu/%) printUbuntu
printDependAll: $(DEPEND:%=inPath_printDepend/%) printDepend
tests: $(test_paths:%=inPath_make/%) inPath_makeLib/ry
bin: $(bin_paths:%=inPath_make/%)
src: $(src_paths:%=inPath_makeLib/%)
ry: inPath_makeLib/ry
dependAll: $(src_paths:%=inPath_depend/%)
clean: $(src_paths:%=inPath_clean/%) cleanLocks
cleanStart: force
@read -p " *** WARNING: This will rm ALL local files/changes (e.g. project/temporary/data files) - abort if you don't want to continue" yn
git clean -f -d -x
cp build/config.mk.default build/config.mk
paths: force
@echo; echo ----------------------------------------
@echo " paths ";
@echo ----------------------------------------; echo
@echo " src_paths =" "$(src_paths)"
@echo " contrib_paths =" "$(contrib_paths)"
@echo " test_paths =" "$(test_paths)"
@echo " bin_paths =" "$(bin_paths)"
################################################################################
INSTALL_PATH?=z.LOCAL
install: src bin
mkdir -p $(INSTALL_PATH)/bin $(INSTALL_PATH)/lib/rai $(INSTALL_PATH)/include/rai
cp bin/src_kinEdit/x.exe $(INSTALL_PATH)/bin/kinEdit
cp lib/lib*.so $(INSTALL_PATH)/lib/rai
@echo "copying headers into $(INSTALL_PATH)/include/rai"
@eval $(shell cd rai; find . -maxdepth 1 -type d -printf "mkdir -p $(INSTALL_PATH)/include/rai/%f\; ")
@eval $(shell cd rai; find . -maxdepth 2 -type f -name '*.h' -or -name '*.tpp' -printf "cp rai/%p $(INSTALL_PATH)/include/rai/%h/\; ")
@find $(INSTALL_PATH)/include/rai
@find $(INSTALL_PATH)/lib/rai
################################################################################
# test: setConfigFlag $(exa_paths:%=inPath_clean/%) cleanLocks $(exa_paths:%=inPath_make/%)
# setConfigFlag: force
# echo "RAI_TESTS = 1" > build/z.mk
runTests: tests
@rm -f z.test-report
@for p in $(test_paths); do build/run-path.sh $$p; done
+@-make -C test/ry run clean
################################################################################
deletePotentiallyNonfreeCode: force
@rm -Rf rai/Kin/SWIFT rai/Kin/SWIFT_decomposer rai/Geo/Lewiner rai/Geo/ply rai/Geo/GJK
################################################################################
include $(BASE)/build/generic.mk