aboutsummaryrefslogtreecommitdiffstats
path: root/codecs/Makefile
blob: 37aef4345594b32f6fa8e43eb7394604d3ee1d06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# Asterisk -- A telephony toolkit for Linux.
# 
# Makefile for codec modules
#
# Copyright (C) 1999-2006, Digium, Inc.
#
# Mark Spencer <markster@digium.com>
#
# This program is free software, distributed under the terms of
# the GNU General Public License
#

ifneq ($(wildcard ../menuselect.makeopts),)
  include ../menuselect.makeopts
  include ../menuselect.makedeps
endif

SELECTED_MODS:=$(filter-out $(MENUSELECT_CODECS),$(patsubst %.c,%,$(wildcard codec_*.c)))

LIBILBC:=ilbc/libilbc.a
LIBLPC10:=lpc10/liblpc10.a

all: _all

ifeq ($(GSM_LIB),internal)
GSM_INCLUDE:=-Igsm/inc
GSM_LIB:=

codec_gsm.so: gsm/lib/libgsm.a
endif

include $(ASTTOPDIR)/Makefile.moddir_rules

clean::
	$(MAKE) -C gsm clean
	$(MAKE) -C lpc10 clean
	$(MAKE) -C ilbc clean

gsm/lib/libgsm.a:
	CFLAGS="$(ASTCFLAGS) -I." $(MAKE) -C gsm lib/libgsm.a

$(LIBLPC10):
	CFLAGS="$(ASTCFLAGS)" $(MAKE) -C lpc10 all

codec_lpc10.so: $(LIBLPC10)

$(LIBILBC):
	CFLAGS="$(ASTCFLAGS)" $(MAKE) -C ilbc all

codec_ilbc.so: $(LIBILBC)