[asterisk-commits] kpfleming: branch 1.4 r207647 - in /branches/1.4: ./ agi/ channels/ codecs/ c...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 21 08:04:48 CDT 2009


Author: kpfleming
Date: Tue Jul 21 08:04:44 2009
New Revision: 207647

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=207647
Log:
Ensure that user-provided CFLAGS and LDFLAGS are honored.

This commit changes the build system so that user-provided flags (in ASTCFLAGS
and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
by the build system itself, so that the user can effectively override the
build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
be provided *either* in the environment before running 'make', or as variable
assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
is no longer necessary, so they are no longer documented, but are still supported
so as not to break existing build systems that supply them when building Asterisk.


Modified:
    branches/1.4/Makefile
    branches/1.4/Makefile.moddir_rules
    branches/1.4/Makefile.rules
    branches/1.4/agi/Makefile
    branches/1.4/channels/Makefile
    branches/1.4/codecs/Makefile
    branches/1.4/codecs/gsm/Makefile
    branches/1.4/codecs/lpc10/Makefile
    branches/1.4/main/Makefile
    branches/1.4/main/db1-ast/Makefile
    branches/1.4/pbx/Makefile
    branches/1.4/res/Makefile
    branches/1.4/utils/Makefile

Modified: branches/1.4/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/Makefile?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Tue Jul 21 08:04:44 2009
@@ -13,18 +13,24 @@
 
 # All Makefiles use the following variables:
 #
-# ASTCFLAGS - compiler options
-# ASTLDFLAGS - linker flags (not libraries)
+# ASTCFLAGS - compiler options provided by the user (if any)
+# _ASTCFLAGS - compiler options provided by the build system
+# ASTLDFLAGS - linker flags (not libraries) provided by the user (if any)
+# _ASTLDFLAGS - linker flags (not libraries) provided by the build system
 # AST_LIBS - libraries to build binaries XXX
 # LIBS - additional libraries, at top-level for all links,
 #      on a single object just for that object
 # SOLINK - linker flags used only for creating shared objects (.so files),
 #      used for all .so links
 #
-# Default values fo ASTCFLAGS and ASTLDFLAGS can be specified in the
+# Values for ASTCFLAGS and ASTLDFLAGS can be specified in the
 # environment when running make, as follows:
 #
-# $ ASTCFLAGS="-Werror" make
+#	$ ASTCFLAGS="-Werror" make ...
+#
+# or as a variable value on the make command line itself:
+#
+#	$ make ASTCFLAGS="-Werror" ...
 
 export ASTTOPDIR
 export ASTERISKVERSION
@@ -150,7 +156,7 @@
 HTTP_CGIDIR=/var/www/cgi-bin
 
 # Uncomment this to use the older DSP routines
-#ASTCFLAGS+=-DOLD_DSP_ROUTINES
+#_ASTCFLAGS+=-DOLD_DSP_ROUTINES
 
 # If the file .asterisk.makeopts is present in your home directory, you can
 # include all of your favorite menuselect options so that every time you download
@@ -197,53 +203,53 @@
   endif
 endif
 
-ifeq ($(findstring -save-temps,$(ASTCFLAGS)),)
-ASTCFLAGS+=-pipe
-endif
-
-ASTCFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
+ifeq ($(findstring -save-temps,$(_ASTCFLAGS) $(ASTCFLAGS)),)
+_ASTCFLAGS+=-pipe
+endif
+
+_ASTCFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
 
 ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror
-  ASTCFLAGS+=-Wunused
-  ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
-  ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
-# ASTCFLAGS+=-Wundef 
-  ASTCFLAGS+=-Wformat -Wformat-security
-  ASTCFLAGS+=-Wmissing-format-attribute
-# ASTCFLAGS+=-Wformat=2
+  _ASTCFLAGS+=-Werror
+  _ASTCFLAGS+=-Wunused
+  _ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
+  _ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
+# _ASTCFLAGS+=-Wundef 
+  _ASTCFLAGS+=-Wformat -Wformat-security
+  _ASTCFLAGS+=-Wmissing-format-attribute
+# _ASTCFLAGS+=-Wformat=2
 endif
 
 ifneq ($(findstring BSD,$(OSARCH)),)
-  ASTCFLAGS+=-I/usr/local/include
-  ASTLDFLAGS+=-L/usr/local/lib
+  _ASTCFLAGS+=-I/usr/local/include
+  _ASTLDFLAGS+=-L/usr/local/lib
 endif
 
 ifneq ($(PROC),ultrasparc)
-  ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
+  _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
 endif
 
 ifeq ($(PROC),ppc)
-  ASTCFLAGS+=-fsigned-char
+  _ASTCFLAGS+=-fsigned-char
 endif
 
 ifeq ($(OSARCH),FreeBSD)
   # -V is understood by BSD Make, not by GNU make.
   BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
-  ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
+  _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
   AST_LIBS+=$(shell if test  $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
 endif
 
 ifeq ($(OSARCH),NetBSD)
-  ASTCFLAGS+=-pthread -I/usr/pkg/include
+  _ASTCFLAGS+=-pthread -I/usr/pkg/include
 endif
 
 ifeq ($(OSARCH),OpenBSD)
-  ASTCFLAGS+=-pthread
+  _ASTCFLAGS+=-pthread
 endif
 
 ifeq ($(OSARCH),SunOS)
-  ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include
+  _ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include
 endif
 
 ASTERISKVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .)
@@ -256,7 +262,7 @@
   ASTERISKVERSIONNUM=999999
 endif
 
-ASTCFLAGS+=$(MALLOC_DEBUG)$(BUSYDETECT)$(OPTIONS)
+_ASTCFLAGS+=$(BUSYDETECT)$(OPTIONS)
 
 MOD_SUBDIRS:=res channels pbx apps codecs formats cdr funcs main
 OTHER_SUBDIRS:=utils agi
@@ -271,7 +277,7 @@
 MOD_SUBDIRS_MENUSELECT_TREE:=$(MOD_SUBDIRS:%=%-menuselect-tree)
 
 ifneq ($(findstring darwin,$(OSARCH)),)
-  ASTCFLAGS+=-D__Darwin__
+  _ASTCFLAGS+=-D__Darwin__
   AUDIO_LIBS=-framework CoreAudio
   SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
 else
@@ -348,10 +354,10 @@
 main: $(filter-out main,$(MOD_SUBDIRS))
 
 $(MOD_SUBDIRS):
-	@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" AST_LIBS="$(AST_LIBS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
+	@_ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(_ASTCFLAGS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
 
 $(OTHER_SUBDIRS):
-	@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" AUDIO_LIBS="$(AUDIO_LIBS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
+	@_ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
 
 defaults.h: makeopts
 	@build_tools/make_defaults_h > $@.tmp
@@ -404,7 +410,7 @@
 	rm -f build_tools/menuselect-deps
 
 datafiles: _all
-	if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
+	if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
 # Should static HTTP be installed during make samples or even with its own target ala
 # webvoicemail?  There are portions here that *could* be customized but might also be
 # improved a lot.  I'll put it here for now.

Modified: branches/1.4/Makefile.moddir_rules
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/Makefile.moddir_rules?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/Makefile.moddir_rules (original)
+++ branches/1.4/Makefile.moddir_rules Tue Jul 21 08:04:44 2009
@@ -12,7 +12,7 @@
 #
 
 ifeq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
-  ASTCFLAGS+=${GC_CFLAGS}
+  _ASTCFLAGS+=${GC_CFLAGS}
 endif
 
 ifneq ($(findstring STATIC_BUILD,$(MENUSELECT_CFLAGS)),)
@@ -23,12 +23,12 @@
 
 comma:=,
 
-$(addsuffix .o,$(C_MODS)): ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
-$(addsuffix .oo,$(CC_MODS)): ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
+$(addsuffix .o,$(C_MODS)): _ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
+$(addsuffix .oo,$(CC_MODS)): _ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
 
-$(LOADABLE_MODS:%=%.so): ASTCFLAGS+=-fPIC
+$(LOADABLE_MODS:%=%.so): _ASTCFLAGS+=-fPIC
 $(LOADABLE_MODS:%=%.so): LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LIB))
-$(LOADABLE_MODS:%=%.so): ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))
+$(LOADABLE_MODS:%=%.so): _ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))
 
 $(addsuffix .so,$(filter $(LOADABLE_MODS),$(C_MODS))): %.so: %.o
 $(addsuffix .so,$(filter $(LOADABLE_MODS),$(CC_MODS))): %.so: %.oo

Modified: branches/1.4/Makefile.rules
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/Makefile.rules?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/Makefile.rules (original)
+++ branches/1.4/Makefile.rules Tue Jul 21 08:04:44 2009
@@ -38,26 +38,20 @@
 OPTIMIZE?=-O6
 
 ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
-    # More GSM codec optimization
-    # Uncomment to enable MMXTM optimizations for x86 architecture CPU's
-    # which support MMX instructions.  This should be newer pentiums,
-    # ppro's, etc, as well as the AMD K6 and K7.  
-    #K6OPT=-DK6OPT
-
-    ASTCFLAGS+=$(OPTIMIZE)
+    _ASTCFLAGS+=$(OPTIMIZE)
 endif
 
 # shortcuts for common combinations of flags; these must be recursively expanded so that
 # per-target settings will be applied
-CC_CFLAGS=$(PTHREAD_CFLAGS) $(ASTCFLAGS)
-CXX_CFLAGS=$(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(ASTCFLAGS))
+CC_CFLAGS=$(PTHREAD_CFLAGS) $(_ASTCFLAGS) $(ASTCFLAGS)
+CXX_CFLAGS=$(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(_ASTCFLAGS) $(ASTCFLAGS))
 
 ifeq ($(GNU_LD),1)
 SO_SUPPRESS_SYMBOLS=-Wl,--version-script,$(if $(wildcard $(subst .so,.exports,$@)),$(subst .so,.exports,$@),$(ASTTOPDIR)/default.exports)
 endif
 
-CC_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS)
-CXX_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS)
+CC_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS) $(ASTLDFLAGS)
+CXX_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS) $(ASTLDFLAGS)
 CC_LIBS=$(PTHREAD_LIBS) $(LIBS)
 CXX_LIBS=$(PTHREAD_LIBS) $(LIBS)
 
@@ -73,43 +67,43 @@
 %.o: %.s
 	$(ECHO_PREFIX) echo "   [AS] $< -> $@"
 ifeq ($(COMPILE_DOUBLE),yes)
-	$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
+	$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(OPTIMIZE) $(CC_CFLAGS)
 endif
 	$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
 
 %.o: %.i
 	$(ECHO_PREFIX) echo "   [CCi] $< -> $@"
 ifeq ($(COMPILE_DOUBLE),yes)
-	$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
+	$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(OPTIMIZE) $(CC_CFLAGS)
 endif
 	$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
 
 ifneq ($(COMPILE_DOUBLE),yes)
 %.o: %.c
 	$(ECHO_PREFIX) echo "   [CC] $< -> $@"
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(MAKE_DEPS)
+	$(CMD_PREFIX) $(CC) -o $@ -c $< $(MAKE_DEPS) $(CC_CFLAGS)
 endif
 
 %.i: %.c
 	$(ECHO_PREFIX) echo "   [CPP] $< -> $@"
-	$(CMD_PREFIX) $(CC) -o $@ -E $< $(CC_CFLAGS) $(MAKE_DEPS)
+	$(CMD_PREFIX) $(CC) -o $@ -E $< $(MAKE_DEPS) $(CC_CFLAGS)
 
 %.oo: %.ii
 	$(ECHO_PREFIX) echo "   [CXXi] $< -> $@"
 ifeq ($(COMPILE_DOUBLE),yes)
-	$(CMD_PREFIX) $(CXX) -o /dev/null -c $< $(CXX_CFLAGS) $(OPTIMIZE)
+	$(CMD_PREFIX) $(CXX) -o /dev/null -c $< $(OPTIMIZE) $(CXX_CFLAGS)
 endif
 	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS)
 
 ifneq ($(COMPILE_DOUBLE),yes)
 %.oo: %.cc
 	$(ECHO_PREFIX) echo "   [CXX] $< -> $@"
-	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) $(MAKE_DEPS)
+	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(MAKE_DEPS) $(CXX_CFLAGS)
 endif
 
 %.ii: %.cc
 	$(ECHO_PREFIX) echo "   [CPP] $< -> $@"
-	$(CMD_PREFIX) $(CXX) -o $@ -E $< $(CXX_CFLAGS) $(MAKE_DEPS)
+	$(CMD_PREFIX) $(CXX) -o $@ -E $< $(MAKE_DEPS) $(CXX_CFLAGS)
 
 %.c: %.y
 	$(ECHO_PREFIX) echo "   [BISON] $< -> $@"
@@ -129,6 +123,6 @@
 
 %: %.o
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
-	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $^ $(CXX_LIBS)
+	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $^ $(CXX_LIBS) $(ASTLDFLAGS)
 
 dist-clean:: clean

Modified: branches/1.4/agi/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/agi/Makefile?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/agi/Makefile (original)
+++ branches/1.4/agi/Makefile Tue Jul 21 08:04:44 2009
@@ -21,7 +21,7 @@
 
 include $(ASTTOPDIR)/Makefile.rules
 
-ASTCFLAGS+=-DSTANDALONE
+_ASTCFLAGS+=-DSTANDALONE
 
 all: $(AGIS)
 

Modified: branches/1.4/channels/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/channels/Makefile?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/channels/Makefile (original)
+++ branches/1.4/channels/Makefile Tue Jul 21 08:04:44 2009
@@ -107,19 +107,19 @@
 ifeq ($(OSARCH),linux-gnu)
 chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
-	$(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS)
+	$(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) $(ASTLDFLAGS)
 else
 chan_h323.so: chan_h323.o h323/libchanh323.a
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
-	$(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat
+	$(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat $(ASTLDFLAGS)
 endif
 
-chan_misdn.o: ASTCFLAGS+=-Imisdn
+chan_misdn.o: _ASTCFLAGS+=-Imisdn
 
-misdn_config.o: ASTCFLAGS+=-Imisdn
+misdn_config.o: _ASTCFLAGS+=-Imisdn
 
-misdn/isdn_lib.o: ASTCFLAGS+=-Wno-strict-aliasing
+misdn/isdn_lib.o: _ASTCFLAGS+=-Wno-strict-aliasing
 
-misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o: ASTCFLAGS+=$(MENUSELECT_OPTS_chan_misdn:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_chan_misdn),$(value $(dep)_INCLUDE))
+misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o: _ASTCFLAGS+=$(MENUSELECT_OPTS_chan_misdn:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_chan_misdn),$(value $(dep)_INCLUDE))
 
 $(if $(filter chan_misdn,$(EMBEDDED_MODS)),modules.link,chan_misdn.so): chan_misdn.o misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o

Modified: branches/1.4/codecs/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/codecs/Makefile?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/codecs/Makefile (original)
+++ branches/1.4/codecs/Makefile Tue Jul 21 08:04:44 2009
@@ -56,6 +56,6 @@
 $(if $(filter codec_lpc10,$(EMBEDDED_MODS)),modules.link,codec_lpc10.so): $(LIBLPC10)
 
 $(LIBILBC):
-	@$(MAKE) -C ilbc all ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations,$(ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"
+	@$(MAKE) -C ilbc all _ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations,$(_ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"
 
 $(if $(filter codec_ilbc,$(EMBEDDED_MODS)),modules.link,codec_ilbc.so): $(LIBILBC)

Modified: branches/1.4/codecs/gsm/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/codecs/gsm/Makefile?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/codecs/gsm/Makefile (original)
+++ branches/1.4/codecs/gsm/Makefile Tue Jul 21 08:04:44 2009
@@ -154,7 +154,7 @@
 DEBUG	= -DNDEBUG
 ######### Remove -DNDEBUG to enable assertions.
 
-ASTCFLAGS += $(PG) $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) \
+_ASTCFLAGS += $(PG) $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) \
 	$(LTP_CUT) $(WAV49) $(K6OPT) $(CCINC) -I$(INC)
 ######### It's $(CC) $(CFLAGS)
 

Modified: branches/1.4/codecs/lpc10/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/codecs/lpc10/Makefile?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/codecs/lpc10/Makefile (original)
+++ branches/1.4/codecs/lpc10/Makefile Tue Jul 21 08:04:44 2009
@@ -25,7 +25,7 @@
 
 # The code here generates lots of warnings, so compiling with -Werror
 # fails miserably. Remove it for the time being.
-ASTCFLAGS:= $(ASTCFLAGS:-Werror=)
+_ASTCFLAGS:=$(_ASTCFLAGS:-Werror=)
 
 #fix for PPC processors and ALPHA, And UltraSparc too
 ifneq ($(OSARCH),Darwin)

Modified: branches/1.4/main/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/main/Makefile?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/main/Makefile (original)
+++ branches/1.4/main/Makefile Tue Jul 21 08:04:44 2009
@@ -89,11 +89,11 @@
 endif
 
 editline/libedit.a:
-	cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(ASTCFLAGS:-Werror=))" LDFLAGS="$(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR)
+	cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(_ASTCFLAGS:-Werror=)) $(ASTCFLAGS)" LDFLAGS="$(_ASTLDFLAGS) $(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR)
 	$(MAKE) -C editline libedit.a
 
 db1-ast/libdb1.a:
-	CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a
+	CFLAGS="$(subst $(ASTTOPDIR),../../,$(_ASTCFLAGS)) $(ASTCFLAGS)" LDFLAGS="$(_ASTLDFLAGS) $(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a
 
 ast_expr2.c ast_expr2.h:
 	bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
@@ -103,7 +103,7 @@
 	sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' ast_expr2f.c > zz
 	mv zz ast_expr2f.c
 
-ast_expr2f.o: ASTCFLAGS+=-Wno-unused
+ast_expr2f.o: _ASTCFLAGS+=-Wno-unused
 
 testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
 	$(CC) -g -c -Iinclude -DSTANDALONE ast_expr2f.c
@@ -111,9 +111,9 @@
 	$(CC) -g -o testexpr2 ast_expr2f.o ast_expr2.o
 	rm ast_expr2.o ast_expr2f.o 
 
-asterisk.o channel.o: ASTCFLAGS+=$(ZAPTEL_INCLUDE) $(DAHDI_INCLUDE)
+asterisk.o channel.o: _ASTCFLAGS+=$(ZAPTEL_INCLUDE) $(DAHDI_INCLUDE)
 
-stdtime/localtime.o: ASTCFLAGS+=$(AST_NO_STRICT_OVERFLOW)
+stdtime/localtime.o: _ASTCFLAGS+=$(AST_NO_STRICT_OVERFLOW)
 
 AST_EMBED_LDSCRIPTS:=$(sort $(EMBED_LDSCRIPTS))
 AST_EMBED_LDFLAGS:=$(foreach dep,$(EMBED_LDFLAGS),$(value $(dep)))
@@ -133,12 +133,12 @@
 		mv $(ASTTOPDIR)/include/asterisk/build.h.tmp $(ASTTOPDIR)/include/asterisk/build.h ; \
 	fi
 	@rm -f $(ASTTOPDIR)/include/asterisk/build.h.tmp
-	@$(CC) -c -o buildinfo.o $(ASTCFLAGS) buildinfo.c
+	@$(CC) -c -o buildinfo.o $(_ASTCFLAGS) buildinfo.c $(ASTCFLAGS)
 	$(ECHO_PREFIX) echo "   [LD] $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) -> $@"
 ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),)
-	$(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS)
+	$(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(ASTLDFLAGS)
 else
-	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS)
+	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(ASTLDFLAGS)
 endif
 
 clean::

Modified: branches/1.4/main/db1-ast/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/main/db1-ast/Makefile?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/main/db1-ast/Makefile (original)
+++ branches/1.4/main/db1-ast/Makefile Tue Jul 21 08:04:44 2009
@@ -48,11 +48,11 @@
 clean:
 	rm -f $(LIBDB) $(LIBDBSO) $(OBJS) $(SHOBJS) */*.s */*.i
 
-ASTCFLAGS:=-Wall -D__DBINTERFACE_PRIVATE -I. -I.. -Iinclude -Ihash -Ibtree -Irecno $(ASTCFLAGS)
+_ASTCFLAGS:=-Wall -D__DBINTERFACE_PRIVATE -I. -I.. -Iinclude -Ihash -Ibtree -Irecno $(_ASTCFLAGS)
 
 OSTYPE=$(shell uname -s)
 ifeq ($(OSTYPE),SunOS)
-ASTCFLAGS+=-I../../include -I../../include/solaris-compat -DSOLARIS
+_ASTCFLAGS+=-I../../include -I../../include/solaris-compat -DSOLARIS
 endif
 
 db_dump185.o: db_dump185.c

Modified: branches/1.4/pbx/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/pbx/Makefile?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/pbx/Makefile (original)
+++ branches/1.4/pbx/Makefile Tue Jul 21 08:04:44 2009
@@ -35,12 +35,12 @@
 	rm -f ael/*.o ael/*.i
 
 ael/ael_lex.o: ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h
-ael/ael_lex.o: ASTCFLAGS+=-I. -Wno-unused
+ael/ael_lex.o: _ASTCFLAGS+=-I. -Wno-unused
 
 ael/ael.tab.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h
-ael/ael.tab.o: ASTCFLAGS+=-I.
+ael/ael.tab.o: _ASTCFLAGS+=-I.
 
-ael/ael.tab.o ael/ael_lex.o: ASTCFLAGS+=$(MENUSELECT_OPTS_pbx_ael:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_pbx_ael),$(value $(dep)_INCLUDE))
+ael/ael.tab.o ael/ael_lex.o: _ASTCFLAGS+=$(MENUSELECT_OPTS_pbx_ael:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_pbx_ael),$(value $(dep)_INCLUDE))
 
 $(if $(filter pbx_ael,$(EMBEDDED_MODS)),modules.link,pbx_ael.so): ael/ael.tab.o ael/ael_lex.o
 
@@ -52,10 +52,10 @@
 	(cd ael; bison -v -d ael.y)
 
 dundi-parser.o: dundi-parser.h
-dundi-parser.o: ASTCFLAGS+=-I.
+dundi-parser.o: _ASTCFLAGS+=-I.
 
-dundi-parser.o: ASTCFLAGS+=$(MENUSELECT_OPTS_pbx_dundi:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_pbx_dundi),$(value $(dep)_INCLUDE))
+dundi-parser.o: _ASTCFLAGS+=$(MENUSELECT_OPTS_pbx_dundi:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_pbx_dundi),$(value $(dep)_INCLUDE))
 
 $(if $(filter pbx_dundi,$(EMBEDDED_MODS)),modules.link,pbx_dundi.so): dundi-parser.o
 
-pbx_gtkconsole.o: ASTCFLAGS+=-Wno-strict-prototypes
+pbx_gtkconsole.o: _ASTCFLAGS+=-Wno-strict-prototypes

Modified: branches/1.4/res/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/res/Makefile?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/res/Makefile (original)
+++ branches/1.4/res/Makefile Tue Jul 21 08:04:44 2009
@@ -31,7 +31,7 @@
 
 include $(ASTTOPDIR)/Makefile.moddir_rules
 
-snmp/agent.o: ASTCFLAGS+=$(MENUSELECT_OPTS_res_snmp:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_res_snmp),$(value $(dep)_INCLUDE))
+snmp/agent.o: _ASTCFLAGS+=$(MENUSELECT_OPTS_res_snmp:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_res_snmp),$(value $(dep)_INCLUDE))
 
 $(if $(filter res_snmp,$(EMBEDDED_MODS)),modules.link,res_snmp.so): snmp/agent.o
 

Modified: branches/1.4/utils/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/utils/Makefile?view=diff&rev=207647&r1=207646&r2=207647
==============================================================================
--- branches/1.4/utils/Makefile (original)
+++ branches/1.4/utils/Makefile Tue Jul 21 08:04:44 2009
@@ -75,7 +75,7 @@
 
 astman: astman.o md5.o
 astman: LIBS+=$(NEWT_LIB)
-astman.o: ASTCFLAGS+=-DNO_MALLOC_DEBUG -DSTANDALONE
+astman.o: _ASTCFLAGS+=-DNO_MALLOC_DEBUG -DSTANDALONE
 
 stereorize: stereorize.o frame.o
 stereorize: LIBS+=-lm
@@ -94,12 +94,12 @@
 ast_expr2.c: ../main/ast_expr2.c
 	@cp $< $@
 
-ast_expr2.o: ASTCFLAGS+=-DSTANDALONE_AEL
+ast_expr2.o: _ASTCFLAGS+=-DSTANDALONE_AEL
 
 ast_expr2f.c: ../main/ast_expr2f.c
 	@cp $< $@
 
-ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE_AEL -I../main -Wno-unused
+ast_expr2f.o: _ASTCFLAGS+=-DSTANDALONE_AEL -I../main -Wno-unused
 
 check_expr: check_expr.o ast_expr2.o ast_expr2f.o
 
@@ -110,19 +110,19 @@
 aelbison.c: ../pbx/ael/ael.tab.c
 	@cp $< $@
 aelbison.o: aelbison.c ../pbx/ael/ael.tab.h ../include/asterisk/ael_structs.h
-aelbison.o: ASTCFLAGS+=-I../pbx -DSTANDALONE_AEL
+aelbison.o: _ASTCFLAGS+=-I../pbx -DSTANDALONE_AEL
 
 pbx_ael.c: ../pbx/pbx_ael.c
 	@cp $< $@
-pbx_ael.o: ASTCFLAGS+=-DSTANDALONE_AEL
+pbx_ael.o: _ASTCFLAGS+=-DSTANDALONE_AEL
 
 ael_main.o: ael_main.c ../include/asterisk/ael_structs.h
-ael_main.o: ASTCFLAGS+=-DSTANDALONE_AEL
+ael_main.o: _ASTCFLAGS+=-DSTANDALONE_AEL
 
 aelparse.c: ../pbx/ael/ael_lex.c
 	@cp $< $@
 aelparse.o: aelparse.c ../include/asterisk/ael_structs.h ../pbx/ael/ael.tab.h
-aelparse.o: ASTCFLAGS+=-I../pbx -DSTANDALONE_AEL -Wno-unused
+aelparse.o: _ASTCFLAGS+=-I../pbx -DSTANDALONE_AEL -Wno-unused
 
 aelparse: aelparse.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o
 




More information about the asterisk-commits mailing list