Actually use Zaptel CFLAGS if using Zaptel instead of DAHDI
[asterisk-bristuff.git] / codecs / Makefile
bloba32d157a8c96241a1304f415bbe3d6632e4b4dcc
2 # Asterisk -- A telephony toolkit for Linux.
3 #
4 # Makefile for codec 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 -include ../menuselect.makeopts ../menuselect.makedeps
16 MENUSELECT_CATEGORY=CODECS
17 MENUSELECT_DESCRIPTION=Codec Translators
19 ALL_C_MODS:=$(patsubst %.c,%,$(wildcard codec_*.c))
20 ALL_CC_MODS:=$(patsubst %.cc,%,$(wildcard codec_*.cc))
22 C_MODS:=$(filter-out $(MENUSELECT_CODECS),$(ALL_C_MODS))
23 CC_MODS:=$(filter-out $(MENUSELECT_CODECS),$(ALL_CC_MODS))
25 LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
27 ifneq ($(findstring codecs,$(MENUSELECT_EMBED)),)
28 EMBEDDED_MODS:=$(LOADABLE_MODS)
29 LOADABLE_MODS:=
30 endif
32 LIBILBC:=ilbc/libilbc.a
33 LIBLPC10:=lpc10/liblpc10.a
35 all: _all
37 include $(ASTTOPDIR)/Makefile.moddir_rules
39 ifneq ($(GSM_INTERNAL),no)
40 GSM_INCLUDE:=-Igsm/inc
41 $(if $(filter codec_gsm,$(EMBEDDED_MODS)),modules.link,codec_gsm.so): gsm/lib/libgsm.a
42 endif
44 clean::
45 $(MAKE) -C gsm clean
46 $(MAKE) -C lpc10 clean
47 $(MAKE) -C ilbc clean
49 gsm/lib/libgsm.a:
50 @mkdir -p gsm/lib
51 @$(MAKE) -C gsm lib/libgsm.a
53 $(LIBLPC10):
54 @$(MAKE) -C lpc10 all
56 $(if $(filter codec_lpc10,$(EMBEDDED_MODS)),modules.link,codec_lpc10.so): $(LIBLPC10)
58 $(LIBILBC):
59 @$(MAKE) -C ilbc all ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations,$(ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"
61 $(if $(filter codec_ilbc,$(EMBEDDED_MODS)),modules.link,codec_ilbc.so): $(LIBILBC)