Makefile 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #
  2. # Asterisk -- An open source telephony toolkit.
  3. #
  4. # Makefile for resource modules
  5. #
  6. # Copyright (C) 1999-2006, 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. MODULE_PREFIX=res
  13. MENUSELECT_CATEGORY=RES
  14. MENUSELECT_DESCRIPTION=Resource Modules
  15. all: _all
  16. include $(ASTTOPDIR)/Makefile.moddir_rules
  17. ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
  18. # cygwin has some dependencies among res_ things.
  19. # We use order-only dependencies, and then add the libraries as required.
  20. res_agi.so: | res_speech.so
  21. res_agi.so_LIBS:= -lres_speech.so
  22. endif
  23. res_config_ldap.o: _ASTCFLAGS+=-DLDAP_DEPRECATED
  24. ael/ael_lex.o: ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h
  25. ael/ael_lex.o: _ASTCFLAGS+=-I. -Iael -Wno-unused $(AST_NO_FORMAT_TRUNCATION)
  26. ael/ael.tab.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h
  27. ael/ael.tab.o: _ASTCFLAGS+=-I. -Iael -DYYENABLE_NLS=0
  28. ifneq ($(AST_CLANG_BLOCKS),)
  29. _ASTCFLAGS+=-Wno-parentheses-equality
  30. endif
  31. res_ais.so: ais/clm.o ais/evt.o
  32. ais/clm.o ais/evt.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ais)
  33. res_snmp.so: snmp/agent.o
  34. snmp/agent.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_snmp)
  35. res_ael_share.so: ael/ael_lex.o ael/ael.tab.o ael/pval.o
  36. ael/ael_lex.o ael/ael.tab.o ael/pval.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ael_share)
  37. res_pjsip.so: $(subst .c,.o,$(wildcard res_pjsip/*.c))
  38. $(subst .c,.o,$(wildcard res_pjsip/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_pjsip)
  39. res_stasis.so: $(subst .c,.o,$(wildcard stasis/*.c))
  40. $(subst .c,.o,$(wildcard stasis/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_stasis)
  41. ifneq ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),)
  42. ael/ael_lex.c: ael/ael.flex
  43. else
  44. ael/ael_lex.c:
  45. endif
  46. $(ECHO_PREFIX) echo " [FLEX] $< -> $@"
  47. $(CMD_PREFIX) (cd ael; $(FLEX) ael.flex)
  48. $(CMD_PREFIX) sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' $@ > $@.fix
  49. $(CMD_PREFIX) echo "#include \"asterisk.h\"" > $@
  50. $(CMD_PREFIX) echo >> $@
  51. $(CMD_PREFIX) cat $@.fix >> $@
  52. $(CMD_PREFIX) rm $@.fix
  53. ifneq ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),)
  54. ael/ael.tab.c ael/ael.tab.h: ael/ael.y
  55. else
  56. ael/ael.tab.c ael/ael.tab.h:
  57. endif
  58. $(ECHO_PREFIX) echo " [BISON] $< -> $@"
  59. $(CMD_PREFIX) (cd ael; $(BISON) -v -d ael.y)
  60. ael/pval.o: ael/pval.c
  61. clean::
  62. rm -f snmp/*.o snmp/*.i ael/*.o ael/*.i ais/*.o ais/*.i snmp/*.gcda snmp/*.gcno ael/*.gcda ael/*.gcno
  63. rm -f res_pjsip/*.[oi] res_pjsip/*.gcda res_pjsip/*.gcno
  64. rm -f stasis/*.[oi] stasis/*.gcda stasis/*.gcno
  65. rm -f parking/*.[oi] parking/*.gcda parking/*.gcno
  66. rm -f stasis_recording/*.[oi] stasis_recording/*.gcda stasis_recording/*.gcno
  67. rm -f ari/*.[oi] ari/*.gcda ari/*.gcno
  68. res_parking.so: $(subst .c,.o,$(wildcard parking/*.c))
  69. $(subst .c,.o,$(wildcard parking/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_parking)
  70. res_ari.so: ari/cli.o ari/config.o ari/ari_websockets.o
  71. ari/cli.o ari/config.o ari/ari_websockets.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ari)
  72. res_ari_model.so: ari/ari_model_validators.o
  73. ari/ari_model_validators.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ari_model)
  74. res_stasis_recording.so: stasis_recording/stored.o
  75. stasis_recording/stored.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_stasis_recording)
  76. res_parking.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
  77. # Dependencies for res_ari_*.so are generated, so they're in this file
  78. include ari.make