projects
/
apps
/
pfixtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Exclude -Wredundant-decls and -Wshadow only when compiling server.c.
[apps/pfixtools.git]
/
mk
/
cflags.mk
diff --git
a/mk/cflags.mk
b/mk/cflags.mk
index
39ee204
..
1dcdb31
100644
(file)
--- a/
mk/cflags.mk
+++ b/
mk/cflags.mk
@@
-37,50
+37,53
@@
ifneq ($(filter Darwin%,$(shell uname)),)
endif
# Use pipes and not temp files.
endif
# Use pipes and not temp files.
-CFLAGS += -pipe
+CFLAGS
BASE
+= -pipe
# optimize even more
# optimize even more
-CFLAGS += -O2
+CFLAGS
BASE
+= -O2
# let the type char be unsigned by default
# let the type char be unsigned by default
-CFLAGS += -funsigned-char
-CFLAGS += -fstrict-aliasing
+CFLAGS
BASE
+= -funsigned-char
+CFLAGS
BASE
+= -fstrict-aliasing
# turn on all common warnings
# turn on all common warnings
-CFLAGS += -Wall
+CFLAGS
BASE
+= -Wall
# turn on extra warnings
# turn on extra warnings
-CFLAGS += $(if $(GCC4),-Wextra,-W)
+CFLAGS
BASE
+= $(if $(GCC4),-Wextra,-W)
# treat warnings as errors
# treat warnings as errors
-CFLAGS += -Werror
-CFLAGS += -Wchar-subscripts
+CFLAGS
BASE
+= -Werror
+CFLAGS
BASE
+= -Wchar-subscripts
# warn about undefined preprocessor identifiers
# warn about undefined preprocessor identifiers
-CFLAGS += -Wundef
+CFLAGS
BASE
+= -Wundef
# warn about local variable shadowing another local variable
# # disabled on Darwin because of warnings in ev.h
# warn about local variable shadowing another local variable
# # disabled on Darwin because of warnings in ev.h
-CFLAGS
+= $(if $(DARWIN),,-Wshadow)
+CFLAGS
BASE += -Wshadow
# warn about casting of pointers to increased alignment requirements
# warn about casting of pointers to increased alignment requirements
-CFLAGS += -Wcast-align
+CFLAGS
BASE
+= -Wcast-align
# make string constants const
# make string constants const
-CFLAGS += -Wwrite-strings
+CFLAGS
BASE
+= -Wwrite-strings
# warn about implicit conversions with side effects
# fgets, calloc and friends take an int, not size_t...
# warn about implicit conversions with side effects
# fgets, calloc and friends take an int, not size_t...
-#CFLAGS += -Wconversion
+#CFLAGS
BASE
+= -Wconversion
# warn about comparisons between signed and unsigned values
# warn about comparisons between signed and unsigned values
-CFLAGS += -Wsign-compare
+CFLAGS
BASE
+= -Wsign-compare
# warn about unused declared stuff
# warn about unused declared stuff
-CFLAGS += -Wunused
-CFLAGS += -Wno-unused-parameter
+CFLAGS
BASE
+= -Wunused
+CFLAGS
BASE
+= -Wno-unused-parameter
# warn about variable use before initialization
# warn about variable use before initialization
-CFLAGS += -Wuninitialized
+CFLAGS
BASE
+= -Wuninitialized
# warn about variables which are initialized with themselves
# warn about variables which are initialized with themselves
-CFLAGS += $(if $(GCC4),-Winit-self)
+CFLAGS
BASE
+= $(if $(GCC4),-Winit-self)
# warn about pointer arithmetic on void* and function pointers
# warn about pointer arithmetic on void* and function pointers
-CFLAGS += -Wpointer-arith
+CFLAGS
BASE
+= -Wpointer-arith
# warn about multiple declarations
# #disabled on Darwin because of warnings in ev.h
# warn about multiple declarations
# #disabled on Darwin because of warnings in ev.h
-CFLAGS
+= $(if $(DARWIN),,-Wredundant-decls)
+CFLAGS
BASE += -Wredundant-decls
# warn if the format string is not a string literal
# warn if the format string is not a string literal
-CFLAGS += -Wformat-nonliteral
+CFLAGS
BASE
+= -Wformat-nonliteral
# do not warn about zero-length formats.
# do not warn about zero-length formats.
-CFLAGS += -Wno-format-zero-length
+CFLAGS
BASE
+= -Wno-format-zero-length
# do not warn about strftime format with y2k issues
# do not warn about strftime format with y2k issues
-CFLAGS += -Wno-format-y2k
+CFLAGS
BASE
+= -Wno-format-y2k
# warn about functions without format attribute that should have one
# warn about functions without format attribute that should have one
-CFLAGS += -Wmissing-format-attribute
+CFLAGSBASE += -Wmissing-format-attribute
+
+CFLAGS=$(CFLAGSBASE)
+LDFLAGS=$(LDFLAGSBASE)