1999-11-13 17:59:36 +00:00
|
|
|
#
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Makefile for PBX applications
|
1999-11-13 17:59:36 +00:00
|
|
|
#
|
2006-02-11 17:12:05 +00:00
|
|
|
# Copyright (C) 1999-2006, Digium, Inc.
|
1999-11-13 17:59:36 +00:00
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Mark Spencer <markster@digium.com>
|
1999-11-13 17:59:36 +00:00
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
|
|
|
|
2006-02-11 17:12:05 +00:00
|
|
|
MODS:=$(patsubst %.c,%.so,$(wildcard app_*.c))
|
2005-08-29 19:07:24 +00:00
|
|
|
|
2005-02-17 14:57:36 +00:00
|
|
|
#
|
|
|
|
# Experimental things
|
|
|
|
#
|
2006-02-11 17:12:05 +00:00
|
|
|
MODS:=$(filter-out app_ivrdemo.so,$(MODS))
|
|
|
|
MODS:=$(filter-out app_skel.so,$(MODS))
|
|
|
|
MODS:=$(filter-out app_rpt.so,$(MODS))
|
2005-08-29 16:14:38 +00:00
|
|
|
|
2005-11-08 00:12:21 +00:00
|
|
|
ifndef WITHOUT_ZAPTEL
|
2006-02-11 17:12:05 +00:00
|
|
|
ZAPAVAIL:=$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)
|
2005-08-30 02:54:02 +00:00
|
|
|
endif
|
|
|
|
|
2006-02-11 17:12:05 +00:00
|
|
|
ifeq (${ZAPAVAIL},)
|
|
|
|
MODS:=$(filter-out app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so app_page.so,$(MODS))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
|
|
|
|
MODS:=$(filter-out app_osplookup.so,$(MODS))
|
2005-08-30 02:54:02 +00:00
|
|
|
endif
|
|
|
|
|
2006-02-11 17:12:05 +00:00
|
|
|
ifneq (${WITH_SMDI},)
|
|
|
|
CFLAGS+=-DWITH_SMDI
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (${OSARCH},CYGWIN)
|
|
|
|
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
|
|
|
|
CYGSOLIB=-L.. -L. -L../res -lasterisk.dll -lres_features.so -lres_adsi.so -lres_monitor.so
|
|
|
|
MODS:=$(filter-out app_sms.so,$(MODS))
|
|
|
|
else
|
|
|
|
CFLAGS+=-fPIC
|
2006-02-10 21:50:56 +00:00
|
|
|
endif
|
|
|
|
|
2005-08-30 02:54:02 +00:00
|
|
|
# If you have UnixODBC you can use ODBC voicemail
|
2004-11-28 21:28:30 +00:00
|
|
|
# storage
|
|
|
|
#
|
2005-08-30 02:54:02 +00:00
|
|
|
# Uncomment to use ODBC storage
|
2004-11-28 21:28:30 +00:00
|
|
|
#CFLAGS+=-DUSE_ODBC_STORAGE
|
2005-08-30 02:54:02 +00:00
|
|
|
# Uncomment for extended ODBC voicemail storage
|
2005-08-25 03:15:18 +00:00
|
|
|
#CFLAGS+=-DEXTENDED_ODBC_STORAGE
|
|
|
|
# See doc/README.odbcstorage for more information
|
2003-11-05 05:42:23 +00:00
|
|
|
|
2006-02-11 17:12:05 +00:00
|
|
|
all: $(MODS)
|
1999-11-13 17:59:36 +00:00
|
|
|
|
2006-02-12 16:52:42 +00:00
|
|
|
clean-depend:
|
|
|
|
rm -f .depend
|
|
|
|
|
|
|
|
clean: clean-depend
|
2006-04-08 19:13:37 +00:00
|
|
|
rm -f *.so *.o
|
1999-11-13 17:59:36 +00:00
|
|
|
|
|
|
|
%.so : %.o
|
2005-11-01 21:53:30 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
|
2005-11-08 00:12:21 +00:00
|
|
|
|
2003-02-06 04:26:29 +00:00
|
|
|
app_rpt.so : app_rpt.o
|
2005-11-01 21:53:30 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -ltonezone
|
2003-02-06 04:26:29 +00:00
|
|
|
|
1999-11-13 17:59:36 +00:00
|
|
|
install: all
|
2006-02-11 17:12:05 +00:00
|
|
|
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
2005-12-23 23:42:58 +00:00
|
|
|
rm -f $(DESTDIR)$(MODULES_DIR)/app_cut.so
|
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
|
|
|
|
2006-02-01 18:39:41 +00:00
|
|
|
uninstall:
|
|
|
|
|
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),)
|
2005-08-30 02:54:02 +00:00
|
|
|
include .depend
|
2003-08-19 16:42:30 +00:00
|
|
|
endif
|
2003-05-06 02:34:45 +00:00
|
|
|
|
|
|
|
depend: .depend
|
|
|
|
|
|
|
|
.depend:
|
2005-06-20 17:26:08 +00:00
|
|
|
../build_tools/mkdep $(CFLAGS) `ls *.c`
|
2004-04-16 18:57:07 +00:00
|
|
|
|
|
|
|
env:
|
2004-04-27 21:30:32 +00:00
|
|
|
env
|