2 # Asterisk -- A telephony toolkit for Linux.
4 # Makefile for file format modules
6 # Copyright (C) 1999-2006, Digium, Inc.
8 # Mark Spencer <markster@digium.com>
10 # This program is free software, distributed under the terms of
11 # the GNU General Public License
14 MODS:=$(patsubst %.c,%.so,$(wildcard format_*.c))
16 MODS:=$(filter-out format_pcm_alaw.so,$(MODS))
17 MODS:=$(filter-out format_au.so,$(MODS))
19 # merged. format_pcm_alaw.so
20 # merged. format_au.so
23 # (on FreeBSD is in /usr/local/include/...
25 MODS:=$(filter-out format_ogg_vorbis.so,$(MODS))
27 ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vorbis/codec.h),)
28 ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/vorbis/codec.h),)
29 MODS:=$(filter-out format_ogg_vorbis.so,$(MODS))
33 GSMLIB=../codecs/gsm/lib/libgsm.a
35 ifeq (${OSARCH},CYGWIN)
36 CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
37 CYGSOLIB=-L.. -L. -lasterisk.dll
51 $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
53 ifneq ($(wildcard .depend),)
57 format_mp3.so : format_mp3.o
58 $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lm
60 format_ogg_vorbis.so : format_ogg_vorbis.o
61 $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm
64 for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
71 ../build_tools/mkdep $(CFLAGS) `ls *.c`