-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (39 loc) · 1.11 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
##############################################################
# CMake Project Wrapper Makefile #
##############################################################
DEFAULT_STATUS := Release
ifndef STATUS
STATUS:=__undefined__status__
endif
ifneq ($(STATUS), Debug)
ifneq ($(STATUS), Release)
$(info No status specified. Using the default status "${DEFAULT_STATUS}")
STATUS:=${DEFAULT_STATUS}
endif
endif
SHELL := /bin/bash
RM := rm -rf
all: ./build/${STATUS}/Makefile
@ $(MAKE) -C build/${STATUS}
./build/${STATUS}/Makefile:
@ (mkdir -p build/${STATUS} bin docs && \
cd build/${STATUS} >/dev/null 2>&1 && \
cmake -DCMAKE_BUILD_TYPE=${STATUS} ../.. \
)
distclean:
@- $(RM) ./bin/*
@- $(RM) ./lib/*
@- $(RM) ./build/*
@- $(RM) ./docs/*.html
@- $(RM) ./docs/*.css
@- $(RM) ./docs/*.png
@- $(RM) ./docs/*.jpg
@- $(RM) ./docs/*.gif
@- $(RM) ./docs/*.tiff
@- $(RM) ./docs/*.php
@- $(RM) ./docs/search
@- $(RM) ./docs/installdox
ifeq ($(findstring distclean,$(MAKECMDGOALS)),)
$(MAKECMDGOALS): ./build/${STATUS}/Makefile
@ $(MAKE) -C build/${STATUS} $(MAKECMDGOALS)
endif