[Freeswitch-svn] [commit] r4721 - in freeswitch/trunk: build src/mod/endpoints/mod_wanpipe
Freeswitch SVN
anthm at freeswitch.org
Wed Mar 21 19:42:16 EDT 2007
Author: anthm
Date: Wed Mar 21 19:42:16 2007
New Revision: 4721
Modified:
freeswitch/trunk/build/getlib.sh.in
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/Makefile
Log:
update wanpipe to be fully automated
Modified: freeswitch/trunk/build/getlib.sh.in
==============================================================================
--- freeswitch/trunk/build/getlib.sh.in (original)
+++ freeswitch/trunk/build/getlib.sh.in Wed Mar 21 19:42:16 2007
@@ -13,8 +13,14 @@
fi
fi
-base=http://svn.freeswitch.org/downloads/libs
+base=http://svn.freeswitch.org/downloads/libs/
tarfile=$1
+url=`echo $tarfile | grep "://"`
+
+if [ ! -z $url ] ; then
+ base=$tarfile/
+ tarfile=$2
+fi
if [ ! -d $tarfile ] ; then
uncompressed=`echo $tarfile | sed "s/\.tar\.gz//g"`
@@ -22,7 +28,7 @@
if [ ! -f $tarfile ] ; then
rm -fr $uncompressed
- $DOWNLOAD_CMD $base/$tarfile
+ $DOWNLOAD_CMD $base$tarfile
if [ ! -f $tarfile ] ; then
echo cannot find $tarfile
exit 1
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/Makefile (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/Makefile Wed Mar 21 19:42:16 2007
@@ -1,10 +1,43 @@
BASE=../../../..
-LOCAL_CFLAGS =-I/usr/local/include -I/usr/src/libpri -I/usr/src/linux/include -I. -I/usr/include
+LIBPRI_HOST=http://ftp.digium.com/pub/libpri
+LIBPRI=libpri-1.2.4
+LIBPRI_FILE=$(LIBPRI).tar.gz
+LIBPRI_DIR=$(BASE)/libs/$(LIBPRI)
+LIBPRI_A=$(LIBPRI_DIR)/libpri.a
+WANPIPE=wanpipe-3.1.0.p12
+WANPIPE_HOST=ftp://ftp.sangoma.com/linux/custom/3.1
+WANPIPE_FILE=$(WANPIPE).tgz
+WANPIPE_DIR=$(BASE)/libs/$(WANPIPE)
+WANPIPE_INCLUDE=$(WANPIPE_DIR)/patches/kdrivers/include
+LIBSANGOMA_DIR=$(WANPIPE_DIR)/api/libsangoma
+LIBSANGOMA_LA=$(LIBSANGOMA_DIR)/.libs/libsangoma.la
+LIBSANGOMA_MAKEFILE=$(LIBSANGOMA_DIR)/Makefile
+LOCAL_CFLAGS =-I$(WANPIPE_INCLUDE) -I$(LIBSANGOMA_DIR) -I/usr/local/include -I$(LIBPRI_DIR) -I/usr/src/linux/include -I. -I/usr/include
LOCAL_CFLAGS +=-D__LINUX__ -D_REENTRANT -D_GNU_SOURCE -DAFT_A104 -DWANPIPE_TDM_API -I$(switch_srcdir)/libs/libteletone/src
LOCAL_CFLAGS +=-w
-LOCAL_LDFLAGS=-lsangoma $(BASE)/libs/libteletone/libteletone.la
-LOCAL_OBJS=ss7boost_client.o
+#LOCAL_LDFLAGS=
+LOCAL_OBJS=ss7boost_client.o $(BASE)/libs/libteletone/libteletone.la $(LIBSANGOMA_LA) $(LIBPRI_A)
+OPTS=--prefix=$(PREFIX) --with-libpri=$(LIBPRI_DIR) --disable-shared
+
include $(BASE)/build/modmake.rules
-local_depend:
- MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install libsangoma --prefix=$(PREFIX) --with-libpri=/usr/src/libpri
+$(LIBPRI_DIR):
+ $(GETLIB) $(LIBPRI_HOST) $(LIBPRI_FILE)
+ cd $(LIBPRI_DIR) && $(MAKE)
+
+$(LIBPRI_A): $(LIBPRI_DIR)
+
+$(LIBSANGOMA_MAKEFILE):
+ cd $(LIBSANGOMA_DIR) && CFLAGS="-I$(WANPIPE_INCLUDE)" ./configure $(OPTS)
+
+$(LIBSANGOMA_LA): $(LIBSANGOMA_MAKEFILE)
+ cd $(LIBSANGOMA_DIR) && $(MAKE)
+
+$(WANPIPE_DIR):
+ $(GETLIB) $(WANPIPE_HOST) $(WANPIPE_FILE)
+ cd $(WANPIPE_DIR) && $(MAKE) && $(MAKE) install
+ $(TOUCH_TARGET)
+
+local_depend: $(WANPIPE_DIR)
+#MOD_CFLAGS="-I$(WANPIPE_INCLUDE)" MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) libsangoma $(OPTS)
+
More information about the Freeswitch-svn
mailing list