Makefile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #
  2. # Asterisk -- A telephony toolkit for Linux.
  3. #
  4. # Makefile for PBX frontends (dynamically loaded)
  5. #
  6. # Copyright (C) 1999, Mark Spencer
  7. #
  8. # Mark Spencer <markster@linux-support.net>
  9. #
  10. # This program is free software, distributed under the terms of
  11. # the GNU General Public License
  12. #
  13. USE_MYSQL_VM_INTERFACE=0
  14. USE_POSTGRES_VM_INTERFACE=0
  15. #APPS=app_dial.so app_playback.so app_directory.so app_intercom.so app_mp3.so
  16. APPS=app_dial.so app_playback.so app_voicemail.so app_directory.so app_mp3.so\
  17. app_system.so app_echo.so app_record.so app_image.so app_url.so app_disa.so \
  18. app_qcall.so app_adsiprog.so app_getcpeid.so app_milliwatt.so \
  19. app_zapateller.so app_setcallerid.so app_festival.so \
  20. app_queue.so app_senddtmf.so app_parkandannounce.so app_striplsd.so \
  21. app_setcidname.so app_lookupcidname.so app_substring.so app_macro.so \
  22. app_authenticate.so app_softhangup.so app_lookupblacklist.so \
  23. app_waitforring.so app_privacy.so app_db.so app_chanisavail.so \
  24. app_enumlookup.so app_transfer.so app_setcidnum.so app_cdr.so \
  25. app_hasnewvoicemail.so app_sayunixtime.so app_cut.so app_read.so \
  26. app_setcdruserfield.so app_random.so app_ices.so app_eval.so \
  27. app_nbscat.so app_sendtext.so app_exec.so app_sms.so \
  28. app_groupcount.so app_txtcidname.so app_controlplayback.so \
  29. app_talkdetect.so app_alarmreceiver.so app_userevent.so app_verbose.so \
  30. app_test.so app_forkcdr.so
  31. ifneq (${OSARCH},Darwin)
  32. APPS+=app_intercom.so
  33. endif
  34. #APPS+=app_sql_postgres.so
  35. #APPS+=app_sql_odbc.so
  36. #APPS+=app_rpt.so
  37. APPS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
  38. APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
  39. APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
  40. CFLAGS+=-fPIC
  41. ifeq ($(USE_POSTGRES_VM_INTERFACE),1)
  42. CFLAGS+=-DUSEPOSTGRESVM
  43. endif
  44. ifeq ($(USE_MYSQL_VM_INTERFACE),1)
  45. CFLAGS+=-DUSEMYSQLVM
  46. endif
  47. all: $(APPS)
  48. clean:
  49. rm -f *.so *.o look .depend
  50. %.so : %.o
  51. $(CC) $(SOLINK) -o $@ $<
  52. app_rpt.so : app_rpt.o
  53. $(CC) $(SOLINK) -o $@ $< -ltonezone
  54. install: all
  55. for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
  56. rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so
  57. app_voicemail.so : app_voicemail.o
  58. ifeq ($(USE_MYSQL_VM_INTERFACE),1)
  59. $(CC) $(SOLINK) -o $@ $(MLFLAGS) $< -L/usr/lib/mysql -lmysqlclient -lz
  60. else
  61. ifeq ($(USE_POSTGRES_VM_INTERFACE),1)
  62. $(CC) $(SOLINK) -o $@ $(MLFLAGS) $< -lpq
  63. else
  64. $(CC) $(SOLINK) -o $@ $(MLFLAGS) $<
  65. endif
  66. endif
  67. app_sql_postgres.o: app_sql_postgres.c
  68. $(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
  69. app_sql_postgres.so: app_sql_postgres.o
  70. $(CC) $(SOLINK) -o $@ $< -L/usr/local/pgsql/lib -lpq
  71. app_sql_odbc.so: app_sql_odbc.o
  72. $(CC) $(SOLINK) -o $@ $< -lodbc
  73. look: look.c
  74. $(CC) -pipe -O6 -g look.c -o look -lncurses
  75. ifneq ($(wildcard .depend),)
  76. include .depend
  77. endif
  78. depend: .depend
  79. .depend:
  80. ../mkdep $(CFLAGS) `ls *.c`
  81. env:
  82. env