summaryrefslogtreecommitdiff
path: root/codecs
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2015-04-13 06:28:32 -0400
committerCorey Farrell <git@cfware.com>2015-04-14 12:53:03 -0400
commit62508d6891f22d01fd9494676951008764ef9ead (patch)
tree5e07039b0fa81f46865696375141551f6cb436be /codecs
parent9f5ba58332119dd283eed3d202b0a64aa0394f12 (diff)
Build System: Create Makefile macro MOD_ADD_SOURCE.
This new macro allows a single line to add all additional sources to a module. This helps prevent modules from missing steps, and makes future changes easier since they can be made in a single place. ASTERISK-24960 #close Reported by: Corey Farrell Change-Id: I38f12d8b72c5e7bb37a879b2fb51761a2855eb4b
Diffstat (limited to 'codecs')
-rw-r--r--codecs/Makefile10
1 files changed, 3 insertions, 7 deletions
diff --git a/codecs/Makefile b/codecs/Makefile
index 32230ae1b..684ccc679 100644
--- a/codecs/Makefile
+++ b/codecs/Makefile
@@ -53,8 +53,6 @@ clean::
for dir in $(SUB_DIRS); do \
$(MAKE) -C $$dir clean; \
done
- rm -f g722/*.[oai]
- rm -f speex/*.[oai]
.PHONY: $(SUB_DIRS)
@@ -81,9 +79,8 @@ $(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)
+$(call MOD_ADD_C,codec_g722,g722/g722_encode.c g722/g722_decode.c)
ifeq ($(BUILD_CPU),x86_64)
@@ -92,6 +89,5 @@ 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)
+$(call MOD_ADD_C,codec_resample,speex/resample.c)
+speex/resample.o: _ASTCFLAGS+=$(SPEEX_RESAMPLE_CFLAGS)