[Freeswitch-svn] [commit] r4589 - in freeswitch/trunk: . build src/mod src/mod/formats/mod_shout
Freeswitch SVN
mikej at freeswitch.org
Wed Mar 14 10:35:12 EDT 2007
Author: mikej
Date: Wed Mar 14 10:35:11 2007
New Revision: 4589
Modified:
freeswitch/trunk/Makefile.am
freeswitch/trunk/Makefile.in
freeswitch/trunk/build/modmake.rules.in
freeswitch/trunk/configure
freeswitch/trunk/configure.in
freeswitch/trunk/src/mod/Makefile.am
freeswitch/trunk/src/mod/Makefile.in
freeswitch/trunk/src/mod/formats/mod_shout/Makefile
Log:
add uninstall_mod target to the main makefile
implement uninstall in modmake.rules
add LIBADD_LOCAL var for use in the module makefiles, it both links to the module, and is a dependency like LOCAL_OBJS
fix bug in src/mod/Makefile(.am) that was causing make install to fail on first run for those modules that used the default mod makefile
implement the getlib.sh script in mod_shout Makefile (works.. but still wip)
Modified: freeswitch/trunk/Makefile.am
==============================================================================
--- freeswitch/trunk/Makefile.am (original)
+++ freeswitch/trunk/Makefile.am Wed Mar 14 10:35:11 2007
@@ -179,8 +179,13 @@
modules: libfreeswitch.la
$(MAKE) -C src/mod
+
install_mod: libfreeswitch.la
$(MAKE) -C src/mod install
+
+uninstall_mod:
+ $(MAKE) -C src/mod uninstall
+
modclean:
$(MAKE) -C src/mod clean
Modified: freeswitch/trunk/Makefile.in
==============================================================================
--- freeswitch/trunk/Makefile.in (original)
+++ freeswitch/trunk/Makefile.in Wed Mar 14 10:35:11 2007
@@ -184,6 +184,7 @@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
+GETLIB = @GETLIB@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -1162,8 +1163,13 @@
modules: libfreeswitch.la
$(MAKE) -C src/mod
+
install_mod: libfreeswitch.la
$(MAKE) -C src/mod install
+
+uninstall_mod:
+ $(MAKE) -C src/mod uninstall
+
modclean:
$(MAKE) -C src/mod clean
Modified: freeswitch/trunk/build/modmake.rules.in
==============================================================================
--- freeswitch/trunk/build/modmake.rules.in (original)
+++ freeswitch/trunk/build/modmake.rules.in Wed Mar 14 10:35:11 2007
@@ -8,8 +8,10 @@
AWK=@AWK@
SHELL=@SHELL@
INSTALL=@INSTALL@
+GETLIB=@GETLIB@
LIBTOOL=$(switch_builddir)/libtool
-LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
+LTINSTALL=$(LIBTOOL) --mode=install $(INSTALL)
+LTUNINSTALL=$(LIBTOOL) --mode=uninstall rm -f
CCLD = $(CC)
CXXLD = $(CXX)
@@ -44,6 +46,7 @@
depend: local_depend
clean: local_clean mod_clean
install: all depend_install local_install mod_install
+uninstall: local_uninstall mod_uninstall
distclean: clean local_distclean
extraclean: distclean local_extraclean
@@ -54,13 +57,13 @@
echo include $$rulesdir/build/modmake.rules >> Makefile ; \
fi ;
-$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).o $(LOCAL_OBJS) $(SOURCEFILE)
+$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(LOCAL_LIBADD) $(LOCAL_OBJS) $(SOURCEFILE) $(MODNAME).o
@if test -f $(CSOURCEFILE); then \
- echo $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS); \
- $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS); \
+ echo $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(LOCAL_LIBADD); \
+ $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(LOCAL_LIBADD); \
else \
- echo $(CXXLINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS); \
- $(CXXLINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS); \
+ echo $(CXXLINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(LOCAL_LIBADD); \
+ $(CXXLINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(LOCAL_LIBADD); \
fi;
mod_clean:
@@ -69,8 +72,11 @@
mod_install:
$(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod
+mod_uninstall:
+ $(LTUNINSTALL) $(DESTDIR)$(PREFIX)/mod/$(MODNAME).$(DYNAMIC_LIB_EXTEN)
+
# define these in your makefile if you wish
-local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
+local_all local_depend local_clean depend_install local_install local_distclean local_extraclean local_uninstall:
#
# Implicit rules for creating outputs from input files
Modified: freeswitch/trunk/configure
==============================================================================
--- freeswitch/trunk/configure (original)
+++ freeswitch/trunk/configure Wed Mar 14 10:35:11 2007
@@ -490,7 +490,7 @@
ac_subdirs_all="$ac_subdirs_all libs/speex"
ac_subdirs_all="$ac_subdirs_all libs/xmlrpc-c"
ac_subdirs_all="$ac_subdirs_all libs/portaudio"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar switch_srcdir switch_builddir moddir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PRTDIAG WANT_DEBUG_TRUE WANT_DEBUG_FALSE SWITCH_AM_CFLAGS SWITCH_AM_CXXFLAGS SWITCH_AM_LDFLAGS SOLINK DYNAMIC_LIB_EXTEN LIBOBJS voidp_size short_value int_value long_value int64_value size_t_value ssize_t_value int64_t_fmt uint64_t_fmt ssize_t_fmt size_t_fmt ZCAT TAR WGET CURL CRASHPROT_TRUE CRASHPROT_FALSE ISLINUX_TRUE ISLINUX_FALSE ISMAC_TRUE ISMAC_FALSE IS64BITLINUX_TRUE IS64BITLINUX_FALSE subdirs LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar switch_srcdir switch_builddir moddir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PRTDIAG WANT_DEBUG_TRUE WANT_DEBUG_FALSE SWITCH_AM_CFLAGS SWITCH_AM_CXXFLAGS SWITCH_AM_LDFLAGS SOLINK DYNAMIC_LIB_EXTEN LIBOBJS voidp_size short_value int_value long_value int64_value size_t_value ssize_t_value int64_t_fmt uint64_t_fmt ssize_t_fmt size_t_fmt ZCAT TAR WGET CURL GETLIB CRASHPROT_TRUE CRASHPROT_FALSE ISLINUX_TRUE ISLINUX_FALSE ISMAC_TRUE ISMAC_FALSE IS64BITLINUX_TRUE IS64BITLINUX_FALSE subdirs LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -25236,6 +25236,9 @@
test -n "$CURL" && break
done
+GETLIB="cd $switch_srcdir/libs && ${SHELL} $switch_srcdir/build/getlib.sh"
+
+
# Check whether --enable-crash-protection or --disable-crash-protection was given.
if test "${enable_crash_protection+set}" = set; then
@@ -26163,6 +26166,7 @@
s, at TAR@,$TAR,;t t
s, at WGET@,$WGET,;t t
s, at CURL@,$CURL,;t t
+s, at GETLIB@,$GETLIB,;t t
s, at CRASHPROT_TRUE@,$CRASHPROT_TRUE,;t t
s, at CRASHPROT_FALSE@,$CRASHPROT_FALSE,;t t
s, at ISLINUX_TRUE@,$ISLINUX_TRUE,;t t
Modified: freeswitch/trunk/configure.in
==============================================================================
--- freeswitch/trunk/configure.in (original)
+++ freeswitch/trunk/configure.in Wed Mar 14 10:35:11 2007
@@ -278,6 +278,9 @@
AC_PATH_PROGS(TAR, gtar tar)
AC_PATH_PROGS(WGET, wget)
AC_PATH_PROGS(CURL, curl)
+GETLIB="cd $switch_srcdir/libs && ${SHELL} $switch_srcdir/build/getlib.sh"
+AC_SUBST(GETLIB)
+
AC_ARG_ENABLE(crash-protection,
[ --enable-crash-protection Compile with CRASH Protection],,[enable_crash_prot="no"])
Modified: freeswitch/trunk/src/mod/Makefile.am
==============================================================================
--- freeswitch/trunk/src/mod/Makefile.am (original)
+++ freeswitch/trunk/src/mod/Makefile.am Wed Mar 14 10:35:11 2007
@@ -36,7 +36,19 @@
moddir=$(MOD_DIR); \
if test -f $$moddir/Makefile ; then \
cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) install ; else \
- cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules clean ; \
+ cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules install ; \
+ fi; \
+ done
+ @echo done
+
+uninstall:
+ @echo Uninstalling Modules
+ @for i in $(OUR_MODULES) ; do \
+ echo making uninstall $$i ; \
+ moddir=$(MOD_DIR); \
+ if test -f $$moddir/Makefile ; then \
+ cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) uninstall ; else \
+ cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules uninstall ; \
fi; \
done
@echo done
Modified: freeswitch/trunk/src/mod/Makefile.in
==============================================================================
--- freeswitch/trunk/src/mod/Makefile.in (original)
+++ freeswitch/trunk/src/mod/Makefile.in Wed Mar 14 10:35:11 2007
@@ -88,6 +88,7 @@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
+GETLIB = @GETLIB@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -274,7 +275,6 @@
installdirs:
install-exec: install-exec-am
install-data: install-data-am
-uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
@@ -380,7 +380,19 @@
moddir=$(MOD_DIR); \
if test -f $$moddir/Makefile ; then \
cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) install ; else \
- cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules clean ; \
+ cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules install ; \
+ fi; \
+ done
+ @echo done
+
+uninstall:
+ @echo Uninstalling Modules
+ @for i in $(OUR_MODULES) ; do \
+ echo making uninstall $$i ; \
+ moddir=$(MOD_DIR); \
+ if test -f $$moddir/Makefile ; then \
+ cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) uninstall ; else \
+ cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules uninstall ; \
fi; \
done
@echo done
Modified: freeswitch/trunk/src/mod/formats/mod_shout/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_shout/Makefile (original)
+++ freeswitch/trunk/src/mod/formats/mod_shout/Makefile Wed Mar 14 10:35:11 2007
@@ -1,34 +1,43 @@
-# define these targets in your makefile if you wish
-# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
-
-# and define these variables to impact your build
MODNAME=mod_shout
LAME=lame-3.97
SHOUT=libshout-2.2.2
-LAMELA=$(BASE)/libs/$(LAME)/libmp3lame/libmp3lame.la
-SHOUTLA=$(BASE)/libs/$(SHOUT)/src/libshout.la
-CURLLA=$(BASE)/libs/curl/lib/libcurl.la
-LOCAL_CFLAGS=-I$(BASE)/libs/curl/include -I$(BASE)/libs/$(SHOUT)/include -I$(BASE)/libs/$(LAME)/include
-LOCAL_LDFLAGS=$(LAMELA) $(SHOUTLA) $(CURLLA)
+switch_srcdir=../../../..
+
+LAME_DIR=$(switch_srcdir)/libs/$(LAME)
+SHOUT_DIR=$(switch_srcdir)/libs/$(SHOUT)
+CURL_DIR=$(switch_srcdir)/libs/curl
+
+LAMELA=$(LAME_DIR)/libmp3lame/libmp3lame.la
+SHOUTLA=$(SHOUT_DIR)/src/libshout.la
+CURLLA=$(CURL_DIR)/lib/libcurl.la
+
+LOCAL_CFLAGS=-I$(CURL_DIR)/include -I$(SHOUT_DIR)/include -I$(LAME_DIR)/include
+LOCAL_LIBADD=$(LAMELA) $(SHOUTLA) $(CURLLA)
+
MP3OBJS=common.o dct64_i386.o decode_ntom.o layer3.o tabinit.o interface.o
LOCAL_OBJS=$(MP3OBJS)
-DEFAULT_ARGS=--prefix=$(PREFIX) --disable-shared --with-pic
-include ../../../../build/modmake.rules
+include $(switch_srcdir)/build/modmake.rules
+
+DEFAULT_ARGS=--prefix=$(PREFIX) --disable-shared --with-pic
-$(LAMELA):
- MAKE="$(MAKE)" $(BASE)/build/buildlib.sh $(BASE) $(LAME).tar.gz $(DEFAULT_ARGS) --disable-decoder
+$(LAME_DIR)/Makefile:
+ $(GETLIB) $(LAME).tar.gz
+ cd $(LAME_DIR) && ./configure $(DEFAULT_ARGS) --disable-decoder
+
+$(LAMELA): $(LAME_DIR)/Makefile
+ cd $(LAME_DIR) && $(MAKE)
+
+$(SHOUT_DIR)/Makefile:
+ $(GETLIB) $(SHOUT).tar.gz
+ cd $(SHOUT_DIR) && ./configure $(DEFAULT_ARGS)
-$(SHOUTLA):
- MAKE="$(MAKE)" MOD_CFLAGS="${ALL_CFLAGS}" MOD_LDFLAGS="${LD_CFLAGS}" $(BASE)/build/buildlib.sh $(BASE) $(SHOUT).tar.gz $(DEFAULT_ARGS)
+$(SHOUTLA): $(SHOUT_DIR)/Makefile
+ cd $(SHOUT_DIR) && $(MAKE)
$(CURLLA):
- cd $(BASE)/libs/curl && $(MAKE)
-
-%.o: %.c
- $(CC) $(ALL_CFLAGS) -c -o $@ $<
+ cd $(CURL_DIR) && $(MAKE)
-local_depend: $(LAMELA) $(SHOUTLA) $(MP3OBJS)
More information about the Freeswitch-svn
mailing list