mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
move mod_spidermoney build to automake, fix spidermoneky dependencies (I think this really fixes -j builds), move mod_spidermonkey sub modules all under the same source directory and bundle their build together as one
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16333 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -35,11 +35,6 @@ $(OUR_MODULES) $(OUR_CLEAN_MODULES) $(OUR_INSTALL_MODULES) $(OUR_UNINSTALL_MODUL
|
||||
fi; \
|
||||
test -z "$$fail" ;
|
||||
|
||||
JS_DIR=$(switch_srcdir)/libs/js
|
||||
JSLA=$(JS_DIR)/libjs.la
|
||||
$(JSLA): mod_spidermonkey-all
|
||||
mod_spidermonkey_curl-all mod_spidermonkey_teletone-all mod_spidermonkey_core_db-all mod_spidermonkey_socket-all mod_spidermonky_odbc-all mod_spidermonkey_curl-install mod_spidermonkey_teletone-install mod_spidermonkey_core_db-install mod_spidermonkey_socket-install mod_spidermonky_odbc-install: $(JSLA)
|
||||
|
||||
.DEFAULT:
|
||||
@if test -z "`echo $@ | grep all`"; then $(MAKE) $(AM_MAKEFLAGS) $@-all ; else echo Unknown target `echo $@ | sed -e 's|-all||'`; exit 1; fi
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
WANT_CURL=yes
|
||||
|
||||
LOCAL_CFLAGS=
|
||||
LOCAL_LDFLAGS=
|
||||
LOCAL_LIBADD=
|
||||
|
||||
include sm.mak
|
||||
|
||||
depend_install: $(DESTDIR)$(libdir)/libjs.la
|
||||
|
||||
$(DESTDIR)$(libdir)/libjs.la: $(JSLA)
|
||||
cd $(JS_DIR)/nsprpub/ && $(MAKE) -j1 install && cd $(JS_DIR) && $(MAKE) -j1 install
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
|
||||
MODNAME=mod_spidermonkey
|
||||
|
||||
CURL_DIR=$(switch_srcdir)/libs/curl
|
||||
CURL_BUILDDIR=$(switch_builddir)/libs/curl
|
||||
CURLLA=${switch_builddir}/libs/curl/lib/libcurl.la
|
||||
|
||||
JS_DIR=$(switch_srcdir)/libs/js
|
||||
JS_BUILDDIR=$(switch_builddir)/libs/js
|
||||
JSLA=$(JS_BUILDDIR)/libjs.la
|
||||
|
||||
AM_CFLAGS += -I. -I$(JS_DIR)/src -I$(JS_DIR)/nsprpub/dist/include/nspr
|
||||
AM_CFLAGS += -DXP_UNIX -DJS_THREADSAFE -DJS_HAS_FILE_OBJECT=1 -DJS_HAS_XML_SUPPORT=1
|
||||
AM_LIBADD = $(switch_builddir)/libfreeswitch.la $(JSLA)
|
||||
AM_LDFLAGS += -avoid-version -module -no-undefined -shared
|
||||
AM_LDFLAGS += -L$(JS_BUILDDIR)/nsprpub/dist/lib -lnspr4 $(JS_BUILDDIR)/nsprpub/pr/src/libnspr4.*
|
||||
BUILT_SOURCES = $(JSLA) $(LIBCURL_DEPS)
|
||||
|
||||
mod_LTLIBRARIES = mod_spidermonkey.la
|
||||
mod_spidermonkey_la_SOURCES = mod_spidermonkey.c
|
||||
mod_spidermonkey_la_CFLAGS = $(AM_CFLAGS) $(LIBCURL_CPPFLAGS)
|
||||
mod_spidermonkey_la_LIBADD = $(AM_LIBADD)
|
||||
mod_spidermonkey_la_LDFLAGS = $(AM_LDFLAGS) $(LIBCURL)
|
||||
|
||||
mod_LTLIBRARIES += mod_spidermonkey_curl.la
|
||||
mod_spidermonkey_curl_la_SOURCES = mod_spidermonkey_curl.c
|
||||
mod_spidermonkey_curl_la_CFLAGS = $(AM_CFLAGS) $(LIBCURL_CPPFLAGS)
|
||||
mod_spidermonkey_curl_la_LIBADD = $(AM_LIBADD)
|
||||
mod_spidermonkey_curl_la_LDFLAGS = $(AM_LDFLAGS) $(LIBCURL)
|
||||
|
||||
mod_LTLIBRARIES += mod_spidermonkey_socket.la
|
||||
mod_spidermonkey_socket_la_SOURCES = mod_spidermonkey_socket.c
|
||||
mod_spidermonkey_socket_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_spidermonkey_socket_la_LIBADD = $(AM_LIBADD)
|
||||
mod_spidermonkey_socket_la_LDFLAGS = $(AM_LDFLAGS)
|
||||
|
||||
mod_LTLIBRARIES += mod_spidermonkey_core_db.la
|
||||
mod_spidermonkey_core_db_la_SOURCES = mod_spidermonkey_core_db.c
|
||||
mod_spidermonkey_core_db_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_spidermonkey_core_db_la_LIBADD = $(AM_LIBADD)
|
||||
mod_spidermonkey_core_db_la_LDFLAGS = $(AM_LDFLAGS)
|
||||
|
||||
mod_LTLIBRARIES += mod_spidermonkey_teletone.la
|
||||
mod_spidermonkey_teletone_la_SOURCES = mod_spidermonkey_teletone.c
|
||||
mod_spidermonkey_teletone_la_CFLAGS = $(AM_CFLAGS) -I$(switch_srcdir)/libs/libteletone/src
|
||||
mod_spidermonkey_teletone_la_LIBADD = $(AM_LIBADD)
|
||||
mod_spidermonkey_teletone_la_LDFLAGS = $(AM_LDFLAGS)
|
||||
|
||||
if HAVE_ODBC
|
||||
mod_LTLIBRARIES += mod_spidermonkey_odbc.la
|
||||
mod_spidermonkey_odbc_la_SOURCES = mod_spidermonkey_odbc.c
|
||||
mod_spidermonkey_odbc_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_spidermonkey_odbc_la_LIBADD = $(AM_LIBADD)
|
||||
mod_spidermonkey_odbc_la_LDFLAGS = $(AM_LDFLAGS)
|
||||
endif
|
||||
|
||||
$(SOURCES): $(BUILT_SOURCES)
|
||||
|
||||
$(JSLA): $(JS_DIR) $(JS_DIR)/.update
|
||||
cd $(JS_BUILDDIR)/nsprpub && $(MAKE) -j1 && cd $(JS_BUILDDIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(CURLLA):
|
||||
@cd $(CURL_BUILDDIR) && $(MAKE)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
install-exec-local: $(DESTDIR)$(libdir)/libjs.la
|
||||
|
||||
$(DESTDIR)$(libdir)/libjs.la: $(JSLA)
|
||||
cd $(JS_BUILDDIR)/nsprpub/ && $(MAKE) -j1 install && cd $(JS_BUILDDIR) && $(MAKE) install
|
||||
@@ -1,13 +0,0 @@
|
||||
switch_srcdir=../../../..
|
||||
JS_DIR=$(switch_srcdir)/libs/js
|
||||
JSLA=$(JS_DIR)/libjs.la
|
||||
|
||||
LOCAL_CFLAGS+=-I$(JS_DIR)/src -I$(JS_DIR)/nsprpub/dist/include/nspr -DXP_UNIX -I../mod_spidermonkey -DJS_THREADSAFE -DJS_HAS_FILE_OBJECT=1 -DJS_HAS_XML_SUPPORT=1
|
||||
LOCAL_LDFLAGS_POST=-L$(JS_DIR)/nsprpub/dist/lib -lnspr4 $(JS_DIR)/nsprpub/pr/src/libnspr4.*
|
||||
LOCAL_LIBADD+=$(JSLA)
|
||||
|
||||
include $(switch_srcdir)/build/modmake.rules
|
||||
|
||||
$(JSLA): $(JS_DIR) $(JS_DIR)/.update
|
||||
cd $(JS_DIR)/nsprpub && $(MAKE) -j1 && cd $(JS_DIR) && $(MAKE) -j1
|
||||
$(TOUCH_TARGET)
|
||||
@@ -1,6 +0,0 @@
|
||||
switch_srcdir=../../../..
|
||||
LOCAL_CFLAGS=
|
||||
LOCAL_LDFLAGS=
|
||||
LOCAL_LIBADD=
|
||||
include ../mod_spidermonkey/sm.mak
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
WANT_CURL=yes
|
||||
include ../mod_spidermonkey/sm.mak
|
||||
@@ -1,4 +0,0 @@
|
||||
switch_srcdir=../../../..
|
||||
|
||||
include ../mod_spidermonkey/sm.mak
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
switch_srcdir=../../../..
|
||||
LOCAL_CFLAGS=
|
||||
LOCAL_LDFLAGS=
|
||||
LOCAL_LIBADD=
|
||||
include ../mod_spidermonkey/sm.mak
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
switch_srcdir=../../../..
|
||||
|
||||
include ../mod_spidermonkey/sm.mak
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
switch_srcdir=../../../..
|
||||
LOCAL_CFLAGS=-I$(switch_srcdir)/libs/libteletone/src
|
||||
include ../mod_spidermonkey/sm.mak
|
||||
|
||||
Reference in New Issue
Block a user