Makefile 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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
  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. $(if $(filter res_ais,$(EMBEDDED_MODS)),modules.link,res_ais.so): ais/clm.o ais/evt.o
  32. ais/clm.o ais/evt.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ais)
  33. $(if $(filter res_snmp,$(EMBEDDED_MODS)),modules.link,res_snmp.so): snmp/agent.o
  34. snmp/agent.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_snmp)
  35. $(if $(filter res_ael_share,$(EMBEDDED_MODS)),modules.link,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. $(if $(filter res_pjsip,$(EMBEDDED_MODS)),modules.link,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. $(if $(filter res_stasis,$(EMBEDDED_MODS)),modules.link,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/*.[oi] ael/*.[oi] ais/*.[oi] ari/*.[oi]
  63. rm -f res_pjsip/*.[oi] stasis/*.[oi]
  64. rm -f parking/*.o parking/*.i stasis_recording/*.[oi]
  65. $(if $(filter res_parking,$(EMBEDDED_MODS)),modules.link,res_parking.so): $(subst .c,.o,$(wildcard parking/*.c))
  66. $(subst .c,.o,$(wildcard parking/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_parking)
  67. res_ari.so: ari/cli.o ari/config.o ari/ari_websockets.o
  68. ari/cli.o ari/config.o ari/ari_websockets.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ari)
  69. res_ari_model.so: ari/ari_model_validators.o
  70. ari/ari_model_validators.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ari_model)
  71. res_stasis_recording.so: stasis_recording/stored.o
  72. stasis_recording/stored.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_stasis_recording)
  73. # Dependencies for res_ari_*.so are generated, so they're in this file
  74. include ari.make