Files
asterisk/res/Makefile
T

65 lines
1.6 KiB
Makefile
Raw Normal View History

2001-12-25 21:12:07 +00:00
#
# Asterisk -- A telephony toolkit for Linux.
#
# Makefile for CDR backends (dynamically loaded)
#
# Copyright (C) 1999, Mark Spencer
#
# Mark Spencer <markster@linux-support.net>
#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
MODS=res_adsi.so res_features.so res_crypto.so res_musiconhold.so res_indications.so res_monitor.so \
res_agi.so
2004-06-11 00:12:35 +00:00
MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
MODS+=$(shell if [ -f "/usr/include/osp/osp.h" ]; then echo "res_osp.so"; fi)
2001-12-25 21:12:07 +00:00
CRYPTO_LIBS=-lssl -lcrypto
CFLAGS+=
2003-03-24 20:19:37 +00:00
CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo " -DZAPATA_MOH")
2004-06-04 15:44:14 +00:00
CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo " -DZAPATA_MOH")
2003-04-08 04:28:09 +00:00
#
# Work around buggy RedHat 9.0
#
2003-04-27 18:13:11 +00:00
CFLAGS+=-DOPENSSL_NO_KRB5 -fPIC
OSPLIB=/usr/lib/libosp.a
2001-12-25 21:12:07 +00:00
2003-05-06 00:00:20 +00:00
all: depend $(MODS)
2001-12-25 21:12:07 +00:00
install: all
rm -f $(DESTDIR)$(ASTHEADERDIR)/parking.h
rm -f $(DESTDIR)$(MODULES_DIR)/app_agi.so
rm -f $(DESTDIR)$(MODULES_DIR)/res_parking.so
2003-10-25 17:27:53 +00:00
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
2001-12-25 21:12:07 +00:00
res_crypto.so: res_crypto.o
2003-10-26 18:50:49 +00:00
$(CC) $(SOLINK) -o $@ $< $(CRYPTO_LIBS)
2001-12-25 21:12:07 +00:00
clean:
2003-05-06 00:00:20 +00:00
rm -f *.so *.o .depend
2001-12-25 21:12:07 +00:00
2004-06-11 00:12:35 +00:00
res_odbc.so: res_odbc.o
$(CC) $(SOLINK) -o $@ $< -lodbc
res_osp.so: res_osp.o $(OSPLIB)
$(CC) $(SOLINK) -o $@ $< $(OSPLIB)
2001-12-25 21:12:07 +00:00
%.so : %.o
2003-10-26 18:50:49 +00:00
$(CC) $(SOLINK) -o $@ $<
2003-05-06 00:00:20 +00:00
2003-08-19 16:42:30 +00:00
ifneq ($(wildcard .depend),)
2003-05-06 00:00:20 +00:00
include .depend
2003-08-19 16:42:30 +00:00
endif
2003-05-06 00:00:20 +00:00
depend: .depend
.depend:
../mkdep $(CFLAGS) `ls *.c`
env:
env