Initial import
[sst_elf_firmware_convert.git] / Makefile
1 CFLAGS ?= -std=c99 -pedantic -pedantic-errors -Wall -g3 -O2 -D_ANSI_SOURCE_
2 CFLAGS += -fno-common \
3           -Wall \
4           -Wdeclaration-after-statement \
5           -Wextra \
6           -Wformat=2 \
7           -Winit-self \
8           -Winline \
9           -Wpacked \
10           -Wp,-D_FORTIFY_SOURCE=2 \
11           -Wpointer-arith \
12           -Wlarger-than-65500 \
13           -Wmissing-declarations \
14           -Wmissing-format-attribute \
15           -Wmissing-noreturn \
16           -Wmissing-prototypes \
17           -Wnested-externs \
18           -Wold-style-definition \
19           -Wredundant-decls \
20           -Wsign-compare \
21           -Wstrict-aliasing=2 \
22           -Wstrict-prototypes \
23           -Wundef \
24           -Wunreachable-code \
25           -Wunused-variable \
26           -Wwrite-strings
27
28 ifneq ($(CC),clang)
29   CFLAGS += -Wunsafe-loop-optimizations
30 endif
31
32 # needed for htole32()
33 CFLAGS += -D_BSD_SOURCE
34
35 LDLIBS := -lelf
36
37 baytrail_sst_elf_firmware_convert: baytrail_sst_elf_firmware_convert.o
38
39 clean:
40         rm -f *~ *.o baytrail_sst_elf_firmware_convert
41
42 test: baytrail_sst_elf_firmware_convert
43         valgrind --leak-check=full --show-reachable=yes ./baytrail_sst_elf_firmware_convert fw_sst_0f28.bin output.bin