1999-11-13 17:59:36 +00:00
|
|
|
#
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
#
|
|
|
|
# Makefile for PBX frontends (dynamically loaded)
|
|
|
|
#
|
1999-12-11 20:09:45 +00:00
|
|
|
# Copyright (C) 1999, Mark Spencer
|
1999-11-13 17:59:36 +00:00
|
|
|
#
|
|
|
|
# Mark Spencer <markster@linux-support.net>
|
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
|
|
|
|
2003-09-04 04:40:37 +00:00
|
|
|
USE_MYSQL_VM_INTERFACE=0
|
2003-10-04 22:08:02 +00:00
|
|
|
USE_POSTGRES_VM_INTERFACE=0
|
2003-08-24 23:34:50 +00:00
|
|
|
|
2002-03-10 20:26:16 +00:00
|
|
|
#APPS=app_dial.so app_playback.so app_directory.so app_intercom.so app_mp3.so
|
2003-10-26 18:50:49 +00:00
|
|
|
APPS=app_dial.so app_playback.so app_voicemail.so app_directory.so app_mp3.so\
|
2001-09-14 14:31:58 +00:00
|
|
|
app_system.so app_echo.so app_record.so app_image.so app_url.so app_disa.so \
|
2004-10-02 00:58:31 +00:00
|
|
|
app_adsiprog.so app_getcpeid.so app_milliwatt.so \
|
2004-03-19 18:23:33 +00:00
|
|
|
app_zapateller.so app_setcallerid.so app_festival.so \
|
2003-02-06 04:26:29 +00:00
|
|
|
app_queue.so app_senddtmf.so app_parkandannounce.so app_striplsd.so \
|
2003-02-16 06:00:12 +00:00
|
|
|
app_setcidname.so app_lookupcidname.so app_substring.so app_macro.so \
|
2003-02-23 06:00:11 +00:00
|
|
|
app_authenticate.so app_softhangup.so app_lookupblacklist.so \
|
2003-04-29 04:21:19 +00:00
|
|
|
app_waitforring.so app_privacy.so app_db.so app_chanisavail.so \
|
2003-11-13 01:47:23 +00:00
|
|
|
app_enumlookup.so app_transfer.so app_setcidnum.so app_cdr.so \
|
2004-01-11 07:37:47 +00:00
|
|
|
app_hasnewvoicemail.so app_sayunixtime.so app_cut.so app_read.so \
|
2004-03-20 07:16:27 +00:00
|
|
|
app_setcdruserfield.so app_random.so app_ices.so app_eval.so \
|
2004-05-04 16:09:35 +00:00
|
|
|
app_nbscat.so app_sendtext.so app_exec.so app_sms.so \
|
2004-06-11 14:06:30 +00:00
|
|
|
app_groupcount.so app_txtcidname.so app_controlplayback.so \
|
2004-08-28 17:12:01 +00:00
|
|
|
app_talkdetect.so app_alarmreceiver.so app_userevent.so app_verbose.so \
|
2004-11-06 04:46:06 +00:00
|
|
|
app_test.so app_forkcdr.so app_math.so app_realtime.so \
|
2005-02-18 05:29:31 +00:00
|
|
|
app_dumpchan.so app_waitforsilence.so app_while.so app_setrdnis.so \
|
2005-05-04 19:33:33 +00:00
|
|
|
app_md5.so app_readfile.so app_chanspy.so app_settransfercapability.so \
|
|
|
|
app_dictate.so
|
2002-09-11 17:09:48 +00:00
|
|
|
|
2003-10-26 18:50:49 +00:00
|
|
|
ifneq (${OSARCH},Darwin)
|
2004-12-14 23:36:30 +00:00
|
|
|
ifneq (${OSARCH},SunOS)
|
2005-06-03 04:16:13 +00:00
|
|
|
#APPS+=app_intercom.so
|
2003-10-26 18:50:49 +00:00
|
|
|
endif
|
2004-12-14 23:36:30 +00:00
|
|
|
endif
|
2003-10-26 18:50:49 +00:00
|
|
|
|
2004-10-02 00:58:31 +00:00
|
|
|
#
|
|
|
|
# Obsolete things...
|
|
|
|
#
|
|
|
|
|
2002-09-11 17:09:48 +00:00
|
|
|
#APPS+=app_sql_postgres.so
|
|
|
|
#APPS+=app_sql_odbc.so
|
2004-05-31 16:04:10 +00:00
|
|
|
#APPS+=app_rpt.so
|
2005-02-17 14:57:36 +00:00
|
|
|
#
|
|
|
|
# Experimental things
|
|
|
|
#
|
|
|
|
#APPS+=app_ivrdemo.so
|
2005-03-27 22:29:57 +00:00
|
|
|
#APPS+=app_skel.so
|
1999-11-13 17:59:36 +00:00
|
|
|
|
2005-03-27 22:39:17 +00:00
|
|
|
APPS+=$(shell if [ -f $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
|
|
|
|
APPS+=$(shell if [ -f $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
|
|
|
|
APPS+=$(shell if [ -f $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
|
2002-03-10 20:26:16 +00:00
|
|
|
|
2005-03-27 22:39:17 +00:00
|
|
|
CURLLIBS=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
|
2005-04-13 15:17:41 +00:00
|
|
|
ifneq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),)
|
|
|
|
ifneq (${CURLLIBS},)
|
|
|
|
APPS+=app_curl.so
|
|
|
|
ifeq (${OSARCH},OpenBSD)
|
|
|
|
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2003-04-27 18:13:11 +00:00
|
|
|
CFLAGS+=-fPIC
|
2004-11-28 21:28:30 +00:00
|
|
|
#
|
|
|
|
# If you have MySQL 4.1 or later you can use ODBC
|
|
|
|
# storage
|
|
|
|
#
|
|
|
|
#CFLAGS+=-DUSE_ODBC_STORAGE
|
2003-11-05 05:42:23 +00:00
|
|
|
|
1999-11-13 17:59:36 +00:00
|
|
|
all: $(APPS)
|
|
|
|
|
|
|
|
clean:
|
2003-07-26 15:12:37 +00:00
|
|
|
rm -f *.so *.o look .depend
|
1999-11-13 17:59:36 +00:00
|
|
|
|
|
|
|
%.so : %.o
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $<
|
1999-11-13 17:59:36 +00:00
|
|
|
|
2003-02-06 04:26:29 +00:00
|
|
|
app_rpt.so : app_rpt.o
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< -ltonezone
|
2003-02-06 04:26:29 +00:00
|
|
|
|
1999-11-13 17:59:36 +00:00
|
|
|
install: all
|
2003-10-25 17:27:53 +00:00
|
|
|
for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
2004-03-19 18:23:33 +00:00
|
|
|
rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so
|
2004-10-18 01:32:24 +00:00
|
|
|
rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so
|
2001-04-14 14:11:40 +00:00
|
|
|
|
2004-12-23 02:55:53 +00:00
|
|
|
app_curl.so: app_curl.o
|
|
|
|
$(CC) $(SOLINK) -o $@ $< $(CURLLIBS)
|
|
|
|
|
2003-11-13 18:30:15 +00:00
|
|
|
app_voicemail.so : app_voicemail.o
|
2003-09-04 04:20:43 +00:00
|
|
|
ifeq ($(USE_MYSQL_VM_INTERFACE),1)
|
2004-01-11 09:08:14 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $(MLFLAGS) $< -L/usr/lib/mysql -lmysqlclient -lz
|
2003-09-04 04:20:43 +00:00
|
|
|
else
|
2003-10-04 22:08:02 +00:00
|
|
|
ifeq ($(USE_POSTGRES_VM_INTERFACE),1)
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $(MLFLAGS) $< -lpq
|
2003-10-04 22:08:02 +00:00
|
|
|
else
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $(MLFLAGS) $<
|
2003-10-04 22:08:02 +00:00
|
|
|
endif
|
2003-09-04 04:20:43 +00:00
|
|
|
endif
|
2003-05-16 20:37:02 +00:00
|
|
|
|
2002-09-11 17:09:48 +00:00
|
|
|
app_sql_postgres.o: app_sql_postgres.c
|
2003-08-24 23:34:50 +00:00
|
|
|
$(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
|
2002-09-11 17:09:48 +00:00
|
|
|
|
|
|
|
app_sql_postgres.so: app_sql_postgres.o
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< -L/usr/local/pgsql/lib -lpq
|
2002-09-11 17:09:48 +00:00
|
|
|
|
|
|
|
app_sql_odbc.so: app_sql_odbc.o
|
2003-10-26 18:50:49 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< -lodbc
|
2001-04-14 14:11:40 +00:00
|
|
|
|
|
|
|
look: look.c
|
2004-08-29 17:40:58 +00:00
|
|
|
$(CC) -pipe -O6 -g look.c -o look -lncurses
|
2003-05-06 02:34:45 +00:00
|
|
|
|
2005-05-08 17:01:42 +00:00
|
|
|
ifeq (SunOS,$(shell uname))
|
|
|
|
app_chanspy.so: app_chanspy.o
|
|
|
|
$(CC) $(SOLINK) -o $@ $< -lrt
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2003-08-19 16:42:30 +00:00
|
|
|
ifneq ($(wildcard .depend),)
|
2003-05-06 02:34:45 +00:00
|
|
|
include .depend
|
2003-08-19 16:42:30 +00:00
|
|
|
endif
|
2003-05-06 02:34:45 +00:00
|
|
|
|
|
|
|
depend: .depend
|
|
|
|
|
|
|
|
.depend:
|
|
|
|
../mkdep $(CFLAGS) `ls *.c`
|
2004-04-16 18:57:07 +00:00
|
|
|
|
|
|
|
env:
|
2004-04-27 21:30:32 +00:00
|
|
|
env
|