1999-12-05 07:28:29 +00:00
|
|
|
#
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
#
|
|
|
|
# Makefile for file format modules
|
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Copyright (C) 1999-2005, Digium
|
1999-12-05 07:28:29 +00:00
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Mark Spencer <markster@digium.com>
|
1999-12-05 07:28:29 +00:00
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
|
|
|
|
2003-11-04 02:40:09 +00:00
|
|
|
FORMAT_LIBS=format_gsm.so format_wav.so \
|
2003-06-28 22:50:47 +00:00
|
|
|
format_wav_gsm.so format_vox.so format_pcm.so format_g729.so \
|
2004-09-05 18:00:55 +00:00
|
|
|
format_pcm_alaw.so format_h263.so format_g726.so format_ilbc.so \
|
2006-01-07 17:54:22 +00:00
|
|
|
format_sln.so format_au.so format_h264.so
|
2001-05-26 17:39:42 +00:00
|
|
|
FORMAT_LIBS+=format_jpeg.so
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2003-06-28 22:50:47 +00:00
|
|
|
#
|
2005-08-30 02:54:02 +00:00
|
|
|
# G723 simple frame is deprecated
|
2003-06-28 22:50:47 +00:00
|
|
|
#
|
2004-12-29 12:12:59 +00:00
|
|
|
FORMAT_LIBS+=format_g723.so
|
1999-12-05 07:28:29 +00:00
|
|
|
|
2005-07-20 00:25:54 +00:00
|
|
|
#
|
|
|
|
# OGG/Vorbis format
|
|
|
|
#
|
2005-08-30 02:54:02 +00:00
|
|
|
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vorbis/codec.h),)
|
|
|
|
FORMAT_LIBS+=format_ogg_vorbis.so
|
|
|
|
endif
|
|
|
|
|
1999-12-05 07:28:29 +00:00
|
|
|
GSMLIB=../codecs/gsm/lib/libgsm.a
|
|
|
|
|
2005-11-01 21:53:30 +00:00
|
|
|
ifeq (${OSARCH},CYGWIN)
|
|
|
|
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
|
|
|
|
CYGSOLIB=-L.. -L. -lasterisk.dll
|
|
|
|
else
|
2003-04-27 18:13:11 +00:00
|
|
|
CFLAGS+=-fPIC
|
2005-11-01 21:53:30 +00:00
|
|
|
endif
|
2003-05-06 00:00:20 +00:00
|
|
|
all: depend $(FORMAT_LIBS)
|
1999-12-05 07:28:29 +00:00
|
|
|
|
|
|
|
clean:
|
2003-05-06 00:00:20 +00:00
|
|
|
rm -f *.so *.o .depend
|
1999-12-05 07:28:29 +00:00
|
|
|
|
|
|
|
%.so : %.o
|
2005-11-01 21:53:30 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
|
1999-12-05 07:28:29 +00:00
|
|
|
|
2003-08-19 16:42:30 +00:00
|
|
|
ifneq ($(wildcard .depend),)
|
2005-08-30 02:54:02 +00:00
|
|
|
include .depend
|
2003-08-19 16:42:30 +00:00
|
|
|
endif
|
2003-05-06 00:00:20 +00:00
|
|
|
|
2001-03-22 04:14:04 +00:00
|
|
|
format_mp3.so : format_mp3.o
|
2005-11-01 21:53:30 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lm
|
2001-03-22 04:14:04 +00:00
|
|
|
|
2005-07-20 00:25:54 +00:00
|
|
|
format_ogg_vorbis.so : format_ogg_vorbis.o
|
2005-11-01 21:53:30 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm
|
2005-07-20 00:25:54 +00:00
|
|
|
|
1999-12-05 07:28:29 +00:00
|
|
|
install: all
|
2003-10-25 17:27:53 +00:00
|
|
|
for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
2003-05-06 00:00:20 +00:00
|
|
|
|
2006-02-01 18:39:41 +00:00
|
|
|
uninstall:
|
|
|
|
|
2003-05-06 00:00:20 +00:00
|
|
|
depend: .depend
|
|
|
|
|
|
|
|
.depend:
|
2005-06-20 17:26:08 +00:00
|
|
|
../build_tools/mkdep $(CFLAGS) `ls *.c`
|