From 62508d6891f22d01fd9494676951008764ef9ead Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Mon, 13 Apr 2015 06:28:32 -0400 Subject: 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 --- codecs/Makefile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'codecs') 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) -- cgit v1.2.3