[asterisk-commits] rmudgett: branch 10 r373633 - in /branches/10: ./ codecs/Makefile

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 25 11:33:35 CDT 2012


Author: rmudgett
Date: Tue Sep 25 11:33:31 2012
New Revision: 373633

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373633
Log:
Make rebuild GSM, ilbc, or lpc10 codecs if the respective sources change.
........

Merged revisions 373618 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/codecs/Makefile

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/codecs/Makefile
URL: http://svnview.digium.com/svn/asterisk/branches/10/codecs/Makefile?view=diff&rev=373633&r1=373632&r2=373633
==============================================================================
--- branches/10/codecs/Makefile (original)
+++ branches/10/codecs/Makefile Tue Sep 25 11:33:31 2012
@@ -17,43 +17,69 @@
 MENUSELECT_CATEGORY=CODECS
 MENUSELECT_DESCRIPTION=Codec Translators
 
-LIBILBC:=ilbc/libilbc.a
-LIBLPC10:=lpc10/liblpc10.a
+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) \
 
 all: _all
 
 include $(ASTTOPDIR)/Makefile.moddir_rules
 
 ifneq ($(GSM_INTERNAL),no)
-GSM_INCLUDE:=-Igsm/inc
-$(if $(filter codec_gsm,$(EMBEDDED_MODS)),modules.link,codec_gsm.so): gsm/lib/libgsm.a
+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
+endif
 
 clean::
-	$(MAKE) -C gsm clean
-	$(MAKE) -C lpc10 clean
-	$(MAKE) -C ilbc clean
+	for dir in $(SUB_DIRS); do \
+		$(MAKE) -C $$dir clean; \
+	done
 	rm -f g722/*.[oa]
 	rm -f speex/*.[oa]
 
-gsm/lib/libgsm.a:
-	@mkdir -p gsm/lib
-	@$(MAKE) -C gsm lib/libgsm.a
+.PHONY: $(SUB_DIRS)
 
-$(LIBLPC10):
-	@$(MAKE) -C lpc10 all
+$(SUB_LPC10):
+	@$(MAKE) -C $(SUB_LPC10) all
+
+# Don't run the implicit rules for this target.
+$(LIBLPC10): $(SUB_LPC10) ;
 
 $(if $(filter codec_lpc10,$(EMBEDDED_MODS)),modules.link,codec_lpc10.so): $(LIBLPC10)
 
-$(LIBILBC):
-	@$(MAKE) -C ilbc all _ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations -Wshadow,$(_ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"
 
+$(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) ;
 
 $(if $(filter codec_ilbc,$(EMBEDDED_MODS)),modules.link,codec_ilbc.so): $(LIBILBC)
 
+
 $(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
@@ -62,4 +88,5 @@
 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)




More information about the asterisk-commits mailing list