summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2006-09-29 18:54:21 +0000
committerKevin P. Fleming <kpfleming@digium.com>2006-09-29 18:54:21 +0000
commit89050169c8547cc6564741f0541583377d9a93d7 (patch)
tree90d8fe328a1e6371e95020100dad8cd49eb55be0 /Makefile
parentee4141c375981e803098f0831d6b7a6213e5835a (diff)
Merged revisions 43996-43997,44008,44011-44012 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r43996 | kpfleming | 2006-09-29 11:47:05 -0500 (Fri, 29 Sep 2006) | 2 lines another cross-compile fix ........ r43997 | kpfleming | 2006-09-29 11:52:27 -0500 (Fri, 29 Sep 2006) | 2 lines support --without-curl in configure script ........ r44008 | kpfleming | 2006-09-29 13:25:49 -0500 (Fri, 29 Sep 2006) | 2 lines don't abuse CFLAGS and LDFLAGS for build of Asterisk components, because they are also then used for non-Asterisk components (like menuselect); use our own variables instead ........ r44011 | kpfleming | 2006-09-29 13:40:17 -0500 (Fri, 29 Sep 2006) | 2 lines missed one conversion to ASTCFLAGS ........ r44012 | kpfleming | 2006-09-29 13:49:07 -0500 (Fri, 29 Sep 2006) | 2 lines yet another place where we were not using the correct CFLAGS by default ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile47
1 files changed, 37 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 064475280..b38133a72 100644
--- a/Makefile
+++ b/Makefile
@@ -13,14 +13,43 @@
# All Makefiles use the following variables:
#
-# LDFLAGS - linker flags (not libraries), used for all links
+# ASTCFLAGS - compiler options
+# ASTLDFLAGS - linker flags (not libraries)
# 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
#
-
-.EXPORT_ALL_VARIABLES:
+# Default values fo ASTCFLAGS and ASTLDFLAGS can be specified in the
+# environment when running make, as follows:
+#
+# $ ASTCFLAGS="-Werror" make
+
+export ASTTOPDIR
+export ASTERISKVERSION
+export ASTERISKVERSIONNUM
+export INSTALL_PATH
+export ASTETCDIR
+export ASTVARRUNDIR
+export MODULES_DIR
+export ASTSPOOLDIR
+export ASTVARLIBDIR
+export ASTDATADIR
+export ASTLOGDIR
+export AGI_DIR
+export ASTCONFPATH
+export NOISY_BUILD
+export MENUSELECT_CFLAGS
+export CC
+export CXX
+export AR
+export RANLIB
+export HOST_CC
+export STATIC_BUILD
+export INSTALL
+export DESTDIR
+export PROC
+export SOLINK
# even though we could use '-include makeopts' here, use a wildcard
# lookup anyway, so that make won't try to build makeopts if it doesn't
@@ -92,8 +121,6 @@ HTTP_DOCSDIR=/var/www/html
# Determine by a grep 'ScriptAlias' of your Apache httpd.conf file
HTTP_CGIDIR=/var/www/cgi-bin
-ASTCFLAGS=
-
# Uncomment this to use the older DSP routines
#ASTCFLAGS+=-DOLD_DSP_ROUTINES
@@ -275,10 +302,10 @@ $(SUBDIRS): depend makeopts.embed_rules
main: $(filter-out main,$(MOD_SUBDIRS))
$(MOD_SUBDIRS):
- @CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) --no-print-directory -C $@ SUBDIR=$@ all
+ @ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory -C $@ SUBDIR=$@ all
$(OTHER_SUBDIRS):
- @CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) --no-print-directory -C $@ SUBDIR=$@ all
+ @ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory -C $@ SUBDIR=$@ all
defaults.h: makeopts
@build_tools/make_defaults_h > $@.tmp
@@ -588,10 +615,10 @@ config:
fi
$(MOD_SUBDIRS_DEPEND):
- @CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) --no-print-directory -C $(@:-depend=) depend
+ @ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) --no-print-directory -C $(@:-depend=) depend
$(OTHER_SUBDIRS_DEPEND):
- @CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) --no-print-directory -C $(@:-depend=) depend
+ @ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) --no-print-directory -C $(@:-depend=) depend
depend: include/asterisk/version.h include/asterisk/buildopts.h defaults.h $(SUBDIRS_DEPEND)
@@ -646,7 +673,7 @@ menuselect: menuselect/menuselect menuselect-tree
-@menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
menuselect/menuselect: makeopts menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
- @unset CC LD AR RANLIB CFLAGS LDFLAGS && $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
+ @unset CC LD AR RANLIB && $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml
@echo "Generating input for menuselect ..."