File: Makefile

package info (click to toggle)
asterisk 1:13.14.1~dfsg-2+deb9u4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 50,572 kB
  • sloc: ansic: 675,986; sh: 11,363; python: 3,925; sql: 3,634; makefile: 3,153; perl: 3,103; yacc: 2,164; cpp: 2,093; xml: 786; tcl: 113; php: 62
file content (96 lines) | stat: -rw-r--r-- 2,196 bytes parent folder | download
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#
# Asterisk -- An open source telephony toolkit.
# 
# 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
#

-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps

MODULE_PREFIX=codec
MENUSELECT_CATEGORY=CODECS
MENUSELECT_DESCRIPTION=Codec Translators

SUB_GSM := gsm

SUB_ILBC := ilbc
LIBILBC := $(SUB_ILBC)/libilbc.a

SUB_LPC10 := lpc10
LIBLPC10 := $(SUB_LPC10)/liblpc10.a

SUB_DIRS := \
	$(SUB_GSM) \
	$(SUB_LPC10) \

all: _all

include $(ASTTOPDIR)/Makefile.moddir_rules


ifneq ($(GSM_INTERNAL),no)
GSM_INCLUDE := -I$(SUB_GSM)/inc

$(if $(filter codec_gsm,$(EMBEDDED_MODS)),modules.link,codec_gsm.so): $(SUB_GSM)/lib/libgsm.a
endif

# Don't run the implicit rules for this target.
$(SUB_GSM)/lib/libgsm.a: $(SUB_GSM) ;

$(SUB_GSM):
	@mkdir -p $(SUB_GSM)/lib
	@$(MAKE) -C $(SUB_GSM) lib/libgsm.a


clean::
	for dir in $(SUB_DIRS); do \
		$(MAKE) -C $$dir clean; \
	done
	rm -f g722/*.[oai]
	rm -f speex/*.[oai]

.PHONY: $(SUB_DIRS)


$(if $(filter codec_lpc10,$(EMBEDDED_MODS)),modules.link,codec_lpc10.so): $(LIBLPC10)

# Don't run the implicit rules for this target.
$(LIBLPC10): $(SUB_LPC10) ;

$(SUB_LPC10):
	@$(MAKE) -C $(SUB_LPC10) all


ifneq ($(ILBC_INTERNAL),no)
$(if $(filter codec_ilbc,$(EMBEDDED_MODS)),modules.link,codec_ilbc.so): $(LIBILBC)
else
ILBC_INCLUDE += -DILBC_WEBRTC
endif

# Don't run the implicit rules for this target.
$(LIBILBC): $(SUB_ILBC) ;

$(SUB_ILBC):
	@$(MAKE) -C $(SUB_ILBC) all _ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations -Wshadow,$(_ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"


$(if $(filter codec_g722,$(EMBEDDED_MODS)),modules.link,codec_g722.so): g722/g722_encode.o g722/g722_decode.o

g722/g722_encode.o g722/g722_decode.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,codec_g722)


ifeq ($(BUILD_CPU),x86_64)
SPEEX_RESAMPLE_CFLAGS:=-fPIC
else
SPEEX_RESAMPLE_CFLAGS:=
endif

$(if $(filter codec_resample,$(EMBEDDED_MODS)),modules.link,codec_resample.so): speex/resample.o

speex/resample.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,codec_resample) $(SPEEX_RESAMPLE_CFLAGS)