diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-28 20:01:21 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-28 20:01:21 +0000 |
commit | 63cc27ace80a273b5c183decb10ca26019230b1f (patch) | |
tree | 94a3fc2d8afe760a93e732a57af1b8f082bc47c5 /Makefile | |
parent | 97c3f0762e601deeecec2511823c0df60c0a825b (diff) |
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/trunk@214696 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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) # libxml2 cflags _ASTCFLAGS+=$(LIBXML2_INCLUDE) |