Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #
  2. # Asterisk -- A telephony toolkit for Linux.
  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. $(if $(filter res_ais,$(EMBEDDED_MODS)),modules.link,res_ais.so): ais/clm.o ais/evt.o
  29. ais/clm.o ais/evt.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ais)
  30. $(if $(filter res_snmp,$(EMBEDDED_MODS)),modules.link,res_snmp.so): snmp/agent.o
  31. snmp/agent.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_snmp)
  32. $(if $(filter res_ael_share,$(EMBEDDED_MODS)),modules.link,res_ael_share.so): ael/ael_lex.o ael/ael.tab.o ael/pval.o
  33. ael/ael_lex.o ael/ael.tab.o ael/pval.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ael_share)
  34. ifneq ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),)
  35. ael/ael_lex.c: ael/ael.flex
  36. else
  37. ael/ael_lex.c:
  38. endif
  39. $(ECHO_PREFIX) echo " [FLEX] $< -> $@"
  40. $(CMD_PREFIX) (cd ael; $(FLEX) ael.flex)
  41. $(CMD_PREFIX) sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' $@ > $@.fix
  42. $(CMD_PREFIX) echo "#include \"asterisk.h\"" > $@
  43. $(CMD_PREFIX) echo >> $@
  44. $(CMD_PREFIX) cat $@.fix >> $@
  45. $(CMD_PREFIX) rm $@.fix
  46. ifneq ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),)
  47. ael/ael.tab.c ael/ael.tab.h: ael/ael.y
  48. else
  49. ael/ael.tab.c ael/ael.tab.h:
  50. endif
  51. $(ECHO_PREFIX) echo " [BISON] $< -> $@"
  52. $(CMD_PREFIX) (cd ael; $(BISON) -v -d ael.y)
  53. ael/pval.o: ael/pval.c
  54. clean::
  55. rm -f snmp/*.o snmp/*.i ael/*.o ael/*.i ais/*.o ais/*.i