Makefile: remove the changelog target it's not used anymore
[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   -Wwrite-strings
34
35 ifneq ($(CC),clang)
36   CFLAGS += -Wunsafe-loop-optimizations
37 endif
38
39 CFLAGS += $(shell pkg-config --cflags libusb-1.0)
40 LDLIBS += $(shell pkg-config --libs libusb-1.0)
41
42 PREFIX ?= /usr/local
43 bindir := $(PREFIX)/sbin
44
45 all: kinect_upload_fw
46
47
48 endian: endian.o
49
50 endian.h: endian
51         rm -f endian.h
52         ./endian > endian.h
53
54 kinect_upload_fw.o: endian.h
55
56 kinect_upload_fw: kinect_upload_fw.o
57
58
59 install: kinect_upload_fw
60         install -d $(DESTDIR)$(bindir)
61         install -m 755 kinect_upload_fw $(DESTDIR)$(bindir)
62
63 clean:
64         rm -rf *~ *.o kinect_upload_fw endian endian.h