[asterisk-addons-commits] qwell: branch qwell/moddirmagic r514 - in /team/qwell/moddirmagic: ./ formats...

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Wed Feb 6 16:23:13 CST 2008


Author: qwell
Date: Wed Feb  6 16:23:13 2008
New Revision: 514

URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=514
Log:
Make format_mp3 compile/install.

Added:
    team/qwell/moddirmagic/formats/format_mp3.c
      - copied, changed from r513, team/qwell/moddirmagic/formats/format_mp3/format_mp3.c
Removed:
    team/qwell/moddirmagic/formats/format_mp3/format_mp3.c
Modified:
    team/qwell/moddirmagic/Makefile
    team/qwell/moddirmagic/formats/Makefile
    team/qwell/moddirmagic/formats/format_mp3/Makefile

Modified: team/qwell/moddirmagic/Makefile
URL: http://svn.digium.com/view/asterisk-addons/team/qwell/moddirmagic/Makefile?view=diff&rev=514&r1=513&r2=514
==============================================================================
--- team/qwell/moddirmagic/Makefile (original)
+++ team/qwell/moddirmagic/Makefile Wed Feb  6 16:23:13 2008
@@ -68,7 +68,7 @@
 
 #MOD_SUBDIRS:=channels pbx apps codecs formats cdr funcs tests main res $(LOCAL_MOD_SUBDIRS)
 #MOD_SUBDIRS:=channels apps formats cdr res $(LOCAL_MOD_SUBDIRS)
-MOD_SUBDIRS:=channels apps cdr res $(LOCAL_MOD_SUBDIRS)
+MOD_SUBDIRS:=channels apps formats cdr res $(LOCAL_MOD_SUBDIRS)
 OTHER_SUBDIRS:=
 SUBDIRS:=$(OTHER_SUBDIRS) $(MOD_SUBDIRS)
 SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)

Modified: team/qwell/moddirmagic/formats/Makefile
URL: http://svn.digium.com/view/asterisk-addons/team/qwell/moddirmagic/formats/Makefile?view=diff&rev=514&r1=513&r2=514
==============================================================================
--- team/qwell/moddirmagic/formats/Makefile (original)
+++ team/qwell/moddirmagic/formats/Makefile Wed Feb  6 16:23:13 2008
@@ -18,3 +18,8 @@
 all: _all
 
 include $(ASTTOPDIR)/Makefile.moddir_rules
+
+clean::
+	$(MAKE) -C format_mp3 clean
+
+$(if $(filter format_mp3,$(EMBEDDED_MODS)),modules.link,format_mp3.so): format_mp3/common.o format_mp3/dct64_i386.o format_mp3/decode_ntom.o format_mp3/layer3.o format_mp3/tabinit.o format_mp3/interface.o

Copied: team/qwell/moddirmagic/formats/format_mp3.c (from r513, team/qwell/moddirmagic/formats/format_mp3/format_mp3.c)
URL: http://svn.digium.com/view/asterisk-addons/team/qwell/moddirmagic/formats/format_mp3.c?view=diff&rev=514&p1=team/qwell/moddirmagic/formats/format_mp3/format_mp3.c&r1=513&p2=team/qwell/moddirmagic/formats/format_mp3.c&r2=514
==============================================================================
--- team/qwell/moddirmagic/formats/format_mp3/format_mp3.c (original)
+++ team/qwell/moddirmagic/formats/format_mp3.c Wed Feb  6 16:23:13 2008
@@ -17,8 +17,8 @@
 
 #include <asterisk.h>
 
-#include "mpg123.h" 
-#include "mpglib.h" 
+#include "format_mp3/mpg123.h"
+#include "format_mp3/mpglib.h"
 #include <asterisk/logger.h>
 #include <asterisk/mod_format.h>
 #include <asterisk/module.h>
@@ -35,8 +35,6 @@
 #else
 #include <machine/endian.h>
 #endif
-
-#define AST_MODULE "format_mp3"
 
 #define MP3_BUFLEN 320
 #define MP3_SCACHE 16384

Modified: team/qwell/moddirmagic/formats/format_mp3/Makefile
URL: http://svn.digium.com/view/asterisk-addons/team/qwell/moddirmagic/formats/format_mp3/Makefile?view=diff&rev=514&r1=513&r2=514
==============================================================================
--- team/qwell/moddirmagic/formats/format_mp3/Makefile (original)
+++ team/qwell/moddirmagic/formats/format_mp3/Makefile Wed Feb  6 16:23:13 2008
@@ -1,82 +1,24 @@
-MODS=format_mp3.so
-MP3OBJS=common.o dct64_i386.o decode_ntom.o layer3.o tabinit.o interface.o format_mp3.o
+MP3OBJS=common.o dct64_i386.o decode_ntom.o layer3.o tabinit.o interface.o
 
-CFLAGS=$(ASTERISK_INCLUDE) -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
-
-OSARCH=$(shell uname -s)
-
-ifeq (${OSARCH},Linux)
-PROC=$(shell uname -m)
-ifeq ($(PROC),x86_64)
-# You must have GCC 3.4 to use k8, otherwise use athlon
-PROC=k8
-#PROC=athlon
-#OPTIONS+=-m64
-endif
-ifeq ($(PROC),sparc64)
-#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
-#This works for even old (2.96) versions of gcc and provides a small boost either way.
-#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it.
-#So we go lowest common available by gcc and go a step down, still a step up from
-#the default as we now have a better instruction set to work with. - Belgarath
-PROC=ultrasparc
-OPTIONS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi)
-OPTIONS+=$(shell if $(CC) -mcpu=v8 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mcpu=v8"; fi)
-OPTIONS+=-fomit-frame-pointer
-endif
-
-endif
-
-ifeq (${OSARCH},Darwin)
-SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
-else
-SOLINK=-shared -Xlinker -x
-endif
-ifeq (${OSARCH},SunOS)
-SOLINK=-shared -fpic -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
-endif
-
-ifeq (${OSARCH},FreeBSD)
+ifeq ($(OSARCH),FreeBSD)
 OSVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
-CFLAGS+=$(if ${OSVERSION}<500016,-D_THREAD_SAFE)
-LIBS+=$(if ${OSVERSION}<502102,-lc_r,-pthread)
+CFLAGS+=$(if $(OSVERSION)<500016,-D_THREAD_SAFE)
+LIBS+=$(if $(OSVERSION)<502102,-lc_r,-pthread)
 INCLUDE+=-I/usr/local/include
 CFLAGS+=$(shell if [ -d /usr/local/include/spandsp ]; then echo "-I/usr/local/include/spandsp"; fi)
 endif # FreeBSD
 
-ifeq (${OSARCH},NetBSD)
+ifeq ($(OSARCH),NetBSD)
 CFLAGS+=-pthread
 INCLUDE+=-I/usr/local/include
 endif
 
-ifeq (${OSARCH},OpenBSD)
+ifeq ($(OSARCH),OpenBSD)
 CFLAGS+=-pthread
 endif
 
-#Tell gcc to optimize the asterisk's code
-OPTIMIZE+=-O6
-
-CFLAGS+=$(OPTIMIZE)
-CFLAGS+= $(OPTIONS)
-
-CC=gcc
-
-
-format_mp3.so: $(MP3OBJS)
-	$(CC) $(CFLAGS) $(SOLINK) -o $@ $(MP3OBJS)
-
-all: $(MODS)
+all: $(MP3OBJS)
 
 clean:
 	rm -f *.o *.so *~
 	rm -f .*.o.d
-
-install: all
-	$(INSTALL) -m 755 format_mp3.so $(DESTDIR)$(MODULES_DIR)
-
-autoload: all
-	asterisk -rx "unload format_mp3.so"
-	$(INSTALL) -m 755 format_mp3.so $(DESTDIR)$(MODULES_DIR)
-	asterisk -rx "load format_mp3.so"
-
-include ../Makefile.rules




More information about the asterisk-addons-commits mailing list