diff options
| author | Niklas | 2011-08-29 15:08:23 +0200 |
|---|---|---|
| committer | Niklas | 2011-08-29 15:08:23 +0200 |
| commit | 4f713dfa2728b5727481604ad7249e9c71a6487d (patch) | |
| tree | 28ec09bf9d97b75e48cce6a388d5fd032b699d59 /workspace/customdhcpcd/src/mk/cc.mk | |
| parent | added to dialogs. one for the critical error case (abot boot dialog), one for... (diff) | |
| download | fbgui-4f713dfa2728b5727481604ad7249e9c71a6487d.tar.gz fbgui-4f713dfa2728b5727481604ad7249e9c71a6487d.tar.xz fbgui-4f713dfa2728b5727481604ad7249e9c71a6487d.zip | |
added makefiles
Diffstat (limited to 'workspace/customdhcpcd/src/mk/cc.mk')
| -rw-r--r-- | workspace/customdhcpcd/src/mk/cc.mk | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/workspace/customdhcpcd/src/mk/cc.mk b/workspace/customdhcpcd/src/mk/cc.mk new file mode 100644 index 0000000..d52597b --- /dev/null +++ b/workspace/customdhcpcd/src/mk/cc.mk @@ -0,0 +1,23 @@ +# Copyright 2008 Roy Marples <roy@marples.name> + +# Setup some good default CFLAGS +CFLAGS?= -O2 + +# Default to using the C99 standard +CSTD?= c99 +_CSTD_SH= if test -n "${CSTD}"; then echo "-std=${CSTD}"; else echo ""; fi +_CSTD!= ${_CSTD_SH} +CFLAGS+= ${_CSTD}$(shell ${_CSTD_SH}) + +# Try and use some good cc flags +_CC_FLAGS= -pedantic -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 \ + -Wmissing-declarations -Wno-missing-prototypes -Wwrite-strings \ + -Wbad-function-cast -Wnested-externs -Wcomment -Winline \ + -Wchar-subscripts -Wcast-align -Wno-format-nonliteral \ + -Wdeclaration-after-statement -Wsequence-point -Wextra +_CC_FLAGS_SH= for f in ${_CC_FLAGS}; do \ + if ${CC} $$f -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \ + then printf "%s" "$$f "; fi \ + done +_CC_FLAGS!= ${_CC_FLAGS_SH} +CFLAGS+= ${_CC_FLAGS}$(shell ${CC_FLAGS_SH}) |
