aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-28 20:04:04 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-28 20:04:04 +0000
commit6d234c5dca64a4b673bd05fcccc71cb4f5fc88dc (patch)
tree66d4649cd12e17f046b9ab5b417ad297fd319955 /Makefile
parent44409c728cb9eba6836806e57e5994d19fa25f31 (diff)
Merged revisions 214696 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r214696 | kpfleming | 2009-08-28 15:01:21 -0500 (Fri, 28 Aug 2009) | 9 lines Ensure that CFLAGS and/or LDFLAGS provided to configure script are preserved. Cross-compilation environments want to provide 'defaults' for compiler and linker options, and frequently do this by specifying CFLAGS and LDFLAGS in the environment or as command-line arguments to the configure script. This patch modifies the configure script and Makefile to preserve these settings and ensure they are used in the build process. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@214697 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e80634868..913d03fbf 100644
--- a/Makefile
+++ b/Makefile
@@ -95,10 +95,17 @@ ifneq ($(wildcard makeopts),)
include makeopts
endif
+# start the primary CFLAGS and LDFLAGS with any that were provided
+# to the configure script
+_ASTCFLAGS:=$(CONFIG_CFLAGS)
+_ASTLDFLAGS:=$(CONFIG_LDFLAGS)
+
# Some build systems, such as the one in openwrt, like to pass custom target
-# CFLAGS and LDFLAGS in the COPTS and LDOPTS variables.
-ASTCFLAGS+=$(COPTS)
-ASTLDFLAGS+=$(LDOPTS)
+# CFLAGS and LDFLAGS in the COPTS and LDOPTS variables; these should also
+# go before any build-system computed flags, since they are defaults, not
+# overrides
+_ASTCFLAGS+=$(COPTS)
+_ASTLDFLAGS+=$(LDOPTS)
#Uncomment this to see all build commands instead of 'quiet' output
#NOISY_BUILD=yes