- better distinction between CFLAGS and CPPFLAGS.
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Wed, 6 Dec 2006 21:51:59 +0000 (21:51 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Wed, 6 Dec 2006 21:51:59 +0000 (21:51 -0000)
Makefile.custom
Makefile.flags
arch/i386/Makefile

index 3fbf4a8..6a08fcd 100644 (file)
@@ -110,8 +110,20 @@ docs/busybox.net/BusyBox.html: docs/busybox.pod
 syn_tgt = $(wildcard $(patsubst %,%/*.c,$(busybox-alldirs)))
 syn     = $(patsubst %.c, %.syn, $(syn_tgt))
 
+comma:= ,
+brace_open:= (
+brace_close:= )
+
+SYN_CPPFLAGS := $(strip $(CPPFLAGS) $(EXTRA_CPPFLAGS))
+SYN_CPPFLAGS := $(subst $(brace_open),\$(brace_open),$(SYN_CPPFLAGS))
+SYN_CPPFLAGS := $(subst $(brace_close),\$(brace_close),$(SYN_CPPFLAGS))
+#SYN_CPPFLAGS := $(subst ",\",$(SYN_CPPFLAGS))
+#")
+#SYN_CPPFLAGS := [$(patsubst %,'%'$(comma),$(SYN_CPPFLAGS))'']
+
 %.syn: %.c
-       synopsis --verbose --debug -p C -l Comments.SSDFilter,Comments.Previous $(INCS) -Wp,verbose=True,debug=True,preprocess=True,cppflags="'$(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) $(PROG_CFLAGS) $(PROG_LDFLAGS) $(CFLAGS_COMBINE) $(APPLETS_DEFINE) $(BUSYBOX_DEFINE)'" -o $@ $<
+       $(warning fla='$(SYN_CPPFLAGS)')
+       synopsis -p C -l Comments.SSDFilter,Comments.Previous -Wp,preprocess=True,cppflags="'$(SYN_CPPFLAGS)'" -o $@ $<
 
 .PHONY: html
 html: $(syn)
index 0c680f9..bb5cef0 100644 (file)
@@ -13,7 +13,9 @@ CPPFLAGS += \
        -include include/autoconf.h \
        -D_GNU_SOURCE -DNDEBUG \
        $(if $(CONFIG_LFS),-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) \
-       -D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP \
+       -D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP
+
+CFLAGS += \
        -Wall -Wstrict-prototypes -Wshadow -Werror -Wundef \
        -funsigned-char -fno-builtin-strlen -finline-limit=0 -static-libgcc \
        -Os -falign-functions=1 -falign-jumps=1 -falign-loops=1 \
index 0a23592..595868e 100644 (file)
@@ -2,4 +2,4 @@
 # Build system
 # ==========================================================================
 
-CPPFLAGS += -march=i386 -mpreferred-stack-boundary=2
+CFLAGS += -march=i386 -mpreferred-stack-boundary=2