Makefile 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #
  2. # Asterisk -- An open source telephony toolkit.
  3. #
  4. # Makefile for Add-on Modules
  5. #
  6. # Copyright (C) 2009, Digium, Inc.
  7. #
  8. # This program is free software, distributed under the terms of
  9. # the GNU General Public License
  10. #
  11. -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
  12. MENUSELECT_CATEGORY=ADDONS
  13. MENUSELECT_DESCRIPTION=Add-ons (See README-addons.txt)
  14. OOH323C:=ooCmdChannel.c ooLogChan.c ooUtils.c ooGkClient.c context.c \
  15. ooDateTime.c decode.c dlist.c encode.c errmgmt.c \
  16. memheap.c ootrace.c oochannels.c ooh245.c ooports.c \
  17. ooq931.c ooCapability.c ooSocket.c perutil.c eventHandler.c \
  18. ooCalls.c ooStackCmds.c ooh323.c ooh323ep.c printHandler.c \
  19. rtctype.c ooTimer.c h323/H235-SECURITY-MESSAGESDec.c \
  20. h323/H235-SECURITY-MESSAGESEnc.c h323/H323-MESSAGES.c h323/H323-MESSAGESDec.c \
  21. h323/H323-MESSAGESEnc.c h323/MULTIMEDIA-SYSTEM-CONTROL.c \
  22. h323/MULTIMEDIA-SYSTEM-CONTROLDec.c h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c
  23. H323SOURCE:=$(addprefix ooh323c/src/,$(OOH323C)) ooh323cDriver.c
  24. H323CFLAGS:=-Iooh323c/src -Iooh323c/src/h323
  25. ALL_C_MODS:=chan_mobile \
  26. chan_ooh323 \
  27. format_mp3 \
  28. res_config_mysql
  29. all: check_mp3 _all
  30. check_mp3:
  31. ifeq ($(filter format_mp3,$(MENUSELECT_ADDONS)),)
  32. @if [ ! -f mp3/Makefile ] ; then \
  33. echo ; \
  34. echo "**************************************************************" ; \
  35. echo "*** ***" ; \
  36. echo "*** ---> IMPORTANT INFORMATION ABOUT format_mp3 <--- ***" ; \
  37. echo "*** ***" ; \
  38. echo "*** format_mp3 has been selected to be installed, but the ***" ; \
  39. echo "*** MP3 decoder library has not yet been downloaded into ***" ; \
  40. echo "*** the source tree. To do so, please run the following ***" ; \
  41. echo "*** command: ***" ; \
  42. echo "*** ***" ; \
  43. echo "*** $$ contrib/scripts/get_mp3_source.sh ***" ; \
  44. echo "*** ***" ; \
  45. echo "**************************************************************" ; \
  46. echo ; \
  47. fi
  48. endif
  49. include $(ASTTOPDIR)/Makefile.moddir_rules
  50. chan_mobile.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
  51. chan_ooh323.so: _ASTCFLAGS+=$(H323CFLAGS)
  52. $(call MOD_ADD_C,chan_ooh323,$(H323SOURCE))
  53. ifneq ($(wildcard mp3/Makefile),)
  54. # At the current time, the fate of mp3 is in flux so it didn't make sense to
  55. # add configure/makeopts processing for array-bounds since this is the only
  56. # source file that needs that warning suppressed.
  57. mp3/layer3.o: _ASTCFLAGS+=-Wno-array-bounds
  58. $(call MOD_ADD_C,format_mp3,mp3/common.c mp3/dct64_i386.c mp3/decode_ntom.c mp3/layer3.c mp3/tabinit.c mp3/interface.c)
  59. .PHONY: check_mp3
  60. else
  61. .PHONY: check_mp3 format_mp3.o format_mp3.so
  62. endif