pass configure args/vars to sub-configure commands run from module makefiles

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15718 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2009-11-30 14:23:09 +00:00
parent 59ba5a156c
commit 7c255937c3
8 changed files with 21 additions and 22 deletions

View File

@ -3,6 +3,10 @@
switch_builddir=@switch_builddir@
switch_srcdir=@switch_srcdir@
build=@build@
host=@host@
target=$(host)
CC=@CC@
CXX=@CXX@
AWK=@AWK@
@ -37,11 +41,15 @@ DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@
LIBTOOL_LIB_EXTEN = @LIBTOOL_LIB_EXTEN@
SOLINK = @SOLINK@
CFLAGS=@CFLAGS@
LDFLAGS=@SWITCH_AM_LDFLAGS@ @LDFLAGS@ $(OUR_LDFLAGS)
ALL_CFLAGS = $(LOCAL_CFLAGS) $(MOD_CFLAGS) @SWITCH_AM_CFLAGS@ @CFLAGS@ -D_GNU_SOURCE $(OUR_CFLAGS)
ALL_CXXFLAGS = $(LOCAL_CFLAGS) $(MOD_CFLAGS) @SWITCH_AM_CXXFLAGS@ @CXXFLAGS@ -D_GNU_SOURCE $(OUR_CFLAGS)
DEFAULT_ARGS:= --build=$(build) --host=$(host) --target=$(target) --prefix=$(PREFIX) --disable-shared --with-pic
DEFAULT_VARS:= CFLAGS="$(ALL_CFLAGS)" CPPFLAGS="$(ALL_CXXFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
COMPILE = $(CC) $(ALL_CFLAGS) $(DEFS)
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(COMPILE)
LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(ALL_CFLAGS) $(LDFLAGS) -shared -module -avoid-version -rpath $(MODINSTDIR) -o $@

View File

@ -11,15 +11,13 @@ LOCAL_LIBADD=$(JSONLA)
include $(BASE)/build/modmake.rules
DEFAULT_ARGS=--prefix=$(PREFIX) --disable-shared --with-pic
$(LOCAL_OBJS): $(LOCAL_SOURCES)
$(JSON_DIR):
$(GETLIB) $(json-c).tar.gz
$(JSON_DIR)/Makefile: $(JSON_DIR)
cd $(JSON_DIR) && CFLAGS=$(AM_CFLAGS) CC=$(CC) CXX=$(CXX) ./configure --disable-shared --with-pic CPPFLAGS= LDFLAGS=
cd $(JSON_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS) CPPFLAGS= LDFLAGS=
$(TOUCH_TARGET)
$(JSONLA): $(JSON_DIR)/Makefile

View File

@ -12,15 +12,13 @@ LOCAL_LIBADD=$(MEMCACHEDLA)
include $(switch_srcdir)/build/modmake.rules
DEFAULT_ARGS=--prefix=$(PREFIX) --disable-shared --with-pic
$(LOCAL_OBJS): $(LOCAL_SOURCES)
$(MEMCACHED_DIR):
$(GETLIB) $(MEMCACHED).tar.gz
$(MEMCACHED_DIR)/Makefile: $(MEMCACHED_DIR)
cd $(MEMCACHED_DIR) && CFLAGS=$(AM_CFLAGS) CC=$(CC) CXX=$(CXX) ./configure --disable-shared --with-pic --with-memcached=no CPPFLAGS= LDFLAGS=
cd $(MEMCACHED_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS) --with-memcached=no CPPFLAGS= LDFLAGS=
$(TOUCH_TARGET)
$(MEMCACHEDLA): $(MEMCACHED_DIR)/Makefile

View File

@ -5,13 +5,12 @@ LA=$(DIRECTORY)/source/SoundTouch/.libs/libSoundTouch.a
BASE=../../../..
LOCAL_CFLAGS += -I$(DIRECTORY)/include -DINTEGER_SAMPLES
LOCAL_LIBADD=$(LA)
DEFAULT_ARGS=--prefix=$(PREFIX) --disable-shared --with-pic
include $(BASE)/build/modmake.rules
$(DIRECTORY)/Makefile $(DIRECTORY)/config.status:
$(GETLIB) $(VERSION).tar.gz
cd $(DIRECTORY) && ./configure $(DEFAULT_ARGS) --enable-integer-samples
cd $(DIRECTORY) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS) --enable-integer-samples
$(TOUCH_TARGET)
$(LA): $(DIRECTORY)/Makefile $(DIRECTORY)/config.status

View File

@ -8,16 +8,15 @@ LIBLBERLA=$(LDAP_DIR)/libraries/liblber/liblber.la
LOCAL_CFLAGS=-DWITH_OPENLDAP -DLDAP_DEPRECATED -I$(LDAP_DIR)/include
DEFAULT_ARGS= --prefix=$(PREFIX) --disable-shared --with-pic --disable-slapd
DEFAULT_ARGS+= --disable-bdb --disable-hdb
LOCAL_LIBADD=$(LDAPLA) $(LIBLBERLA)
include $(switch_srcdir)/build/modmake.rules
DEFAULT_ARGS+= --disable-slapd --disable-bdb --disable-hdb
$(LDAP_DIR):
$(GETLIB) $(LDAP).tar.gz
cd $(LDAP_DIR) && CFLAGS="`echo $(CFLAGS) | sed -e 's:-std=c99::'`" ./configure $(DEFAULT_ARGS)
cd $(LDAP_DIR) && $(DEFAULT_VARS) CFLAGS="`echo $(CFLAGS) | sed -e 's:-std=c99::'`" ./configure $(DEFAULT_ARGS)
$(LDAPLA) $(LIBLBERLA): $(LDAP_DIR)
cd $(LDAP_DIR) && $(MAKE)

View File

@ -22,15 +22,13 @@ LOCAL_SOURCES=$(MP3SOURCES)
include $(switch_srcdir)/build/modmake.rules
DEFAULT_ARGS=--prefix=$(PREFIX) --disable-shared --with-pic
$(LOCAL_OBJS): $(LOCAL_SOURCES)
$(MPG123_DIR):
$(GETLIB) $(MPG123).tar.gz
$(MPG123_DIR)/Makefile: $(MPG123_DIR)
cd $(MPG123_DIR) && CFLAGS=$(AM_CFLAGS) CC=$(CC) CXX=$(CXX) ./configure --disable-shared --with-pic CPPFLAGS= LDFLAGS=
cd $(MPG123_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS) CPPFLAGS= LDFLAGS=
$(TOUCH_TARGET)
$(MPG123LA): $(MPG123_DIR)/Makefile
@ -41,7 +39,7 @@ $(LAME_DIR):
$(GETLIB) $(LAME).tar.gz
$(LAME_DIR)/Makefile: $(LAME_DIR)
cd $(LAME_DIR) && CC=$(CC) CXX=$(CXX) ./configure $(DEFAULT_ARGS) --disable-decoder CPPFLAGS= LDFLAGS=
cd $(LAME_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS) --disable-decoder CPPFLAGS= LDFLAGS=
$(TOUCH_TARGET)
$(LAMELA): $(LAME_DIR)/Makefile
@ -52,7 +50,7 @@ $(SHOUT_DIR):
$(GETLIB) $(SHOUT).tar.gz
$(SHOUT_DIR)/Makefile: $(SHOUT_DIR)
cd $(SHOUT_DIR) && CC=$(CC) CXX=$(CXX) ./configure $(DEFAULT_ARGS) --without-speex --without-vorbis --without-ogg CPPFLAGS= LDFLAGS=
cd $(SHOUT_DIR) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS) --without-speex --without-vorbis --without-ogg CPPFLAGS= LDFLAGS=
$(TOUCH_TARGET)
$(SHOUTLA): $(SHOUT_DIR)/Makefile

View File

@ -10,7 +10,7 @@ include $(BASE)/build/modmake.rules
local_depend: $(LIBYAML_A)
$(LIBYAML_A):
cd $(YAMLLIB) && ./configure $(DEFAULT_ARGS) --disable-shared --with-pic
cd $(YAMLLIB) && $(DEFAULT_VARS) ./configure $(DEFAULT_ARGS)
cd $(YAMLLIB) && $(MAKE)
yamlclean:

View File

@ -9,16 +9,15 @@ LIBLUTILA=$(LDAP_DIR)/libraries/liblutil/liblutil.a
LOCAL_CFLAGS=-DWITH_OPENLDAP -DLDAP_DEPRECATED -I$(LDAP_DIR)/include
DEFAULT_ARGS= --prefix=$(PREFIX) --disable-shared --with-pic --disable-slapd
DEFAULT_ARGS+= --disable-slurpd --disable-relay --disable-bdb --disable-hdb
LOCAL_LIBADD=$(LDAPLA) $(LIBLBERLA) $(LIBLUTILA)
include $(switch_srcdir)/build/modmake.rules
DEFAULT_ARGS+= --disable-slapd --disable-slurpd --disable-relay --disable-bdb --disable-hdb
$(LDAP_DIR):
$(GETLIB) $(LDAP).tar.gz
cd $(LDAP_DIR) && CFLAGS="`echo $(CFLAGS) | sed -e 's:-std=c99::'`" ./configure $(DEFAULT_ARGS)
cd $(LDAP_DIR) && $(DEFAULT_VARS) CFLAGS="`echo $(CFLAGS) | sed -e 's:-std=c99::'`" ./configure $(DEFAULT_ARGS)
$(LIBLUTILA) $(LDAPLA) $(LIBLBERLA): $(LDAP_DIR)
cd $(LDAP_DIR) && $(MAKE)