[Freeswitch-svn] [commit] r4635 - in freeswitch/trunk: build src/mod/asr_tts/mod_cepstral src/mod/endpoints/mod_portaudio src/mod/endpoints/mod_sofia

Freeswitch SVN mikej at freeswitch.org
Sat Mar 17 21:52:23 EDT 2007


Author: mikej
Date: Sat Mar 17 21:52:23 2007
New Revision: 4635

Modified:
   freeswitch/trunk/build/modmake.rules.in
   freeswitch/trunk/src/mod/asr_tts/mod_cepstral/Makefile
   freeswitch/trunk/src/mod/endpoints/mod_portaudio/Makefile
   freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile

Log:
remove gmakeisms from sofia, portaudio and cepstral makefiles.  simplify the module template makefiles

Modified: freeswitch/trunk/build/modmake.rules.in
==============================================================================
--- freeswitch/trunk/build/modmake.rules.in	(original)
+++ freeswitch/trunk/build/modmake.rules.in	Sat Mar 17 21:52:23 2007
@@ -53,42 +53,28 @@
 RECURSE_OUR_DEPS=`test -z "$(WANT_CURL)" || if test ! -z "$(LIBCURL_DEPS)"; then echo $(CURLLA); fi`
 RECURSE_OUR_CFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL_CPPFLAGS) ; $(LOCAL_INSERT_CFLAGS) `
 RECURSE_OUR_LDFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL) ; $(LOCAL_INSERT_LDFLAGS) `
-RECURSE_CHECKS=if test -z "$(MODNAME)" || test -z "$(SOURCEFILE)" || test -z "$(OUR_DEPS)" ; \
-	then modname=$(RECURSE_MODNAME) ; \
-	sourcefile=$(RECURSE_SOURCEFILE) ; \
-	ourdefs=$(RECURSE_OUR_DEPS) ; \
-	ourcflags=$(RECURSE_OUR_CFLAGS) ; \
-	ourldflags=$(RECURSE_OUR_LDFLAGS) ;
+RECURSE_MAKE=modname="$(RECURSE_MODNAME)" ; \
+		sourcefile="$(RECURSE_SOURCEFILE)" ; \
+		osarch=`uname -s` ; \
+		ourdefs="$(RECURSE_OUR_DEPS)" ; \
+		ourcflags="$(RECURSE_OUR_CFLAGS)" ; \
+		ourldflags="$(RECURSE_OUR_LDFLAGS)" ; \
+		$(MAKE) MODNAME="$$modname" SOURCEFILE="$$sourcefile" OUR_DEPS="$$ourdefs" OUR_CFLAGS="$$ourcflags" OUR_LDFLAGS="$$ourldflags" 
 
 all: Makefile
-	@$(RECURSE_CHECKS) \
-	  $(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags all-modules || exit 1;\
-	fi
+	@$(RECURSE_MAKE) all-modules || exit 1
 depend: Makefile
-	@$(RECURSE_CHECKS) \
-	  $(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags depend-modules || exit 1;\
-	fi
+	@$(RECURSE_MAKE) depend-modules || exit 1
 clean: Makefile
-	@$(RECURSE_CHECKS) \
-	  $(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags clean-modules || exit 1;\
-	fi
+	@$(RECURSE_MAKE) clean-modules || exit 1
 install: Makefile
-	@$(RECURSE_CHECKS) \
-	  $(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags install-modules || exit 1;\
-	fi
+	@$(RECURSE_MAKE) install-modules || exit 1
 uninstall: Makefile
-	@$(RECURSE_CHECKS) \
-	  $(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags uninstall-modules || exit 1;\
-	fi
+	@$(RECURSE_MAKE) uninstall-modules || exit 1
 distclean: Makefile
-	@$(RECURSE_CHECKS) \
-	  $(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags distclean-modules || exit 1;\
-	fi
+	@$(RECURSE_MAKE) distclean-modules || exit 1
 extraclean: Makefile
-	@$(RECURSE_CHECKS) \
-	  $(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags extraclean-modules || exit 1;\
-	fi
-
+	@$(RECURSE_MAKE) extraclean-modules || exit 1
 
 all-modules: local_depend local_all $(MODNAME).$(DYNAMIC_LIB_EXTEN) Makefile
 depend-modules: local_depend

Modified: freeswitch/trunk/src/mod/asr_tts/mod_cepstral/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/asr_tts/mod_cepstral/Makefile	(original)
+++ freeswitch/trunk/src/mod/asr_tts/mod_cepstral/Makefile	Sat Mar 17 21:52:23 2007
@@ -1,15 +1,6 @@
-# define these targets in your makefile if you wish
-# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
-OSARCH=$(shell uname -s)
-# and define these variables to impact your build
+LOCAL_INSERT_LDFLAGS=if test $$osarch = "Darwin" ; then echo "-framework swift" ; else echo "-L/opt/swift/lib -lswift -lceplex_us -lceplang_en -lm" ; fi ;
 
+LOCAL_INSERT_CFLAGS=test $$osarch = "Darwin" || echo "-I/opt/swift/include";
 
-ifeq ($(OSARCH),Darwin)
-LOCAL_LDFLAGS += -framework swift
-else
-LOCAL_LDFLAGS += -L/opt/swift/lib -lswift -lceplex_us -lceplang_en -lm
-LOCAL_CFLAGS += -I/opt/swift/include
-endif
-LOCAL_OBJS=
 include ../../../../build/modmake.rules
 

Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/Makefile	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/Makefile	Sat Mar 17 21:52:23 2007
@@ -1,14 +1,12 @@
 BASE=../../../..
-OSARCH=$(shell uname -s)
 
 PA_DIR=$(BASE)/libs/portaudio
 
 PALA=$(PA_DIR)/lib/libportaudio.la
 LOCAL_CFLAGS=-I. -I$(PA_DIR)/include
-LOCAL_LDFLAGS=
-ifeq ($(OSARCH),Darwin)
-LOCAL_LDFLAGS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon
-endif
+
+LOCAL_INSERT_LDFLAGS=if test $$osarch = "Darwin" ; then echo "-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon" ; fi ;
+
 LOCAL_LIBADD=$(PALA)
 LOCAL_OBJS=pablio.o pa_ringbuffer.o
 

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile	Sat Mar 17 21:52:23 2007
@@ -1,7 +1,5 @@
 BASE=../../../..
 
-OS_ARCH         := $(subst /,_,$(shell uname -s | sed /\ /s//_/))
-
 SOFIA_DIR=$(BASE)/libs/sofia-sip
 SOFIAUA_DIR=$(SOFIA_DIR)/libsofia-sip-ua
 
@@ -19,9 +17,7 @@
 
 LOCAL_LIBADD=$(SOFIALA)
 
-ifeq ($(OS_ARCH),Darwin)
-	LOCAL_LDFLAGS +=-framework CoreFoundation -framework SystemConfiguration
-endif
+LOCAL_INSERT_LDFLAGS=if test $$osarch = "Darwin" ; then echo "-framework CoreFoundation -framework SystemConfiguration" ; fi ;
 
 include $(BASE)/build/modmake.rules
 



More information about the Freeswitch-svn mailing list