Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),)
  29. ael/ael_lex.c: ael/ael.flex
  30. else
  31. ael/ael_lex.c:
  32. endif
  33. $(ECHO_PREFIX) echo " [FLEX] $< -> $@"
  34. $(CMD_PREFIX) echo "#define ASTMM_LIBC ASTMM_REDIRECT" > $@
  35. $(CMD_PREFIX) echo "#include \"asterisk.h\"" >> $@
  36. $(CMD_PREFIX) echo >> $@
  37. $(CMD_PREFIX) $(FLEX) -t ael/ael.flex >> $@
  38. ifneq ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),)
  39. ael/ael.tab.c ael/ael.tab.h: ael/ael.y
  40. else
  41. ael/ael.tab.c ael/ael.tab.h:
  42. endif
  43. $(ECHO_PREFIX) echo " [BISON] $< -> $@"
  44. $(CMD_PREFIX) (cd ael; $(BISON) -v -d ael.y)
  45. ael/pval.o: ael/pval.c
  46. $(call MOD_ADD_C,res_ael_share,ael/ael_lex.c ael/ael.tab.c ael/pval.c)
  47. $(call MOD_ADD_C,res_stasis,$(wildcard stasis/*.c))
  48. $(call MOD_ADD_C,res_snmp,snmp/agent.c)
  49. $(call MOD_ADD_C,res_parking,$(wildcard parking/*.c))
  50. $(call MOD_ADD_C,res_pjsip,$(wildcard res_pjsip/*.c))
  51. $(call MOD_ADD_C,res_pjsip_session,$(wildcard res_pjsip_session/*.c))
  52. $(call MOD_ADD_C,res_prometheus,$(wildcard prometheus/*.c))
  53. $(call MOD_ADD_C,res_ari,ari/cli.c ari/config.c ari/ari_websockets.c)
  54. $(call MOD_ADD_C,res_ari_model,ari/ari_model_validators.c)
  55. $(call MOD_ADD_C,res_stasis_recording,stasis_recording/stored.c)
  56. $(call MOD_ADD_C,res_stir_shaken,$(wildcard res_stir_shaken/*.c))
  57. $(call MOD_ADD_C,res_aeap,$(wildcard res_aeap/*.c))
  58. $(call MOD_ADD_C,res_geolocation,$(wildcard res_geolocation/*.c))
  59. # These are the xml and xslt files to be embedded
  60. res_geolocation.so: res_geolocation/pidf_lo_test.o res_geolocation/pidf_to_eprofile.o res_geolocation/eprofile_to_pidf.o
  61. res_parking.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
  62. snmp/agent.o: _ASTCFLAGS+=-fPIC
  63. res_snmp.o: _ASTCFLAGS+=-fPIC
  64. # Dependencies for res_ari_*.so are generated, so they're in this file
  65. include ari.make