-
Notifications
You must be signed in to change notification settings - Fork 5
/
makefile
53 lines (33 loc) · 1019 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
53
###### BUILD ######
INCLUDES = -Isrc -I/usr/include -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore
COMPILER = clang -std=c++11 -Wall -O3 -fPIC -MMD $(INCLUDES) -c $< -o $@
MOC = moc $(INCLUDES) -o $@ $<
LINKER = g++ -o $@ $^ -lQt5Xdg -lQt5Widgets -lQt5Gui -lQt5Core
MKDIR = mkdir -p $(dir $@)
# this prevents make from deleting the generated moc_*.cpp files
# so that the including of the dep-files will not fail
.SECONDARY:
data/usr/bin/lead: build/main.o build/app.o build/sensor.o build/screenname.o build/moc_app.o build/moc_sensor.o build/moc_screenname.o
$(MKDIR)
$(LINKER)
build/%.o: src/%.cpp
$(MKDIR)
$(COMPILER)
build/moc_%.o: build/moc_%.cpp
$(MKDIR)
$(COMPILER)
build/moc_%.cpp: src/%.h
$(MKDIR)
$(MOC)
-include build/*.d
###### CLEAN ######
clean:
rm -f build/*
rm -f data/usr/bin/lead
###### INSTALL ######
install:
cp -r data/* /
###### UNINSTALL ######
uninstall:
rm -f /usr/bin/lead
.PHONY: clean install uninstall