remove some Makefile targets for things that don't exist in the tree
[asterisk/asterisk.git] / apps / Makefile
1 #
2 # Asterisk -- A telephony toolkit for Linux.
3
4 # Makefile for PBX applications
5 #
6 # Copyright (C) 1999-2005, Digium
7 #
8 # Mark Spencer <markster@digium.com>
9 #
10 # This program is free software, distributed under the terms of
11 # the GNU General Public License
12 #
13
14 APPS=app_adsiprog.so app_alarmreceiver.so app_authenticate.so app_cdr.so       \
15      app_chanisavail.so app_chanspy.so app_controlplayback.so app_db.so        \
16      app_dial.so app_dictate.so app_directed_pickup.so app_directory.so        \
17      app_disa.so app_dumpchan.so app_echo.so app_exec.so app_externalivr.so    \
18      app_festival.so app_forkcdr.so app_getcpeid.so app_hasnewvoicemail.so     \
19      app_ices.so app_image.so app_lookupblacklist.so app_lookupcidname.so      \
20      app_macro.so app_milliwatt.so app_mixmonitor.so app_mp3.so app_nbscat.so  \
21      app_parkandannounce.so app_playback.so app_privacy.so app_queue.so        \
22      app_random.so app_read.so app_readfile.so app_realtime.so app_record.so   \
23      app_sayunixtime.so app_senddtmf.so app_sendtext.so app_setcallerid.so     \
24      app_setcdruserfield.so app_settransfercapability.so app_softhangup.so     \
25      app_stack.so app_system.so app_talkdetect.so app_test.so app_transfer.so  \
26      app_userevent.so app_url.so app_verbose.so app_voicemail.so               \
27      app_waitforring.so app_waitforsilence.so app_while.so app_zapateller.so   \
28      app_morsecode.so
29
30 #
31 # Experimental things
32 #
33 #APPS+=app_ivrdemo.so
34 #APPS+=app_skel.so
35 #APPS+=app_rpt.so
36
37 ifndef WITHOUT_ZAPTEL
38 ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h),)
39   APPS+=app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so app_page.so
40 endif
41 endif # WITHOUT_ZAPTEL
42
43 ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
44 APPS+=app_osplookup.so
45 endif
46
47 CURLLIBS=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
48 ifneq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),)
49   ifneq (${CURLLIBS},)
50     APPS+=app_curl.so
51   endif 
52 endif
53
54 ifeq (${OSARCH},CYGWIN)
55 CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
56 CYGSOLIB=-L.. -L. -L../res -lasterisk.dll -lres_features.so -lres_adsi.so -lres_monitor.so
57 else
58 CFLAGS+=-fPIC
59 APPS+=app_sms.so
60 endif
61
62 #
63 # If you have UnixODBC you can use ODBC voicemail
64 # storage
65 #
66 # Uncomment to use ODBC storage
67 #CFLAGS+=-DUSE_ODBC_STORAGE
68 # Uncomment for extended ODBC voicemail storage
69 #CFLAGS+=-DEXTENDED_ODBC_STORAGE
70 # See doc/README.odbcstorage for more information
71
72 all: $(APPS)
73
74 clean:
75         rm -f *.so *.o look .depend
76
77 %.so : %.o
78         $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
79
80 app_rpt.so : app_rpt.o
81         $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -ltonezone
82
83 install: all
84         for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
85         rm -f $(DESTDIR)$(MODULES_DIR)/app_cut.so
86         rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so
87         rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so
88
89 uninstall:
90
91 app_curl.so: app_curl.o
92         $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
93
94 look:   look.c
95         $(CC) -pipe -O6 -g look.c -o look -lncurses
96
97 ifeq (SunOS,$(shell uname))
98 app_chanspy.so: app_chanspy.o
99         $(CC) $(SOLINK) -o $@ $< -lrt
100 endif
101
102
103 ifneq ($(wildcard .depend),)
104  include .depend
105 endif
106
107 depend: .depend
108
109 .depend:
110         ../build_tools/mkdep $(CFLAGS) `ls *.c`
111
112 env:
113         env