1 CFLAGS = -std=c99 -pedantic -pedantic-errors -Wall -g3 -O2 -D_ANSI_SOURCE_
2 CFLAGS += -fno-common \
4 -Wdeclaration-after-statement \
10 -Wp,-D_FORTIFY_SOURCE=2 \
13 -Wmissing-declarations \
14 -Wmissing-format-attribute \
16 -Wmissing-prototypes \
18 -Wold-style-definition \
25 -Wunsafe-loop-optimizations \
26 -Wunused-but-set-variable \
29 LDLIBS = -llept -lturbojpeg -lam7xxx
31 # For clock_nanosleep()
32 CFLAGS += -D_POSIX_C_SOURCE=200112L
37 # Some compiler optimizations
39 -fno-strict-aliasing \
43 -funsafe-math-optimizations \
44 -fsingle-precision-constant
48 CFLAGS += -march=armv7-a \
55 # Use the BBB eQEP unit
61 cyclabile: cyclabile.o projective_split.o
64 rm -rf *~ *.o cyclabile cyclabile.service
67 ./cyclabile -P 2 -f images/bike_lane.png -e /dev/input/event1
70 cp 90-projector.rules $(DESTDIR)/lib/udev/rules.d/
71 sed -e 's!@@CYCLABILE_SOURCE_PATH@@!$(shell pwd)!' < cyclabile.service.in > cyclabile.service
72 cp cyclabile.service $(DESTIR)/lib/systemd/system/
75 systemctl disable cyclabile.service
76 rm $(DESTIR)/lib/systemd/system/cyclabile.service
77 rm $(DESTDIR)/lib/udev/rules.d/90-projector.rules
78 udevadm control --reload
80 enable_service: install_service
81 udevadm control --reload
82 systemctl enable cyclabile.service
85 valgrind --suppressions=contrib/libusb-udev.supp \
86 --leak-check=full --show-reachable=yes \
87 ./cyclabile -f images/bumpy_road.png -e /dev/input/event1