forked from Eyescale/Lunchbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
56 lines (39 loc) · 970 Bytes
/
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
53
54
55
#!gmake
.PHONY: debug release clean clobber install debuginst releaseinst tests
ifeq ($(wildcard Makefile), Makefile)
all:
$(MAKE) -f Makefile $(MAKECMDGOALS)
install:
$(MAKE) -f Makefile $(MAKECMDGOALS)
clean:
$(MAKE) -f Makefile $(MAKECMDGOALS)
.DEFAULT:
$(MAKE) -f Makefile $(MAKECMDGOALS)
else
all: install
install: Debug/Makefile Release/Makefile
@$(MAKE) -C Debug install
@$(MAKE) -C Release install
clean:
@-$(MAKE) -C Debug clean
@-$(MAKE) -C Release clean
package: Release/Makefile
@$(MAKE) -C Release clean
@$(MAKE) -C Release package
tests: Debug/Makefile
@$(MAKE) -C Debug tests
.DEFAULT: Debug/Makefile
@$(MAKE) -C Debug $(MAKECMDGOALS)
endif
clobber:
rm -rf Debug Release
debug: Debug/Makefile
@$(MAKE) -C Debug
Debug/Makefile:
@mkdir -p Debug
@cd Debug; cmake .. -DCMAKE_BUILD_TYPE=Debug
release: Release/Makefile
@$(MAKE) -C Release
Release/Makefile:
@mkdir -p Release
@cd Release; cmake .. -DCMAKE_BUILD_TYPE=Release