From 048ce8d1f339a5558b2074553dafb54cf2143546 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 14 Mar 2014 23:13:34 -0400 Subject: [PATCH] FS-6293: srcdir builds, most of the built in mods work now --- Makefile.am | 2 +- build/Makefile.am | 4 ++-- libs/spandsp/configure.ac | 2 +- src/mod/applications/mod_hash/Makefile.am | 8 ++------ src/mod/applications/mod_spandsp/Makefile.am | 4 ++-- src/mod/languages/mod_lua/Makefile.am | 9 +++++---- 6 files changed, 13 insertions(+), 16 deletions(-) diff --git a/Makefile.am b/Makefile.am index d9637744cd..ff6c3d51bb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -731,7 +731,7 @@ cluecon: @clear @echo Thank you for updating. This is going to take a while so relax. @echo Now would be a good time to register for ClueCon! - @cat cluecon2.tmpl + @cat $(switch_srcdir)/cluecon2.tmpl @echo @echo http://www.cluecon.com @sleep 5 diff --git a/build/Makefile.am b/build/Makefile.am index 6eaf809ddd..7732fbcc29 100644 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -11,7 +11,7 @@ all: @echo " + http://www.cluecon.com +" @echo " + +" @echo " +-----------------------------------------------+" - @cat ../cluecon2.tmpl + @cat $(switch_srcdir)/cluecon2.tmpl install: @echo " +---------- FreeSWITCH install Complete ----------+" @@ -70,7 +70,7 @@ install: @echo " + http://www.cluecon.com +" @echo " + +" @echo " +-------------------------------------------------+" - @cat ../cluecon2.tmpl + @cat $(switch_srcdir)/cluecon2.tmpl @sh modcheck.sh $(modulesdir) .PHONY: check dvi html info install-data \ diff --git a/libs/spandsp/configure.ac b/libs/spandsp/configure.ac index 1810e07fe2..412526fb0f 100644 --- a/libs/spandsp/configure.ac +++ b/libs/spandsp/configure.ac @@ -542,7 +542,7 @@ case "$host" in esac if test "$enable_builtin_tiff" = "yes" ; then - abs_tiffdir="`cd $srcdir/../tiff-4.0.2/ && pwd`" + abs_tiffdir="`cd ../tiff-4.0.2/ && pwd`" save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -I$abs_tiffdir/libtiff" AC_CHECK_HEADERS([tiffio.h]) diff --git a/src/mod/applications/mod_hash/Makefile.am b/src/mod/applications/mod_hash/Makefile.am index e21dacadfa..f1bbb6eab5 100644 --- a/src/mod/applications/mod_hash/Makefile.am +++ b/src/mod/applications/mod_hash/Makefile.am @@ -4,11 +4,7 @@ MODNAME=mod_hash ESL_DIR=$(switch_srcdir)/libs/esl mod_LTLIBRARIES = mod_hash.la -mod_hash_la_DEPENDENCIES = $(ESL_DIR)/libesl.so -mod_hash_la_SOURCES = mod_hash.c +mod_hash_la_SOURCES = mod_hash.c ../../../../libs/esl/src/esl.c ../../../../libs/esl/src/esl_json.c ../../../../libs/esl/src/esl_event.c ../../../../libs/esl/src/esl_threadmutex.c ../../../../libs/esl/src/esl_config.c ../../../../libs/esl/src/esl_buffer.c mod_hash_la_CFLAGS = $(AM_CFLAGS) -I$(ESL_DIR)/src/include mod_hash_la_LIBADD = $(switch_builddir)/libfreeswitch.la -mod_hash_la_LDFLAGS = -avoid-version -module -no-undefined -shared -L$(ESL_DIR) -lesl - -$(ESL_DIR)/libesl.so: - cd $(ESL_DIR) && $(MAKE) -j1 +mod_hash_la_LDFLAGS = -avoid-version -module -no-undefined -shared diff --git a/src/mod/applications/mod_spandsp/Makefile.am b/src/mod/applications/mod_spandsp/Makefile.am index 0c78e46367..41c423aa0c 100644 --- a/src/mod/applications/mod_spandsp/Makefile.am +++ b/src/mod/applications/mod_spandsp/Makefile.am @@ -11,12 +11,12 @@ SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libspandsp.la mod_LTLIBRARIES = mod_spandsp.la mod_spandsp_la_SOURCES = mod_spandsp.c udptl.c mod_spandsp_fax.c mod_spandsp_dsp.c mod_spandsp_codecs.c mod_spandsp_modem.c -mod_spandsp_la_CFLAGS = $(BUILD_CFLAGS) $(AM_CFLAGS) -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I. +mod_spandsp_la_CFLAGS = $(BUILD_CFLAGS) $(AM_CFLAGS) -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(TIFF_BUILDDIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I. mod_spandsp_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA) $(TIFF_LA) $(SPANDSP_LA_JBIG) $(SPANDSP_LA_LZMA) -ljpeg -lz -lutil mod_spandsp_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(SPANDSP_LA): $(TIFF_LA) $(SPANDSP_DIR) $(SPANDSP_DIR)/.update - cd $(SPANDSP_BUILDDIR) && $(MAKE) -j1 + cd $(SPANDSP_BUILDDIR) && $(MAKE) -j1 CFLAGS="-I$(TIFF_BUILDDIR)/libtiff" $(TOUCH_TARGET) $(TIFF_LA): $(TIFF_DIR) $(TIFF_DIR)/.update diff --git a/src/mod/languages/mod_lua/Makefile.am b/src/mod/languages/mod_lua/Makefile.am index 805b52cb69..78b33953cc 100644 --- a/src/mod/languages/mod_lua/Makefile.am +++ b/src/mod/languages/mod_lua/Makefile.am @@ -3,12 +3,13 @@ include $(top_srcdir)/build/modmake.rulesam MODNAME=mod_lua -LIBLUA_A=lua/liblua.a +LUA_DIR=$(switch_srcdir)/src/mod/languages/mod_lua/lua +LIBLUA_A=$(LUA_DIR)/liblua.a AM_CFLAGS += $(CFLAGS) -D_GNU_SOURCE mod_LTLIBRARIES = mod_lua.la mod_lua_la_SOURCES = mod_lua.cpp freeswitch_lua.cpp mod_lua_wrap.cpp -mod_lua_la_CXXFLAGS = -Ilua $(AM_CPPFLAGS) +mod_lua_la_CXXFLAGS = -I$(LUA_DIR) $(AM_CPPFLAGS) mod_lua_la_LIBADD = $(switch_builddir)/libfreeswitch.la mod_lua_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lm $(AM_LDFLAGS) $(LIBLUA_A) $(SOLINK) @@ -16,12 +17,12 @@ BUILT_SOURCES = $(LIBLUA_A) $(mod_lua_la_SOURCES) : $(BUILT_SOURCES) $(LIBLUA_A): - cd lua && $(MAKE) CC="$(CC)" AR="$(AR) rcu" CFLAGS="$(AM_CFLAGS) -DLUA_USE_LINUX -w" liblua.a + cd $(LUA_DIR) && $(MAKE) CC="$(CC)" AR="$(AR) rcu" CFLAGS="$(AM_CFLAGS) -DLUA_USE_LINUX -w" liblua.a reswig: swigclean lua_wrap luaclean: - cd lua && $(MAKE) clean + cd $(LUA_DIR) && $(MAKE) clean allclean: clean luaclean