-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
81 lines (58 loc) · 1.65 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
include Makefile.common
# default target --------------------------------
all: lib plugin_glow test examples
# the lifespace main library --------------------
lib:
cd src && \
$(MAKE) && \
mkdir -p ../lib/ && \
cp liblifespace.a ../lib/liblifespace.a && \
for dir in `find ./ -type d` ; do \
mkdir -p "../include/lifespace/$$dir" ; \
done && \
for file in `find ./ -name '*.hpp'` ; do \
cp "$$file" "../include/lifespace/$$file" ; \
done
# plugins ---------------------------------------
# GLOW plugin
plugin_glow: lib
cd plugins && \
$(MAKE) glow && \
mkdir -p ../lib/ && \
cp glow/liblifespaceglow.a \
../lib/liblifespaceglow.a && \
for dir in `find glow/ -type d` ; do \
mkdir -p "../include/lifespace/plugins/$$dir" ; \
done && \
for file in `find glow.hpp glow/ -name '*.hpp'` ; do \
cp "$$file" "../include/lifespace/plugins/$$file" ; \
done
# ODE plugin
### other targets
### ------------------------------------------------------------- ###
.PHONY: all clean cleantest cleanexamples cleanbin cleanall \
lib \
plugin_glow \
test examples \
# tests
test: lib plugin_glow
$(MAKE) -C test
# examples
examples: lib plugin_glow
$(MAKE) -C examples
# remove temporary files from the src directory
# NOTE: the plugin directories will not be cleaned!
clean:
$(MAKE) -C src clean && \
$(MAKE) -C plugins clean
# delete all tests
cleantest:
$(MAKE) -C test clean
# delete all examples
cleanexamples:
$(MAKE) -C examples clean
# delete all compiled libraries and their copied headers
cleanbin:
rm -rf include/ lib/
# delete all derived files (does not work completely yet)
cleanall: clean cleantest cleanexamples cleanbin