merge new_loader_completion branch, including (at least):
[asterisk-bristuff.git] / codecs / Makefile
blob9726979e08846c23ce78ddeb0836858a93b634b5
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 ifneq ($(wildcard $(ASTTOPDIR)/menuselect.makeopts),)
15 include ../menuselect.makeopts
16 include ../menuselect.makedeps
17 endif
19 C_MODS:=$(filter-out $(MENUSELECT_CODECS),$(patsubst %.c,%,$(wildcard codec_*.c)))
20 CC_MODS:=$(filter-out $(MENUSELECT_CODECS),$(patsubst %.cc,%,$(wildcard codec_*.cc)))
22 LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
24 ifneq ($(findstring codecs,$(MENUSELECT_EMBED)),)
25 EMBEDDED_MODS:=$(LOADABLE_MODS)
26 LOADABLE_MODS:=
27 endif
29 LIBILBC:=ilbc/libilbc.a
30 LIBLPC10:=lpc10/liblpc10.a
32 all: _all
34 include $(ASTTOPDIR)/Makefile.moddir_rules
36 ifneq ($(GSM_INTERNAL),)
37 GSM_INCLUDE:=-Igsm/inc
38 $(codec_gsm): gsm/lib/libgsm.a
39 endif
41 clean::
42 $(MAKE) -C gsm clean
43 $(MAKE) -C lpc10 clean
44 $(MAKE) -C ilbc clean
46 gsm/lib/libgsm.a:
47 @mkdir -p gsm/lib
48 @CFLAGS="$(OTHER_SUBDIR_CFLAGS) -I." $(MAKE) -C gsm lib/libgsm.a
50 $(LIBLPC10):
51 @CFLAGS="$(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C lpc10 all
53 $(codec_lpc10): $(LIBLPC10)
55 $(LIBILBC):
56 @CFLAGS="$(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C ilbc all
58 $(codec_ilbc): $(LIBILBC)