kinect_upload_fw: fix a -Wstrict-aliasing warning
[kinect-audio-setup.git] / kinect_upload_fw / Makefile
1 CFLAGS ?= -std=c99 -pedantic -pedantic-errors -Wall -Wextra -O2
2 CFLAGS += -fno-common \
3   -Wall \
4   -Wextra \
5   -Wformat=2 \
6   -Winit-self \
7   -Winline \
8   -Wpacked \
9   -Wp,-D_FORTIFY_SOURCE=2 \
10   -Wpointer-arith \
11   -Wlarger-than-65500 \
12   -Wmissing-declarations \
13   -Wmissing-format-attribute \
14   -Wmissing-noreturn \
15   -Wmissing-prototypes \
16   -Wnested-externs \
17   -Wold-style-definition \
18   -Wredundant-decls \
19   -Wsign-compare \
20   -Wstrict-aliasing=2 \
21   -Wstrict-prototypes \
22   -Wswitch-enum \
23   -Wundef \
24   -Wunreachable-code \
25   -Wunsafe-loop-optimizations \
26   -Wunused-but-set-variable \
27   -Wwrite-strings
28
29 CFLAGS  += $(shell pkg-config --cflags libusb-1.0)
30 LDFLAGS += $(shell pkg-config --libs libusb-1.0)
31
32 PREFIX ?= /usr/local
33 bindir := $(PREFIX)/sbin
34
35 kinect_upload_fw: kinect_upload_fw.o
36
37 install: kinect_upload_fw
38         install -d $(DESTDIR)$(bindir)
39         install -m 755 kinect_upload_fw $(DESTDIR)$(bindir)
40
41 clean:
42         rm -rf *~ *.o kinect_upload_fw