-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
52 lines (40 loc) · 797 Bytes
/
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
DST = build
RM = rm -vrdf
CP = cp
MKDIR = mkdir -p
CMAKE = cmake
.PHONY: all
all: setup $(DST)/release
.PHONY: setup
setup:
which -a $(CMAKE) &> /dev/null
@echo 'setup done'
$(DST)/release:
$(MKDIR) $@
cd $@; \
$(CMAKE) -DCMAKE_BUILD_TYPE=Release ../..; \
$(MAKE)
$(DST)/debug:
$(MKDIR) $@
cd $@; \
$(CMAKE) -DCMAKE_BUILD_TYPE=Debug ../..; \
$(MAKE)
tmp:
$(MKDIR) $@
.PHONY: load
load: | $(DST)/release
cd $(DST)/release && $(MAKE) launchctl_load
.PHONY: unload
unload: | $(DST)/release
cd $(DST)/release && $(MAKE) launchctl_unload
.PHONY: install
install: setup $(DST)/release
cd $(DST)/release && $(MAKE) install
$(MAKE) load
.PHONY: uninstall
uninstall: | $(DST)/release
$(MAKE) unload
cd $(DST)/release && $(MAKE) uninstall
.PHONY: clean
clean:
$(RM) $(DST) tmp