debian/copyright: update copyright years for the package files
[kinect-audio-setup.git] / kinect_upload_fw / Makefile
1 CFLAGS ?= -std=c99 -pedantic -Wall -Wextra -O2
2
3 # Don't make pedantic checks errors,
4 # as vanilla libusb-1.0.8 can't live with that
5 #CFLAGS += -pedantic-errors
6
7 # GCC >= 4.6
8 #CFLAGS += -Wunused-but-set-variable
9
10 CFLAGS += -fno-common \
11   -Wall \
12   -Wextra \
13   -Wformat=2 \
14   -Winit-self \
15   -Winline \
16   -Wpacked \
17   -Wp,-D_FORTIFY_SOURCE=2 \
18   -Wpointer-arith \
19   -Wlarger-than-65500 \
20   -Wmissing-declarations \
21   -Wmissing-format-attribute \
22   -Wmissing-noreturn \
23   -Wmissing-prototypes \
24   -Wnested-externs \
25   -Wold-style-definition \
26   -Wredundant-decls \
27   -Wsign-compare \
28   -Wstrict-aliasing=2 \
29   -Wstrict-prototypes \
30   -Wswitch-enum \
31   -Wundef \
32   -Wunreachable-code \
33   -Wunsafe-loop-optimizations \
34   -Wwrite-strings
35
36 CFLAGS += $(shell pkg-config --cflags libusb-1.0)
37 LDLIBS += $(shell pkg-config --libs libusb-1.0)
38
39 PREFIX ?= /usr/local
40 bindir := $(PREFIX)/sbin
41
42 all: kinect_upload_fw
43
44
45 endian: endian.o
46
47 endian.h: endian
48         rm -f endian.h
49         ./endian > endian.h
50
51 kinect_upload_fw.o: endian.h
52
53 kinect_upload_fw: kinect_upload_fw.o
54
55
56 install: kinect_upload_fw
57         install -d $(DESTDIR)$(bindir)
58         install -m 755 kinect_upload_fw $(DESTDIR)$(bindir)
59
60 clean:
61         rm -rf *~ *.o kinect_upload_fw endian endian.h