1999-12-05 01:40:43 +00:00
|
|
|
#
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
#
|
|
|
|
# Makefile for PBX frontends (dynamically loaded)
|
|
|
|
#
|
1999-12-16 00:19:15 +00:00
|
|
|
# Copyright (C) 1999, Mark Spencer
|
1999-12-05 01:40:43 +00:00
|
|
|
#
|
|
|
|
# Mark Spencer <markster@linux-support.net>
|
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Uncomment if you have g723.1 code (with the same API as the Annex-A code
|
|
|
|
# and have placed it in the g723.1 directory and/or the Annex-B code in
|
|
|
|
# g723.1b)
|
|
|
|
#
|
|
|
|
#MODG723=codec_g723_1.so codec_g723_1b.so
|
|
|
|
MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so")
|
|
|
|
MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
|
2002-11-15 19:58:31 +00:00
|
|
|
MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/local/include/speex.h ] && echo "codec_speex.so")
|
2003-04-15 04:36:52 +00:00
|
|
|
MODILBC=$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so")
|
2003-04-27 18:13:11 +00:00
|
|
|
CFLAGS+=-fPIC
|
2003-10-21 02:57:29 +00:00
|
|
|
CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include")
|
1999-12-05 01:40:43 +00:00
|
|
|
|
|
|
|
LIBG723=g723.1/libg723.a
|
|
|
|
LIBG723B=g723.1b/libg723b.a
|
|
|
|
LIBGSM=gsm/lib/libgsm.a
|
2003-10-27 20:00:41 +00:00
|
|
|
LIBGSMT=gsm/lib/libgsm.a
|
2000-01-05 17:22:42 +00:00
|
|
|
LIBLPC10=lpc10/liblpc10.a
|
2003-10-21 02:57:29 +00:00
|
|
|
LIBSPEEX=$(shell [ -f /usr/local/lib/libspeex.a ] && echo "-L/usr/local/lib")
|
|
|
|
LIBSPEEX+=-lspeex -lm
|
2003-04-15 04:36:52 +00:00
|
|
|
LIBILBC=ilbc/libilbc.a
|
1999-12-05 01:40:43 +00:00
|
|
|
|
2003-11-04 02:40:09 +00:00
|
|
|
CODECS+=$(MODG723) $(MODSPEEX) $(MODILBC) codec_gsm.so codec_lpc10.so \
|
2004-02-25 04:10:32 +00:00
|
|
|
codec_adpcm.so codec_ulaw.so codec_alaw.so codec_a_mu.so \
|
|
|
|
codec_g726.so
|
1999-12-05 01:40:43 +00:00
|
|
|
|
2003-05-06 00:00:20 +00:00
|
|
|
all: depend $(CODECS)
|
1999-12-05 01:40:43 +00:00
|
|
|
|
|
|
|
clean:
|
2003-05-06 00:00:20 +00:00
|
|
|
rm -f *.so *.o .depend
|
2003-04-23 16:23:12 +00:00
|
|
|
! [ -d g723.1 ] || $(MAKE) -C g723.1 clean
|
|
|
|
! [ -d g723.1b ] || $(MAKE) -C g723.1b clean
|
|
|
|
$(MAKE) -C gsm clean
|
|
|
|
$(MAKE) -C lpc10 clean
|
|
|
|
$(MAKE) -C ilbc clean
|
1999-12-05 01:40:43 +00:00
|
|
|
|
|
|
|
$(LIBG723):
|
2003-04-23 16:23:12 +00:00
|
|
|
$(MAKE) -C g723.1 all
|
1999-12-05 01:40:43 +00:00
|
|
|
|
2002-06-21 01:40:13 +00:00
|
|
|
gsm/lib/libgsm.a:
|
2003-04-23 16:23:12 +00:00
|
|
|
$(MAKE) -C gsm lib/libgsm.a
|
1999-12-05 01:40:43 +00:00
|
|
|
|
|
|
|
$(LIBG723B):
|
2003-04-23 16:23:12 +00:00
|
|
|
$(MAKE) -C g723.1b all
|
1999-12-05 01:40:43 +00:00
|
|
|
|
2000-01-05 17:22:42 +00:00
|
|
|
$(LIBLPC10):
|
2003-04-23 16:23:12 +00:00
|
|
|
$(MAKE) -C lpc10 all
|
2000-01-05 17:22:42 +00:00
|
|
|
|
2003-04-15 04:36:52 +00:00
|
|
|
$(LIBILBC):
|
2003-04-23 16:23:12 +00:00
|
|
|
$(MAKE) -C ilbc all
|
2003-04-15 04:36:52 +00:00
|
|
|
|
|
|
|
codec_ilbc.so: codec_ilbc.o $(LIBILBC)
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< $(LIBILBC)
|
2003-04-15 04:36:52 +00:00
|
|
|
|
1999-12-05 01:40:43 +00:00
|
|
|
codec_g723_1.so : codec_g723_1.o $(LIBG723)
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< $(LIBG723)
|
1999-12-05 01:40:43 +00:00
|
|
|
|
|
|
|
codec_g723_1b.o : codec_g723_1.c
|
2000-01-05 17:22:42 +00:00
|
|
|
$(CC) -c -o $@ $(CFLAGS) -DANNEX_B -Dsingle $<
|
1999-12-05 01:40:43 +00:00
|
|
|
|
|
|
|
codec_g723_1b.so : codec_g723_1b.o $(LIBG723B)
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< $(LIBG723B) -lm
|
1999-12-05 01:40:43 +00:00
|
|
|
|
2002-06-21 01:40:13 +00:00
|
|
|
codec_gsm.so: codec_gsm.o $(LIBGSMT)
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< $(LIBGSM)
|
1999-12-05 01:40:43 +00:00
|
|
|
|
2002-08-29 04:53:56 +00:00
|
|
|
codec_speex.so: codec_speex.o
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< $(LIBSPEEX)
|
2002-08-29 04:53:56 +00:00
|
|
|
|
2000-01-05 17:22:42 +00:00
|
|
|
codec_lpc10.so: codec_lpc10.o $(LIBLPC10)
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< $(LIBLPC10) -lm
|
2000-01-05 17:22:42 +00:00
|
|
|
|
1999-12-05 01:40:43 +00:00
|
|
|
%.so : %.o
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $<
|
1999-12-05 01:40:43 +00:00
|
|
|
|
2003-05-06 00:00:20 +00:00
|
|
|
include .depend
|
|
|
|
|
1999-12-05 01:40:43 +00:00
|
|
|
install: all
|
2003-10-25 17:27:53 +00:00
|
|
|
for x in $(CODECS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
2003-05-06 00:00:20 +00:00
|
|
|
|
|
|
|
depend: .depend
|
|
|
|
|
|
|
|
.depend:
|
|
|
|
../mkdep $(CFLAGS) `ls *.c`
|