-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
91 lines (65 loc) · 1.83 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
include config.mk
all: quick_debug
quick_release:
$(MAKE) -j$$(( 10 * $(shell nproc) )) release
quick_debug:
$(MAKE) -j$$(( 10 * $(shell nproc) )) debug
debug: CXXFLAGS += $(DEBUG_CXXFLAGS)
debug: LDFLAGS += $(DEBUG_LDFLAGS)
debug: winsys
debug: core
debug: client
debug: bar
+$(MAKE) run tags
release: CXXFLAGS += $(RELEASE_CXXFLAGS)
release: LDFLAGS += $(RELEASE_LDFLAGS)
release: winsys
release: core
release: client
release: bar
install:
install -m0755 $(BINDIR)/$(PROJECT) $(DESTDIR)$(INSTALLDIR)/$(PROJECT)
install -m0755 $(BINDIR)/$(CLIENT) $(DESTDIR)$(INSTALLDIR)/$(CLIENT)
install -m0755 $(BINDIR)/$(BAR) $(DESTDIR)$(INSTALLDIR)/$(BAR)
winsys: bin obj ${WINSYS_LINK_FILES}
core: bin obj ${CORE_LINK_FILES}
${CC} ${CXXFLAGS} ${CORE_LINK_FILES} ${LDFLAGS} -o $(BINDIR)/$(PROJECT)
client: bin obj ${CLIENT_LINK_FILES}
${CC} ${CXXFLAGS} ${CLIENT_LINK_FILES} ${LDFLAGS} -o $(BINDIR)/$(CLIENT)
bar: bin obj ${BAR_LINK_FILES}
${CC} ${CXXFLAGS} ${BAR_LINK_FILES} ${LDFLAGS} -o $(BINDIR)/$(BAR)
-include $(DEPS)
obj/%.o: obj
obj/winsys/%.o: src/winsys/%.cc
${CC} ${CXXFLAGS} -MMD -c $< -o $@
obj/winsys/xdata/%.o: src/winsys/xdata/%.cc
${CC} ${CXXFLAGS} -MMD -c $< -o $@
obj/core/%.o: src/core/%.cc
${CC} ${CXXFLAGS} -MMD -c $< -o $@
obj/client/%.o: src/client/%.cc
${CC} ${CXXFLAGS} -MMD -c $< -o $@
obj/bar/%.o: src/bar/%.cc
${CC} ${CXXFLAGS} -MMD -c $< -o $@
run:
@echo [running]
@./launch
bin:
@[ -d bin ] || mkdir bin
obj:
@[ -d obj ] || mkdir -p obj/{winsys/xdata,core,client,bar}
notify-core:
@echo [building core]
notify-client:
@echo [building client]
notify-bar:
@echo [building bar]
notify-link:
@echo [linking]
.PHONY: tags
tags:
@echo [generating tags]
@git ls-files | ctags -R --exclude=.git --c++-kinds=+p --links=no --fields=+iaS --extras=+q -L-
.PHONY: clean
clean:
@echo [cleaning]
@rm -rf ./bin ./obj