-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathmakefile
41 lines (32 loc) · 1.12 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
SHELL := /bin/bash
ifndef VERBOSE
CMD_VERB := @
NOPRINTD := --no-print-directory
endif
################################################################################
BuildTargets := all clean configure redep distclean
.PHONY: $(BuildTargets)
################################################################################
all:
ifeq ($(wildcard exe/Makefile),)
$(CMD_VERB) $(MAKE) $(NOPRINTD) configure
$(CMD_VERB) $(MAKE) $(NOPRINTD) -C exe
else
$(CMD_VERB) $(MAKE) $(NOPRINTD) -C exe
endif
################################################################################
configure:
$(CMD_VERB) rm -rf ./exe ; mkdir -p exe
$(CMD_VERB) cd exe/ ; cmake ../src
################################################################################
redep:
$(CMD_VERB) cd exe/ ; cmake ../src ; cd ..
################################################################################
clean:
$(CMD_VERB) $(MAKE) $(NOPRINTD) -C exe clean
################################################################################
distclean:
$(CMD_VERB) if [ -f exe/Makefile ]; \
then $(MAKE) $(NOPRINTD) -C exe clean ;\
fi
$(CMD_VERB) rm -rf exe