1999-12-05 01:40:43 +00:00
|
|
|
#
|
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Makefile for codec modules
|
1999-12-05 01:40:43 +00:00
|
|
|
#
|
2006-02-11 17:41:36 +00:00
|
|
|
# Copyright (C) 1999-2006, Digium, Inc.
|
1999-12-05 01:40:43 +00:00
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Mark Spencer <markster@digium.com>
|
1999-12-05 01:40:43 +00:00
|
|
|
#
|
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
|
# the GNU General Public License
|
|
|
|
|
#
|
|
|
|
|
|
2007-12-09 21:29:37 +00:00
|
|
|
-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
|
2006-06-07 16:03:31 +00:00
|
|
|
|
2007-12-17 07:25:35 +00:00
|
|
|
MODULE_PREFIX=codec
|
|
|
|
|
MENUSELECT_CATEGORY=CODECS
|
|
|
|
|
MENUSELECT_DESCRIPTION=Codec Translators
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2012-09-25 16:17:06 +00:00
|
|
|
SUB_GSM := gsm
|
|
|
|
|
|
|
|
|
|
SUB_ILBC := ilbc
|
|
|
|
|
LIBILBC := $(SUB_ILBC)/libilbc.a
|
|
|
|
|
|
|
|
|
|
SUB_LPC10 := lpc10
|
|
|
|
|
LIBLPC10 := $(SUB_LPC10)/liblpc10.a
|
|
|
|
|
|
|
|
|
|
SUB_DIRS := \
|
|
|
|
|
$(SUB_GSM) \
|
|
|
|
|
$(SUB_ILBC) \
|
|
|
|
|
$(SUB_LPC10) \
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2006-06-24 23:12:22 +00:00
|
|
|
all: _all
|
2006-06-05 20:46:27 +00:00
|
|
|
|
2006-08-21 02:11:39 +00:00
|
|
|
include $(ASTTOPDIR)/Makefile.moddir_rules
|
1999-12-05 01:40:43 +00:00
|
|
|
|
2007-01-04 18:19:55 +00:00
|
|
|
ifneq ($(GSM_INTERNAL),no)
|
2012-09-25 16:17:06 +00:00
|
|
|
GSM_INCLUDE := -I$(SUB_GSM)/inc
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
$(SUB_GSM):
|
|
|
|
|
@mkdir -p $(SUB_GSM)/lib
|
|
|
|
|
@$(MAKE) -C $(SUB_GSM) lib/libgsm.a
|
|
|
|
|
|
|
|
|
|
# Don't run the implicit rules for this target.
|
|
|
|
|
$(SUB_GSM)/lib/libgsm.a: $(SUB_GSM) ;
|
|
|
|
|
|
|
|
|
|
ifneq ($(GSM_INTERNAL),no)
|
|
|
|
|
$(if $(filter codec_gsm,$(EMBEDDED_MODS)),modules.link,codec_gsm.so): $(SUB_GSM)/lib/libgsm.a
|
2006-06-24 23:12:22 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
clean::
|
2012-09-25 16:17:06 +00:00
|
|
|
for dir in $(SUB_DIRS); do \
|
|
|
|
|
$(MAKE) -C $$dir clean; \
|
|
|
|
|
done
|
2009-05-15 17:37:12 +00:00
|
|
|
rm -f g722/*.[oa]
|
1999-12-05 01:40:43 +00:00
|
|
|
|
2012-09-25 16:17:06 +00:00
|
|
|
.PHONY: $(SUB_DIRS)
|
|
|
|
|
|
|
|
|
|
$(SUB_LPC10):
|
|
|
|
|
@$(MAKE) -C $(SUB_LPC10) all
|
1999-12-05 01:40:43 +00:00
|
|
|
|
2012-09-25 16:17:06 +00:00
|
|
|
# Don't run the implicit rules for this target.
|
|
|
|
|
$(LIBLPC10): $(SUB_LPC10) ;
|
2000-01-05 17:22:42 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
$(if $(filter codec_lpc10,$(EMBEDDED_MODS)),modules.link,codec_lpc10.so): $(LIBLPC10)
|
2006-06-24 23:12:22 +00:00
|
|
|
|
2012-09-25 16:17:06 +00:00
|
|
|
|
|
|
|
|
$(SUB_ILBC):
|
|
|
|
|
@$(MAKE) -C $(SUB_ILBC) all _ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations -Wshadow,$(_ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"
|
|
|
|
|
|
|
|
|
|
# Don't run the implicit rules for this target.
|
|
|
|
|
$(LIBILBC): $(SUB_ILBC) ;
|
2003-04-15 04:36:52 +00:00
|
|
|
|
2006-09-29 22:48:43 +00:00
|
|
|
$(if $(filter codec_ilbc,$(EMBEDDED_MODS)),modules.link,codec_ilbc.so): $(LIBILBC)
|
2006-12-21 00:08:21 +00:00
|
|
|
|
2012-09-25 16:17:06 +00:00
|
|
|
|
2009-05-15 17:37:12 +00:00
|
|
|
$(if $(filter codec_g722,$(EMBEDDED_MODS)),modules.link,codec_g722.so): g722/g722_encode.o g722/g722_decode.o
|
2012-09-25 16:17:06 +00:00
|
|
|
|
2010-03-23 14:22:27 +00:00
|
|
|
g722/g722_encode.o g722/g722_decode.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,codec_g722)
|