Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #
  2. # Asterisk -- An open source telephony toolkit.
  3. #
  4. # Makefile for codec modules
  5. #
  6. # Copyright (C) 1999-2006, Digium, Inc.
  7. #
  8. # Mark Spencer <markster@digium.com>
  9. #
  10. # This program is free software, distributed under the terms of
  11. # the GNU General Public License
  12. #
  13. -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
  14. MODULE_PREFIX=codec
  15. MENUSELECT_CATEGORY=CODECS
  16. MENUSELECT_DESCRIPTION=Codec Translators
  17. SUB_GSM := gsm
  18. SUB_ILBC := ilbc
  19. LIBILBC := $(SUB_ILBC)/libilbc.a
  20. SUB_LPC10 := lpc10
  21. LIBLPC10 := $(SUB_LPC10)/liblpc10.a
  22. SUB_DIRS := \
  23. $(SUB_GSM) \
  24. $(SUB_ILBC) \
  25. $(SUB_LPC10) \
  26. all: _all
  27. include $(ASTTOPDIR)/Makefile.moddir_rules
  28. ifneq ($(GSM_INTERNAL),no)
  29. GSM_INCLUDE := -I$(SUB_GSM)/inc
  30. codec_gsm.so: $(SUB_GSM)/lib/libgsm.a
  31. endif
  32. # Don't run the implicit rules for this target.
  33. $(SUB_GSM)/lib/libgsm.a: $(SUB_GSM) ;
  34. $(SUB_GSM):
  35. @mkdir -p $(SUB_GSM)/lib
  36. @$(MAKE) -C $(SUB_GSM) lib/libgsm.a
  37. clean::
  38. for dir in $(SUB_DIRS); do \
  39. $(MAKE) -C $$dir clean; \
  40. done
  41. rm -f g722/*.[oai]
  42. rm -f speex/*.[oai]
  43. .PHONY: $(SUB_DIRS)
  44. codec_lpc10.so: $(LIBLPC10)
  45. # Don't run the implicit rules for this target.
  46. $(LIBLPC10): $(SUB_LPC10) ;
  47. $(SUB_LPC10):
  48. @$(MAKE) -C $(SUB_LPC10) all
  49. ifneq ($(ILBC_INTERNAL),no)
  50. codec_ilbc.so: $(LIBILBC)
  51. else
  52. ILBC_INCLUDE += -DILBC_WEBRTC
  53. endif
  54. # Don't run the implicit rules for this target.
  55. $(LIBILBC): $(SUB_ILBC) ;
  56. $(SUB_ILBC):
  57. @$(MAKE) -C $(SUB_ILBC) all _ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations -Wshadow,$(_ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"
  58. codec_g722.so: g722/g722_encode.o g722/g722_decode.o
  59. g722/g722_encode.o g722/g722_decode.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,codec_g722)
  60. ifeq ($(BUILD_CPU),x86_64)
  61. SPEEX_RESAMPLE_CFLAGS:=-fPIC
  62. else
  63. SPEEX_RESAMPLE_CFLAGS:=
  64. endif
  65. codec_resample.so: speex/resample.o
  66. speex/resample.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,codec_resample) $(SPEEX_RESAMPLE_CFLAGS)