res_pjsip/res_pjsip_callerid: NULL check on caller id name string
[asterisk/asterisk.git] / codecs / Makefile
1 #
2 # Asterisk -- An open source telephony toolkit.
3
4 # Makefile for codec modules
5 #
6 # Copyright (C) 1999-2006, Digium, Inc.
7 #
8 # Mark Spencer <markster@digium.com>
9 #
10 # This program is free software, distributed under the terms of
11 # the GNU General Public License
12 #
13
14 -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
15
16 MODULE_PREFIX=codec
17 MENUSELECT_CATEGORY=CODECS
18 MENUSELECT_DESCRIPTION=Codec Translators
19
20 SUB_GSM := gsm
21
22 SUB_ILBC := ilbc
23 LIBILBC := $(SUB_ILBC)/libilbc.a
24
25 SUB_LPC10 := lpc10
26 LIBLPC10 := $(SUB_LPC10)/liblpc10.a
27
28 SUB_DIRS := \
29         $(SUB_GSM) \
30         $(SUB_ILBC) \
31         $(SUB_LPC10) \
32
33 all: _all
34
35 include $(ASTTOPDIR)/Makefile.moddir_rules
36
37
38 ifneq ($(GSM_INTERNAL),no)
39 GSM_INCLUDE := -I$(SUB_GSM)/inc
40
41 codec_gsm.so: $(SUB_GSM)/lib/libgsm.a
42 endif
43
44 # Don't run the implicit rules for this target.
45 $(SUB_GSM)/lib/libgsm.a: $(SUB_GSM) ;
46
47 $(SUB_GSM):
48         @mkdir -p $(SUB_GSM)/lib
49         @$(MAKE) -C $(SUB_GSM) lib/libgsm.a
50
51
52 clean::
53         for dir in $(SUB_DIRS); do \
54                 $(MAKE) -C $$dir clean; \
55         done
56
57 .PHONY: $(SUB_DIRS)
58
59
60 codec_lpc10.so: $(LIBLPC10)
61
62 # Don't run the implicit rules for this target.
63 $(LIBLPC10): $(SUB_LPC10) ;
64
65 $(SUB_LPC10):
66         @$(MAKE) -C $(SUB_LPC10) all
67
68
69 ifneq ($(ILBC_INTERNAL),no)
70 codec_ilbc.so: $(LIBILBC)
71 else
72 ILBC_INCLUDE += -DILBC_WEBRTC
73 endif
74
75 # Don't run the implicit rules for this target.
76 $(LIBILBC): $(SUB_ILBC) ;
77
78 $(SUB_ILBC):
79         @$(MAKE) -C $(SUB_ILBC) all _ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations -Wshadow,$(_ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"
80
81
82
83 $(call MOD_ADD_C,codec_g722,g722/g722_encode.c g722/g722_decode.c)
84
85
86 ifeq ($(BUILD_CPU),x86_64)
87 SPEEX_RESAMPLE_CFLAGS:=-fPIC
88 else
89 SPEEX_RESAMPLE_CFLAGS:=
90 endif
91
92 $(call MOD_ADD_C,codec_resample,speex/resample.c)
93 speex/resample.o: _ASTCFLAGS+=$(SPEEX_RESAMPLE_CFLAGS)