[asterisk-commits] russell: trunk r95697 - in /trunk: codecs/ main/ main/libresample/ res/ res/l...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 1 19:00:44 CST 2008
Author: russell
Date: Tue Jan 1 19:00:44 2008
New Revision: 95697
URL: http://svn.digium.com/view/asterisk?view=rev&rev=95697
Log:
Instead of linking libresample into the main Asterisk binary, build it as
res_resample, and mark codec_resample as dependent upon res_resample. This
prevents the linker from optimizing away libresample, and also makes it so the
libresample code isn't linked in to multiple places. (I have another module
in a branch that needs it, too.)
Added:
trunk/res/libresample/
- copied from r95695, trunk/main/libresample/
trunk/res/libresample/LICENSE.txt
- copied unchanged from r95696, trunk/main/libresample/LICENSE.txt
trunk/res/libresample/Makefile.asterisk
- copied unchanged from r95696, trunk/main/libresample/Makefile.asterisk
trunk/res/libresample/Makefile.in
- copied unchanged from r95696, trunk/main/libresample/Makefile.in
trunk/res/libresample/README.txt
- copied unchanged from r95696, trunk/main/libresample/README.txt
trunk/res/libresample/config.guess
- copied unchanged from r95696, trunk/main/libresample/config.guess
trunk/res/libresample/config.sub
- copied unchanged from r95696, trunk/main/libresample/config.sub
trunk/res/libresample/configure
- copied unchanged from r95696, trunk/main/libresample/configure
trunk/res/libresample/configure.in
- copied unchanged from r95696, trunk/main/libresample/configure.in
trunk/res/libresample/include/
- copied from r95696, trunk/main/libresample/include/
trunk/res/libresample/install-sh
- copied unchanged from r95696, trunk/main/libresample/install-sh
trunk/res/libresample/src/
- copied from r95696, trunk/main/libresample/src/
trunk/res/libresample/tests/
- copied from r95696, trunk/main/libresample/tests/
trunk/res/libresample/win/
- copied from r95696, trunk/main/libresample/win/
trunk/res/res_resample.c (with props)
Removed:
trunk/main/libresample/
Modified:
trunk/codecs/Makefile
trunk/codecs/codec_resample.c
trunk/main/Makefile
trunk/res/Makefile
Modified: trunk/codecs/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/codecs/Makefile?view=diff&rev=95697&r1=95696&r2=95697
==============================================================================
--- trunk/codecs/Makefile (original)
+++ trunk/codecs/Makefile Tue Jan 1 19:00:44 2008
@@ -55,7 +55,4 @@
$(if $(filter codec_g722,$(EMBEDDED_MODS)),modules.link,codec_g722.so): $(LIBG722)
-codec_resample.o: ASTCFLAGS+=-I$(ASTTOPDIR)/main/libresample/include
-ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
- codec_resample.so: LIBS += $(ASTTOPDIR)/main/libresample/libresample.a
-endif
+codec_resample.o: ASTCFLAGS+=-I$(ASTTOPDIR)/res/libresample/include
Modified: trunk/codecs/codec_resample.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_resample.c?view=diff&rev=95697&r1=95696&r2=95697
==============================================================================
--- trunk/codecs/codec_resample.c (original)
+++ trunk/codecs/codec_resample.c Tue Jan 1 19:00:44 2008
@@ -23,6 +23,10 @@
*
* \ingroup codecs
*/
+
+/*** MODULEINFO
+ <depend>res_resample</depend>
+ ***/
#include "asterisk.h"
Modified: trunk/main/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/main/Makefile?view=diff&rev=95697&r1=95696&r2=95697
==============================================================================
--- trunk/main/Makefile (original)
+++ trunk/main/Makefile Tue Jan 1 19:00:44 2008
@@ -111,9 +111,6 @@
db1-ast/libdb1.a: CHECK_SUBDIR
CFLAGS="$(ASTCFLAGS)" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a
-libresample/libresample.a: CHECK_SUBDIR
- $(MAKE) -f Makefile.asterisk -C libresample libresample.a
-
ast_expr2.c ast_expr2.h:
bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
@@ -155,7 +152,7 @@
MAIN_TGT:=asterisk
endif
-$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a minimime/libmmime.a $(AST_EMBED_LDSCRIPTS) libresample/libresample.a
+$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a minimime/libmmime.a $(AST_EMBED_LDSCRIPTS)
@$(CC) -c -o buildinfo.o $(ASTCFLAGS) buildinfo.c
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),)
@@ -172,4 +169,3 @@
@$(MAKE) -C db1-ast clean
@$(MAKE) -C stdtime clean
@$(MAKE) -C minimime clean
- @$(MAKE) -f Makefile.asterisk -C libresample clean
Modified: trunk/res/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/res/Makefile?view=diff&rev=95697&r1=95696&r2=95697
==============================================================================
--- trunk/res/Makefile (original)
+++ trunk/res/Makefile Tue Jan 1 19:00:44 2008
@@ -47,6 +47,9 @@
ael/pval.o: ael/pval.c
+res_resample.so: libresample/src/resample.o libresample/src/resamplesubs.o libresample/src/filterkit.o
+
clean::
rm -f snmp/*.o
rm -f ael/*.o
+ rm -f libresample/src/*.o
Added: trunk/res/res_resample.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_resample.c?view=auto&rev=95697
==============================================================================
--- trunk/res/res_resample.c (added)
+++ trunk/res/res_resample.c Tue Jan 1 19:00:44 2008
@@ -1,0 +1,44 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
+ * Copyright (C) 2007, Digium, Inc.
+ *
+ * Russell Bryant <russell at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*!
+ * \file
+ *
+ * \author Russell Bryant <russell at digium.com>
+ */
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/module.h"
+
+static int load_module(void)
+{
+ return 0;
+}
+
+static int unload_module(void)
+{
+ return -1;
+}
+
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Resampling Support via libresample",
+ .load = load_module,
+ .unload = unload_module,
+ );
Propchange: trunk/res/res_resample.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/res/res_resample.c
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: trunk/res/res_resample.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the asterisk-commits
mailing list