-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (41 loc) · 1.01 KB
/
Copy pathMakefile
File metadata and controls
53 lines (41 loc) · 1.01 KB
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
CFLAGS += -Wall -Iinclude -O0 -g
LDFLAGS += -pthread
# add drm
CFLAGS += $(shell pkg-config --cflags libdrm)
LDFLAGS += $(shell pkg-config --libs libdrm)
CFLAGS += $(shell pkg-config --cflags libpng)
LDFLAGS += $(shell pkg-config --libs libpng)
all: juggler test_output demp_test
juggler_objects = \
kms.o \
status.o \
projector.o \
capture.o \
juggler.o
juggler: $(juggler_objects)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
test_output_objects = \
kms.o \
test.o
test_output: $(test_output_objects)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
demp_test_objects = \
kms.o \
demp.o
demp_test: $(demp_test_objects)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
clean:
rm -f juggler
rm -f test_output
rm -f demp_test
rm -f *.o
rm -f *.P
%.o : %.c
$(COMPILE.c) -MD -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
rm -f $*.d
-include $(juggler_objects:%.o=%.P)
-include $(test_output_objects:%.o=%.P)
-include $(demp_test_objects:%.o=%.P)