remove cruft
[apps/madmutt.git] / tools / cflags.mk
1 ifneq ($(filter 4.%,$(shell gcc -dumpversion)),)
2   GCC4=1
3 endif
4
5 CFLAGS := -ggdb3
6
7 # Use pipes and not temp files.
8 CFLAGS += -pipe
9 # optimize even more
10 CFLAGS += -O2
11 # let the type char be unsigned by default
12 CFLAGS += -funsigned-char
13 CFLAGS += -fstrict-aliasing
14 # turn on all common warnings
15 CFLAGS += -Wall
16 # turn on extra warnings
17 CFLAGS += $(if $(GCC4),-Wextra,-W)
18 # treat warnings as errors
19 #CFLAGS += -Werror
20 CFLAGS += -Wchar-subscripts
21 # warn about undefined preprocessor identifiers
22 CFLAGS += -Wundef
23 # warn about local variable shadowing another local variable
24 CFLAGS += -Wshadow
25 # warn about casting of pointers to increased alignment requirements
26 CFLAGS += -Wcast-align
27 # make string constants const
28 CFLAGS += -Wwrite-strings
29 # warn about implicit conversions with side effects
30 # fgets, calloc and friends take an int, not size_t...
31 #CFLAGS += -Wconversion
32 # warn about comparisons between signed and unsigned values
33 CFLAGS += -Wsign-compare
34 # warn about unused declared stuff
35 CFLAGS += -Wunused
36 CFLAGS += -Wno-unused-parameter
37 # warn about variable use before initialization
38 CFLAGS += -Wuninitialized
39 # warn about variables which are initialized with themselves
40 CFLAGS += -Winit-self
41 # warn about pointer arithmetic on void* and function pointers
42 CFLAGS += -Wpointer-arith
43 # warn about multiple declarations
44 CFLAGS += -Wredundant-decls
45 # warn if the format string is not a string literal
46 #CFLAGS += -Wformat-nonliteral
47 # do not warn about zero-length formats.
48 CFLAGS += -Wno-format-zero-length
49 # missing prototypes
50 CFLAGS += -Wmissing-prototypes
51 # warn about functions without format attribute that should have one
52 CFLAGS += -Wmissing-format-attribute
53