-
Notifications
You must be signed in to change notification settings - Fork 17
/
GNUmakefile
67 lines (47 loc) · 1.42 KB
/
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
56
57
58
59
60
61
62
63
64
65
66
67
#!gmake
.PHONY: debug release build clean clobber package tests
ifeq ($(wildcard Makefile), Makefile)
all:
@$(MAKE) --no-print-directory -f Makefile $(MAKECMDGOALS)
clean:
@$(MAKE) --no-print-directory -f Makefile $(MAKECMDGOALS)
.DEFAULT:
@$(MAKE) --no-print-directory -f Makefile $(MAKECMDGOALS)
else
BUILD ?= Build
normal: $(BUILD)/Makefile
@$(MAKE) --no-print-directory -C $(BUILD) buildall pngs
build: $(BUILD)/Makefile
@$(MAKE) --no-print-directory -C $(BUILD)
all: debug release
clean:
@-$(MAKE) --no-print-directory -C Build clean cleans
@-$(MAKE) --no-print-directory -C Debug clean cleans
@-$(MAKE) --no-print-directory -C Release clean cleans
packages: Release/Makefile
@$(MAKE) --no-print-directory -C Release packages
tests: $(BUILD)/Makefile
@$(MAKE) --no-print-directory -C $(BUILD) tests
endif
clobber:
rm -rf Debug Release Build
debug: Debug/Makefile
@$(MAKE) --no-print-directory -C Debug
Debug/Makefile:
@mkdir -p Debug
@cd Debug; cmake .. -DCMAKE_BUILD_TYPE=Debug
release: Release/Makefile
@$(MAKE) --no-print-directory -C Release
Release/Makefile:
@mkdir -p Release
@cd Release; cmake .. -DCMAKE_BUILD_TYPE=Release
%/Makefile:
@mkdir -p $*
@cd $*; cmake ..
ifneq ($(wildcard Makefile), Makefile)
${BUILD}/projects.make: $(BUILD)/Makefile
-include ${BUILD}/projects.make
.DEFAULT:
@$(MAKE) --no-print-directory $(BUILD)/Makefile
@$(MAKE) --no-print-directory -C $(BUILD) $(MAKECMDGOALS)
endif