From 46f6981dc43e9b1b1bfba05c296b9388261b1c8f Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sun, 11 Mar 2007 07:36:49 +0000 Subject: [PATCH] core deps will now be configured along with the core configure, and will be static non-installed and linked only to the core. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4525 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- Makefile.am | 53 +++++++++++++++++++++++++++++++--------------------- configure.in | 8 ++++++++ 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/Makefile.am b/Makefile.am index 845d71cdb0..1fa5583505 100644 --- a/Makefile.am +++ b/Makefile.am @@ -75,21 +75,23 @@ CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/crypto/include CORE_CFLAGS += -I$(switch_srcdir)/libs/libresample/include CORE_CFLAGS += -I$(switch_srcdir)/libs/libteletone/src -CORE_LDFLAGS = $(shell $(switch_srcdir)/libs/apr/apr-1-config --link-ld --libs ) -CORE_LDFLAGS += $(shell $(switch_srcdir)/libs/apr-util/apu-1-config --link-ld --libs ) +CORE_LIBS = $(shell $(switch_srcdir)/libs/apr/apr-1-config --link-libtool ) +CORE_LIBS += $(shell $(switch_srcdir)/libs/apr-util/apu-1-config --link-libtool ) +CORE_LIBS += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la +CORE_LIBS += libs/srtp/libsrtp.la libs/libresample/libresample.la +CORE_LIBS += libs/libteletone/libteletone.la lib_LTLIBRARIES = libfreeswitch.la libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(AM_CFLAGS) -libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(CORE_LDFLAGS) $(AM_LDFLAGS) -libfreeswitch_la_LIBADD = -lteletone -lresample -lsrtp -lsqlite3 -lpcre +libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) +libfreeswitch_la_LIBADD = $(CORE_LIBS) nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h -$(libfreeswitch_la_SOURCES): depends version +$(libfreeswitch_la_SOURCES): deps MOD_LINK = $(BASE)/libfreeswitch.la CLEANFILES = src/include/switch_version.h -BUILT_SOURCES = version depends bin_PROGRAMS = freeswitch freeswitch_SOURCES = src/switch.c\ @@ -112,23 +114,32 @@ nodepends: .nodepends yesdepends: rm .nodepends -depends: - @echo making depends - @rm -f build/freeswitch.env - @./build/addenv.sh build/freeswitch.env PREFIX $(PREFIX) - @./build/addenv.sh build/freeswitch.env MAKE $(MAKE) - mkdir -p $(PREFIX) - ./build/buildlib.sh . install sqlite --prefix=$(PREFIX) --disable-tcl --enable-threadsafe - ./build/buildlib.sh . install apr --prefix=$(PREFIX) - ./build/buildlib.sh . install apr-util --with-apr=../apr --prefix=$(PREFIX) - ./build/buildlib.sh . install libresample --prefix=$(PREFIX) - ./build/buildlib.sh . install libteletone --prefix=$(PREFIX) - ./build/buildlib.sh . install srtp --prefix=$(PREFIX) - ./build/buildlib.sh . install pcre --prefix=$(PREFIX) - rm build/freeswitch.env +sqlite: + cd libs/sqlite && $(MAKE) +apr: + cd libs/apr && $(MAKE) -modules: $(NAME) +apr-util: + cd libs/apr-util && $(MAKE) + +pcre: + cd libs/pcre && $(MAKE) + +srtp: + cd libs/srtp && $(MAKE) + +resample: + cd libs/libresample && $(MAKE) + +teletone: + cd libs/libteletone && $(MAKE) + +deps: version sqlite apr apr-util pcre srtp resample teletone + +core: deps libfreeswitch.la + +modules: libfreeswitch.la @if [ ! -f $(PWD)/modules.conf ] ; then cp $(PWD)/modules.conf.in $(PWD)/modules.conf ; fi @echo making modules @rm -f build/freeswitch.env diff --git a/configure.in b/configure.in index 42b0f08e2a..cc71525654 100644 --- a/configure.in +++ b/configure.in @@ -276,4 +276,12 @@ AM_CONDITIONAL(ISLINUX, [test `uname -s` = Linux]) AM_CONDITIONAL(ISMAC, [test `uname -s` = Darwin]) AM_CONDITIONAL(IS64BITLINUX, [test `uname -m` = x86_64]) +# Run configure in all the subdirs +AC_CONFIG_SUBDIRS(libs/srtp) +AC_CONFIG_SUBDIRS(libs/sqlite) +AC_CONFIG_SUBDIRS(libs/libresample) +AC_CONFIG_SUBDIRS(libs/libteletone) +AC_CONFIG_SUBDIRS(libs/pcre) +AC_CONFIG_SUBDIRS(libs/apr) +AC_CONFIG_SUBDIRS(libs/apr-util) AC_OUTPUT([src/include/switch_version.h])