aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-21 13:48:38 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-21 13:48:38 +0000
commitddfa2f3cef3e9bcf25a8f5d584d3978d7c63d58b (patch)
tree093367475c09888cec22d9bf0c6250d8d7c6d31c /utils
parentdf2fb5546e93ad7828028a04afad1f821cf04f9f (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.1@207684 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile35
1 files changed, 9 insertions, 26 deletions
diff --git a/utils/Makefile b/utils/Makefile
index 13eb8749b..78aef2264 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -32,6 +32,8 @@ UTILS:=$(ALL_UTILS)
LIBS += $(BKTR_LIB) # astobj2 with devmode uses backtrace
+_ASTCFLAGS+=-DSTANDALONE
+
include $(ASTTOPDIR)/Makefile.rules
ifeq ($(OSARCH),SunOS)
@@ -90,30 +92,24 @@ clean:
md5.c: $(ASTTOPDIR)/main/md5.c
@cp $< $@
-md5.o: ASTCFLAGS+=-DSTANDALONE
astman: astman.o md5.o
astman: LIBS+=$(NEWT_LIB)
-astman.o: ASTCFLAGS+=-DNO_MALLOC_DEBUG -DSTANDALONE
+astman.o: _ASTCFLAGS+=-DNO_MALLOC_DEBUG
stereorize: stereorize.o frame.o
stereorize: LIBS+=-lm
hashtab.c: $(ASTTOPDIR)/main/hashtab.c
@cp "$<" "$@"
-hashtab.o: ASTCFLAGS+=-DSTANDALONE
-
strcompat.c: $(ASTTOPDIR)/main/strcompat.c
@cp "$<" "$@"
-strcompat.o: ASTCFLAGS+=-DSTANDALONE
pval.c: $(ASTTOPDIR)/res/ael/pval.c
@cp "$<" "$@"
-pval.o : ASTCFLAGS+=-DSTANDALONE
ast_expr2.c: $(ASTTOPDIR)/main/ast_expr2.c
@cp "$<" "$@"
-ast_expr2.o: ASTCFLAGS+=-DSTANDALONE
ast_expr2.h: $(ASTTOPDIR)/main/ast_expr2.h
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
@@ -121,25 +117,21 @@ ast_expr2.h: $(ASTTOPDIR)/main/ast_expr2.h
ast_expr2f.c: $(ASTTOPDIR)/main/ast_expr2f.c
@cp "$<" "$@"
-ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE -I$(ASTTOPDIR)/main -Wno-unused
+ast_expr2f.o: _ASTCFLAGS+=-I$(ASTTOPDIR)/main -Wno-unused
check_expr: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o threadstorage.o clicompat.o
-check_expr.o: ASTCFLAGS+=-DSTANDALONE
aelbison.c: $(ASTTOPDIR)/res/ael/ael.tab.c
@cp "$<" "$@"
-aelbison.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res/ael -DYYENABLE_NLS=0 -DSTANDALONE
+aelbison.o: _ASTCFLAGS+=-I$(ASTTOPDIR)/res/ael -DYYENABLE_NLS=0
pbx_ael.c: $(ASTTOPDIR)/pbx/pbx_ael.c
@cp "$<" "$@"
-pbx_ael.o: ASTCFLAGS+=-DSTANDALONE
aelparse.c: $(ASTTOPDIR)/res/ael/ael_lex.c
@cp "$<" "$@"
-ael_main.o: ASTCFLAGS+=-DSTANDALONE
-
-aelparse.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res -DSTANDALONE -Wno-unused
+aelparse.o: _ASTCFLAGS+=-I$(ASTTOPDIR)/res -Wno-unused
aelparse: LIBS+=-lm
aelparse: aelparse.o aelbison.o pbx_ael.o hashtab.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o
@@ -149,33 +141,26 @@ poll.o: ASTCFLAGS+=-DSTANDALONE
astobj2.c: $(ASTTOPDIR)/main/astobj2.c
@cp "$<" "$@"
-astobj2.o: ASTCFLAGS+=-DSTANDALONE
utils.c: $(ASTTOPDIR)/main/utils.c
@cp "$<" "$@"
-utils.o: ASTCFLAGS+=-DSTANDALONE
sha1.c: $(ASTTOPDIR)/main/sha1.c
@cp "$<" "$@"
-sha1.o: ASTCFLAGS+=-DSTANDALONE
threadstorage.c: $(ASTTOPDIR)/main/threadstorage.c
@cp "$<" "$@"
-threadstorage.o: ASTCFLAGS+=-DSTANDALONE
-hashtest2.o: ASTCFLAGS+=-O0 -DSTANDALONE
+hashtest2.o: _ASTCFLAGS+=-O0
hashtest2: hashtest2.o md5.o utils.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o
hashtest: hashtest.o md5.o hashtab.o utils.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o
-hashtest.o: ASTCFLAGS+=-O0 -DSTANDALONE
+hashtest.o: _ASTCFLAGS+=-O0
refcounter: refcounter.o md5.o hashtab.o utils.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o
-refcounter.o: ASTCFLAGS+=-O0 -DSTANDALONE
+refcounter.o: _ASTCFLAGS+=-O0
extconf.o: extconf.c
-extconf.o: ASTCFLAGS+=-DSTANDALONE
-
-conf2ael.o: ASTCFLAGS+=-DSTANDALONE
conf2ael: conf2ael.o ast_expr2f.o ast_expr2.o hashtab.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o
@@ -190,8 +175,6 @@ check_expr2: $(ASTTOPDIR)/main/ast_expr2f.c $(ASTTOPDIR)/main/ast_expr2.c $(ASTT
rm ast_expr2z.o ast_expr2fz.o
./check_expr2 expr2.testinput
-smsq.o: ASTCFLAGS+=-DSTANDALONE
-
smsq: smsq.o strcompat.o
smsq: LIBS+=$(POPT_LIB)