-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (55 loc) · 1.8 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
################################################################################
CC = gcc
CXX = g++
CPPFLAGS = -I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu/qt6
CFLAGS = -march=native -O3 -funroll-loops -fpic -fstack-protector-all \
-Wall -Wextra -Werror -Wno-deprecated-declarations
CXXFLAGS = -march=native -O3 -funroll-loops -fpic -fstack-protector-all \
-Wall -Wextra -Werror
REASON = @if [ -f $@ ]; then echo "[$@: $?]"; else echo "[$@]"; fi
LDFLAGS = -lnetpbm -lcurl -L/usr/lib/x86_64-linux-gnu -lxml2 -ljson-c \
-lQt6DBus -lQt6Core -lQt6Xml -lcrypto -lX11 -lXtst
.c.o:
$(REASON)
$(COMPILE.c) $< $(OUTPUT_OPTION)
.cc.o:
$(REASON)
$(COMPILE.cc) $< $(OUTPUT_OPTION)
all: ldcd
################################################################################
fb_demo: fb_demo.o fritzbox.o
$(REASON)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
ld_demo: ld_demo.o loupedeck.o image.o
$(REASON)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
in_demo: in_demo.o input.o
$(REASON)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
qd_demo: qd_demo.o querydbus.o
$(REASON)
$(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
cfg_demo: cfg_demo.o config.c
$(REASON)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
ppm2raw: ppm2raw.o image.o
$(REASON)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
pong: pong.o loupedeck.o image.o
$(REASON)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
ldcd: control.o loupedeck.o image.o fritzbox.o input.o config.o command.o querydbus.o
$(REASON)
$(CXX) $(CFLAGS) -o $@ $^ $(LDFLAGS)
################################################################################
tags:
ctags --format=2 -o $@ *.h *.cc
deps depend: *.h *.c
$(REASON)
$(CC) -MM $(CPPFLAGS) *.c > deps
clean:
$(RM) *.o *~
distclean: clean
$(RM) core deps tags
-include deps
################################################################################