2001-12-25 21:12:07 +00:00
|
|
|
#
|
|
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Makefile for resource modules
|
2001-12-25 21:12:07 +00:00
|
|
|
#
|
2006-02-11 17:12:05 +00:00
|
|
|
# Copyright (C) 1999-2006, Digium
|
2001-12-25 21:12:07 +00:00
|
|
|
#
|
2005-06-20 17:26:08 +00:00
|
|
|
# Mark Spencer <markster@digium.com>
|
2001-12-25 21:12:07 +00:00
|
|
|
#
|
|
|
|
# This program is free software, distributed under the terms of
|
|
|
|
# the GNU General Public License
|
|
|
|
#
|
|
|
|
|
2006-06-07 16:03:31 +00:00
|
|
|
include ../menuselect.makeopts
|
|
|
|
|
2006-06-05 20:46:27 +00:00
|
|
|
SELECTED_MODS:=$(filter-out $(MENUSELECT_RES),$(patsubst %.c,%,$(wildcard res_*.c)))
|
2005-08-30 02:54:02 +00:00
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
ifeq ($(OSARCH),FreeBSD)
|
2006-06-05 20:46:27 +00:00
|
|
|
SELECTED_MODS:=$(filter-out $(shell if test ${BSDVERSION} -lt 500000 ; then echo "res_config_odbc"; fi),$(SELECTED_MODS))
|
2006-02-11 16:44:15 +00:00
|
|
|
endif
|
|
|
|
|
2006-03-06 10:46:36 +00:00
|
|
|
# NETsnmp has some difficulties on some platforms (conflict with unload_module)
|
|
|
|
# Until we figure out if the collission is version-specific or what to do
|
|
|
|
# we have disabled res_snmp on OS/X and *BSD
|
|
|
|
ifeq ($(OSARCH),Darwin)
|
2006-06-05 20:46:27 +00:00
|
|
|
SELECTED_MODS:=$(filter-out res_snmp,$(SELECTED_MODS))
|
2006-03-06 10:46:36 +00:00
|
|
|
else
|
|
|
|
ifeq ($(findstring BSD,$(OSARCH)),BSD)
|
2006-06-05 20:46:27 +00:00
|
|
|
SELECTED_MODS:=$(filter-out res_snmp,$(SELECTED_MODS))
|
2006-03-06 10:46:36 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2006-04-05 17:46:09 +00:00
|
|
|
ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/net-snmp/net-snmp-config.h),)
|
2006-06-05 20:46:27 +00:00
|
|
|
SELECTED_MODS:=$(filter-out res_snmp,$(SELECTED_MODS))
|
2006-04-05 17:46:09 +00:00
|
|
|
else
|
|
|
|
SNMP_LDLIBS+=$(shell net-snmp-config --agent-libs)
|
|
|
|
endif
|
|
|
|
|
2006-06-05 20:46:27 +00:00
|
|
|
MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
|
|
|
|
|
2003-05-06 00:00:20 +00:00
|
|
|
all: depend $(MODS)
|
2001-12-25 21:12:07 +00:00
|
|
|
|
|
|
|
install: all
|
2004-07-17 20:58:01 +00:00
|
|
|
rm -f $(DESTDIR)$(ASTHEADERDIR)/parking.h
|
2004-07-17 20:12:28 +00:00
|
|
|
rm -f $(DESTDIR)$(MODULES_DIR)/app_agi.so
|
2004-07-17 20:58:01 +00:00
|
|
|
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
|
2005-11-16 20:49:44 +00:00
|
|
|
@if [ x`which mpg123 2>/dev/null | grep -v '^no'` != x ] ; then \
|
|
|
|
if mpg123 --longhelp 2>&1 | grep -q .59r 2>&1 >/dev/null ; then echo ; else \
|
|
|
|
echo "*************************************************************";\
|
|
|
|
echo "*** You have the WRONG version of mpg123... you need .59r ***";\
|
|
|
|
echo "*** Use 'make mpg123' to get the right verison ***";\
|
|
|
|
echo "*************************************************************";\
|
|
|
|
fi ;\
|
|
|
|
else \
|
|
|
|
echo "*** You don't have mpg123 installed. You may need ***";\
|
|
|
|
echo "*** it if you want to use MusicOnHold ***";\
|
|
|
|
fi
|
2001-12-25 21:12:07 +00:00
|
|
|
|
2006-02-01 18:39:41 +00:00
|
|
|
uninstall:
|
|
|
|
|
2001-12-25 21:12:07 +00:00
|
|
|
res_crypto.so: res_crypto.o
|
2006-04-24 17:11:45 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< $(SSL_LIB)
|
|
|
|
|
|
|
|
res_crypto.o: res_crypto.c
|
|
|
|
$(CC) -c -o $@ $(CFLAGS) $(SSL_INCLUDE) $<
|
2001-12-25 21:12:07 +00:00
|
|
|
|
2006-02-12 16:52:42 +00:00
|
|
|
clean-depend:
|
|
|
|
rm -f .depend
|
|
|
|
|
|
|
|
clean: clean-depend
|
|
|
|
rm -f *.so *.o
|
2001-12-25 21:12:07 +00:00
|
|
|
|
2004-06-11 00:12:35 +00:00
|
|
|
res_odbc.so: res_odbc.o
|
2006-04-24 17:11:45 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< $(ODBC_LIB)
|
2004-06-11 00:12:35 +00:00
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
res_odbc.o: res_odbc.c
|
|
|
|
$(CC) -c -o $@ $(CFLAGS) $(ODBC_INCLUDE) $<
|
2004-06-25 03:59:07 +00:00
|
|
|
|
2006-05-22 21:12:30 +00:00
|
|
|
res_jabber.o: res_jabber.c
|
|
|
|
$(CC) -c -o $@ $(CFLAGS) $(IKSEMEL_INCLUDE) $<
|
|
|
|
|
|
|
|
res_jabber.so: res_jabber.o
|
|
|
|
$(CC) $(SOLINK) -o $@ $< $(IKSEMEL_LIB)
|
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
res_osp.so: res_osp.o
|
|
|
|
$(CC) $(SOLINK) -o $@ $< $(OSPTK_LIB)
|
|
|
|
|
|
|
|
res_osp.o: res_osp.c
|
|
|
|
$(CC) -c -o $@ $(CFLAGS) $(OSPTK_INCLUDE) $<
|
2005-11-01 21:53:30 +00:00
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
%.so : %.o
|
|
|
|
$(CC) -o $@ $(SOLINK) $<
|
2005-11-01 21:53:30 +00:00
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
res_config_odbc.o: res_config_odbc.c
|
|
|
|
$(CC) -c -o $@ $(CFLAGS) $(ODBC_INCLUDE) $<
|
2003-05-06 00:00:20 +00:00
|
|
|
|
2006-02-26 20:46:11 +00:00
|
|
|
res_snmp.so: res_snmp.o snmp/agent.o
|
2006-04-24 17:11:45 +00:00
|
|
|
$(CC) $(SOLINK) $(SNMP_LDFLAGS) -o $@ $< snmp/agent.o $(SNMP_LDLIBS)
|
2006-02-26 20:46:11 +00:00
|
|
|
|
2006-04-05 17:46:09 +00:00
|
|
|
res_config_pgsql.so: res_config_pgsql.o
|
2006-04-24 17:11:45 +00:00
|
|
|
$(CC) $(SOLINK) -o $@ $< $(PGSQL_LIB)
|
|
|
|
|
|
|
|
res_config_pgsql.o: res_config_pgsql.c
|
|
|
|
$(CC) -c -o $@ $(CFLAGS) $(PGSQL_INCLUDE) $<
|
2006-04-05 17:46:09 +00:00
|
|
|
|
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 00:00:20 +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
|