diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-07-21 13:56:35 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-07-21 13:56:35 +0000 |
commit | 57cd49abc319e8e0893a8795b15f0ad413e2fae1 (patch) | |
tree | 33be8545ecd5c542ec9ed8e397cec4b7ec9a7ed2 /main | |
parent | 6b9dcedfcdd58920804d9319d9564eabafce1228 (diff) |
Merged revisions 207680 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r207680 | kpfleming | 2009-07-21 08:28:04 -0500 (Tue, 21 Jul 2009) | 18 lines
Merged revisions 207647 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines
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.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@207685 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/Makefile | 12 | ||||
-rw-r--r-- | main/db1-ast/Makefile | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/main/Makefile b/main/Makefile index d7126320d..17aa6e173 100644 --- a/main/Makefile +++ b/main/Makefile @@ -106,11 +106,11 @@ endif CHECK_SUBDIR: # do nothing, just make sure that we recurse in the subdir/ editline/libedit.a: CHECK_SUBDIR - 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)" ./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: CHECK_SUBDIR - CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a + CFLAGS="$(subst $(ASTTOPDIR),../../,$(_ASTCFLAGS) $(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a ast_expr2.c ast_expr2.h: bison -o $@ -d --name-prefix=ast_yy ast_expr2.y @@ -123,7 +123,7 @@ ast_expr2f.c: cat $@.fix >> $@ rm $@.fix -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 @@ -132,10 +132,10 @@ testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h rm ast_expr2.o ast_expr2f.o ifneq ($(findstring ENABLE_UPLOADS,$(MENUSELECT_CFLAGS)),) -http.o: ASTCFLAGS+=$(GMIME_INCLUDE) +http.o: _ASTCFLAGS+=$(GMIME_INCLUDE) endif -stdtime/localtime.o: ASTCFLAGS+=$(AST_NO_STRICT_OVERFLOW) -Wno-format-nonliteral +stdtime/localtime.o: _ASTCFLAGS+=$(AST_NO_STRICT_OVERFLOW) -Wno-format-nonliteral AST_EMBED_LDSCRIPTS:=$(sort $(EMBED_LDSCRIPTS)) AST_EMBED_LDFLAGS:=$(foreach dep,$(EMBED_LDFLAGS),$(value $(dep))) @@ -164,7 +164,7 @@ GMIMELDFLAGS+=$(GMIME_LIB) endif $(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) - @$(CC) -c -o buildinfo.o $(ASTCFLAGS) buildinfo.c + @$(CC) -c -o buildinfo.o $(_ASTCFLAGS) buildinfo.c $(ASTCFLAGS) $(ECHO_PREFIX) echo " [LD] $^ -> $@" ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),) $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $^ buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(GMIMELDFLAGS) diff --git a/main/db1-ast/Makefile b/main/db1-ast/Makefile index c9d29b369..a0f12e1c4 100644 --- a/main/db1-ast/Makefile +++ b/main/db1-ast/Makefile @@ -48,11 +48,11 @@ clean-depend: 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 |