Fix some symbol and Makefile issues
authorMark Spencer <markster@digium.com>
Wed, 23 Apr 2003 16:23:12 +0000 (16:23 +0000)
committerMark Spencer <markster@digium.com>
Wed, 23 Apr 2003 16:23:12 +0000 (16:23 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@886 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile
cdr/Makefile
channels/h323/Makefile
codecs/Makefile
codecs/gsm/Makefile
codecs/ilbc/LPCencode.c
codecs/ilbc/helpfun.c
codecs/ilbc/helpfun.h

index 9edd35c..6b8c4a6 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -100,7 +100,7 @@ _all: all
        @echo " + cannot be run before being installed by   +"  
        @echo " + running:                                  +"  
        @echo " +                                           +"
        @echo " + cannot be run before being installed by   +"  
        @echo " + running:                                  +"  
        @echo " +                                           +"
-       @echo " +               make install                +"  
+       @echo " +               $(MAKE) install                +"  
        @echo " +-------------------------------------------+"  
 
 all: asterisk subdirs
        @echo " +-------------------------------------------+"  
 
 all: asterisk subdirs
@@ -114,11 +114,11 @@ editline/config.h:
        fi
 
 editline/libedit.a: editline/config.h
        fi
 
 editline/libedit.a: editline/config.h
-       make -C editline libedit.a
+       $(MAKE) -C editline libedit.a
 
 db1-ast/libdb1.a: 
        @if [ -d db1-ast ]; then \
 
 db1-ast/libdb1.a: 
        @if [ -d db1-ast ]; then \
-               make -C db1-ast libdb1.a ; \
+               $(MAKE) -C db1-ast libdb1.a ; \
        else \
                echo "You need to do a cvs update -d not just cvs update"; \
                exit 1; \
        else \
                echo "You need to do a cvs update -d not just cvs update"; \
                exit 1; \
@@ -134,8 +134,17 @@ _version:
 
 ast_expr.o: ast_expr.c
 
 
 ast_expr.o: ast_expr.c
 
+cli.o: cli.c build.h
+
+ifneq ($(strip $(ASTERISKVERSION)),)
+asterisk.o: asterisk.c .version
+
+build.h: .version
+       ./make_build_h
+else
 build.h:
        ./make_build_h
 build.h:
        ./make_build_h
+endif
 
 asterisk: .version build.h editline/libedit.a db1-ast/libdb1.a $(OBJS)
        gcc -o asterisk -rdynamic $(OBJS) $(LIBS) $(LIBEDIT) db1-ast/libdb1.a
 
 asterisk: .version build.h editline/libedit.a db1-ast/libdb1.a $(OBJS)
        gcc -o asterisk -rdynamic $(OBJS) $(LIBS) $(LIBEDIT) db1-ast/libdb1.a
@@ -148,8 +157,8 @@ clean:
        rm -f *.o *.so asterisk
        rm -f build.h 
        rm -f ast_expr.c
        rm -f *.o *.so asterisk
        rm -f build.h 
        rm -f ast_expr.c
-       @if [ -e editline/Makefile ]; then make -C editline clean ; fi
-       make -C db1-ast clean
+       @if [ -e editline/Makefile ]; then $(MAKE) -C editline clean ; fi
+       $(MAKE) -C db1-ast clean
 
 datafiles: all
        mkdir -p $(ASTVARLIBDIR)/sounds/digits
 
 datafiles: all
        mkdir -p $(ASTVARLIBDIR)/sounds/digits
@@ -179,7 +188,7 @@ datafiles: all
 update: 
        @if [ -d CVS ]; then \
                echo "Updating from CVS..." ; \
 update: 
        @if [ -d CVS ]; then \
                echo "Updating from CVS..." ; \
-               cvs update -d; \
+               cvs -q update -Pd; \
                rm -f .version; \
        else \
                echo "Not CVS";  \
                rm -f .version; \
        else \
                echo "Not CVS";  \
@@ -216,14 +225,14 @@ bininstall: all
        @echo " + configuration files (overwriting any      +"
        @echo " + existing config files), run:              +"  
        @echo " +                                           +"
        @echo " + configuration files (overwriting any      +"
        @echo " + existing config files), run:              +"  
        @echo " +                                           +"
-       @echo " +               make samples                +"
+       @echo " +               $(MAKE) samples                +"
        @echo " +                                           +"
        @echo " +-----------------  or ---------------------+"
        @echo " +                                           +"
        @echo " + You can go ahead and install the asterisk +"
        @echo " + program documentation now or later run:   +"
        @echo " +                                           +"
        @echo " +                                           +"
        @echo " +-----------------  or ---------------------+"
        @echo " +                                           +"
        @echo " + You can go ahead and install the asterisk +"
        @echo " + program documentation now or later run:   +"
        @echo " +                                           +"
-       @echo " +              make progdocs                +"
+       @echo " +              $(MAKE) progdocs                +"
        @echo " +                                           +"
        @echo " + **Note** This requires that you have      +"
        @echo " + doxygen installed on your local system    +"
        @echo " +                                           +"
        @echo " + **Note** This requires that you have      +"
        @echo " + doxygen installed on your local system    +"
@@ -305,8 +314,8 @@ rpm: __rpm
 __rpm: _version
        rm -rf /tmp/asterisk ; \
        mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
 __rpm: _version
        rm -rf /tmp/asterisk ; \
        mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
-       make INSTALL_PREFIX=/tmp/asterisk install ; \
-       make INSTALL_PREFIX=/tmp/asterisk samples ; \
+       $(MAKE) INSTALL_PREFIX=/tmp/asterisk install ; \
+       $(MAKE) INSTALL_PREFIX=/tmp/asterisk samples ; \
        mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
        cp -f redhat/asterisk /tmp/asterisk/etc/rc.d/init.d/ ; \
        cp -f redhat/rpmrc /tmp/asterisk/ ; \
        mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
        cp -f redhat/asterisk /tmp/asterisk/etc/rc.d/init.d/ ; \
        cp -f redhat/rpmrc /tmp/asterisk/ ; \
@@ -329,6 +338,6 @@ config:
 
        
 dont-optimize:
 
        
 dont-optimize:
-       make OPTIMIZE= K6OPT= install
+       $(MAKE) OPTIMIZE= K6OPT= install
 
 valgrind: dont-optimize
 
 valgrind: dont-optimize
index 62f5ed1..36b4dba 100755 (executable)
@@ -18,12 +18,14 @@ CFLAGS+=
 #
 # MySQL stuff...  Autoconf anyone??
 #
 #
 # MySQL stuff...  Autoconf anyone??
 #
-MODS+=$(shell if [ -d /usr/include/mysql ] || [ -d /usr/local/include/mysql ] || [ -d /opt/mysql/include ]; then echo "cdr_mysql.so"; fi)
+MODS+=$(shell if [ -d /usr/local/mysql/include ] || [ --d /usr/include/mysql ] || [ -d /usr/local/include/mysql ] || [ -d /opt/mysql/include ]; then echo "cdr_mysql.so"; fi)
+CFLAGS+=$(shell if [ -d /usr/local/mysql/include ]; then echo "-I/usr/local/mysql/include"; fi)
 CFLAGS+=$(shell if [ -d /usr/include/mysql ]; then echo "-I/usr/include/mysql"; fi)
 CFLAGS+=$(shell if [ -d /usr/local/include/mysql ]; then echo "-I/usr/local/include/mysql"; fi)
 CFLAGS+=$(shell if [ -d /opt/mysql/include/mysql ]; then echo "-I/opt/mysql/include/mysql"; fi)
 MLFLAGS=
 MLFLAGS+=$(shell if [ -d /usr/lib/mysql ]; then echo "-L/usr/lib/mysql"; fi)
 CFLAGS+=$(shell if [ -d /usr/include/mysql ]; then echo "-I/usr/include/mysql"; fi)
 CFLAGS+=$(shell if [ -d /usr/local/include/mysql ]; then echo "-I/usr/local/include/mysql"; fi)
 CFLAGS+=$(shell if [ -d /opt/mysql/include/mysql ]; then echo "-I/opt/mysql/include/mysql"; fi)
 MLFLAGS=
 MLFLAGS+=$(shell if [ -d /usr/lib/mysql ]; then echo "-L/usr/lib/mysql"; fi)
+MLFLAGS+=$(shell if [ -d /usr/local/mysql/lib ]; then echo "-L/usr/local/mysql/lib"; fi)
 MLFLAGS+=$(shell if [ -d /usr/local/lib/mysql ]; then echo "-L/usr/local/lib/mysql"; fi)
 MLFLAGS+=$(shell if [ -d /opt/mysql/lib/mysql ]; then echo "-L/opt/mysql/lib/mysql"; fi)
 
 MLFLAGS+=$(shell if [ -d /usr/local/lib/mysql ]; then echo "-L/usr/local/lib/mysql"; fi)
 MLFLAGS+=$(shell if [ -d /opt/mysql/lib/mysql ]; then echo "-L/opt/mysql/lib/mysql"; fi)
 
index efcc5da..740306d 100755 (executable)
@@ -43,7 +43,7 @@ install: all
        @echo " + configuration file (overwriting existing   +"
        @echo " + config file), run:                         +"
        @echo " +                                            +"
        @echo " + configuration file (overwriting existing   +"
        @echo " + config file), run:                         +"
        @echo " +                                            +"
-       @echo " +               make samples                 +"
+       @echo " +               $(MAKE) samples                 +"
        @echo " +                                            +"
        @echo " +                                            +"
  
        @echo " +                                            +"
        @echo " +                                            +"
  
index 00778b8..1ce2d33 100755 (executable)
@@ -40,30 +40,30 @@ all: $(CODECS)
 
 clean:
        rm -f *.so *.o
 
 clean:
        rm -f *.so *.o
-       ! [ -d g723.1 ] || make -C g723.1 clean
-       ! [ -d g723.1b ] || make -C g723.1b clean
-       make -C gsm clean
-       make -C mp3 clean
-       make -C lpc10 clean
-       make -C ilbc clean
+       ! [ -d g723.1 ] || $(MAKE) -C g723.1 clean
+       ! [ -d g723.1b ] || $(MAKE) -C g723.1b clean
+       $(MAKE) -C gsm clean
+       $(MAKE) -C mp3 clean
+       $(MAKE) -C lpc10 clean
+       $(MAKE) -C ilbc clean
 
 $(LIBG723):
 
 $(LIBG723):
-       make -C g723.1 all
+       $(MAKE) -C g723.1 all
 
 gsm/lib/libgsm.a:
 
 gsm/lib/libgsm.a:
-       make -C gsm lib/libgsm.a
+       $(MAKE) -C gsm lib/libgsm.a
 
 $(LIBG723B):
 
 $(LIBG723B):
-       make -C g723.1b all
+       $(MAKE) -C g723.1b all
 
 $(LIBMP3):
 
 $(LIBMP3):
-       make -C mp3 all
+       $(MAKE) -C mp3 all
 
 $(LIBLPC10):
 
 $(LIBLPC10):
-       make -C lpc10 all
+       $(MAKE) -C lpc10 all
 
 $(LIBILBC):
 
 $(LIBILBC):
-       make -C ilbc all
+       $(MAKE) -C ilbc all
 
 codec_ilbc.so: codec_ilbc.o $(LIBILBC)
        $(CC) -shared -Xlinker -x -o $@ $< $(LIBILBC)
 
 codec_ilbc.so: codec_ilbc.o $(LIBILBC)
        $(CC) -shared -Xlinker -x -o $@ $< $(LIBILBC)
index 721879d..01ce9c9 100755 (executable)
@@ -351,12 +351,12 @@ $(LIB):
 
 gsminstall:
                -if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then      \
 
 gsminstall:
                -if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then      \
-                       make $(GSM_INSTALL_TARGETS) ;   \
+                       $(MAKE) $(GSM_INSTALL_TARGETS) ;        \
                fi
 
 toastinstall:
                -if [ x"$(TOAST_INSTALL_ROOT)" != x ]; then     \
                fi
 
 toastinstall:
                -if [ x"$(TOAST_INSTALL_ROOT)" != x ]; then     \
-                       make $(TOAST_INSTALL_TARGETS);  \
+                       $(MAKE) $(TOAST_INSTALL_TARGETS);       \
                fi
 
 gsmuninstall:
                fi
 
 gsmuninstall:
index 330796d..251cd3f 100755 (executable)
@@ -41,13 +41,13 @@ void SimpleAnalysis(
         is = LPC_LOOKBACK; 
  
         if (k < (LPC_N - 1)) { 
         is = LPC_LOOKBACK; 
  
         if (k < (LPC_N - 1)) { 
-            window(temp, lpc_winTbl, lpc_buffer, BLOCKL); 
+            lbc_window(temp, lpc_winTbl, lpc_buffer, BLOCKL); 
         } else { 
         } else { 
-            window(temp, lpc_asymwinTbl, lpc_buffer + is, BLOCKL); 
+            lbc_window(temp, lpc_asymwinTbl, lpc_buffer + is, BLOCKL); 
         } 
          
         autocorr(r, temp, BLOCKL, LPC_FILTERORDER); 
         } 
          
         autocorr(r, temp, BLOCKL, LPC_FILTERORDER); 
-        window(r, r, lpc_lagwinTbl, LPC_FILTERORDER + 1); 
+        lbc_window(r, r, lpc_lagwinTbl, LPC_FILTERORDER + 1); 
          
         levdurb(lp, temp, r, LPC_FILTERORDER); 
         bwexpand(lp2, lp, LPC_CHIRP_SYNTDENUM, LPC_FILTERORDER+1); 
          
         levdurb(lp, temp, r, LPC_FILTERORDER); 
         bwexpand(lp2, lp, LPC_CHIRP_SYNTDENUM, LPC_FILTERORDER+1); 
index 8788e78..936afd6 100755 (executable)
@@ -42,7 +42,7 @@ void autocorr(
  *  window multiplication   
  *---------------------------------------------------------------*/ 
  
  *  window multiplication   
  *---------------------------------------------------------------*/ 
  
-void window(  
+void lbc_window(  
     float *z,       /* (o) the windowed data */ 
     const float *x, /* (i) the original data vector */ 
     const float *y, /* (i) the window */ 
     float *z,       /* (o) the windowed data */ 
     const float *x, /* (i) the original data vector */ 
     const float *y, /* (i) the window */ 
index be6e727..01edc87 100755 (executable)
@@ -21,7 +21,7 @@ void autocorr(
     int order       /* largest lag for calculated autocorrelations */ 
 ); 
  
     int order       /* largest lag for calculated autocorrelations */ 
 ); 
  
-void window(  
+void lbc_window(  
     float *z,       /* (o) the windowed data */ 
     const float *x, /* (i) the original data vector */ 
     const float *y, /* (i) the window */ 
     float *z,       /* (o) the windowed data */ 
     const float *x, /* (i) the original data vector */ 
     const float *y, /* (i) the window */