2008-02-17 16:52:17 -05:00
|
|
|
# Copyright (c) 2007, Anthony Minessale II
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions
|
|
|
|
# are met:
|
|
|
|
#
|
|
|
|
# * Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
#
|
|
|
|
# * Redistributions in binary form must reproduce the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer in the
|
|
|
|
# documentation and/or other materials provided with the distribution.
|
|
|
|
#
|
|
|
|
# * Neither the name of the original author; nor the names of any contributors
|
|
|
|
# may be used to endorse or promote products derived from this software
|
|
|
|
# without specific prior written permission.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
|
|
|
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
|
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
|
|
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
|
|
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
|
|
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
2010-10-31 21:13:27 -04:00
|
|
|
ACLOCAL_AMFLAGS = -I build
|
|
|
|
AUTOMAKE_OPTIONS = foreign
|
|
|
|
|
|
|
|
SRC = src
|
2009-02-02 11:47:44 -05:00
|
|
|
|
2009-04-08 17:35:29 -04:00
|
|
|
moddir = @modinstdir@
|
2009-11-23 13:19:35 -05:00
|
|
|
libdir = @libdir@
|
2010-10-31 21:13:27 -04:00
|
|
|
library_includedir = $(prefix)/include
|
|
|
|
|
|
|
|
INCS = -I$(FT_SRCDIR)/$(SRC)/include -I$(FT_SRCDIR)/$(SRC)/include/private
|
2009-02-05 13:21:51 -05:00
|
|
|
|
2010-12-17 20:27:37 -05:00
|
|
|
# we needed to separate CFLAGS in FTDM_COMPAT_CFLAGS and FTDM_CFLAGS due to -c99 which causes problems with wanpipe headers
|
2010-11-08 16:11:06 -05:00
|
|
|
FTDM_COMPAT_CFLAGS = $(INCS) -DFTDM_CONFIG_DIR=\"@confdir@\" -DFTDM_MOD_DIR=\"$(moddir)\" @COMP_VENDOR_COMPAT_CFLAGS@ @DEFS@
|
2010-10-31 21:13:27 -04:00
|
|
|
FTDM_CFLAGS = $(INCS) -DFTDM_CONFIG_DIR=\"@confdir@\" -DFTDM_MOD_DIR=\"$(moddir)\" @COMP_VENDOR_CFLAGS@ @DEFS@
|
|
|
|
COMPILE = $(CC) $(FTDM_CFLAGS)
|
2008-09-06 01:46:14 -04:00
|
|
|
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(COMPILE)
|
2010-10-31 21:13:27 -04:00
|
|
|
LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(FTDM_CFLAGS) $(LDFLAGS) -o $@
|
2008-09-06 01:46:14 -04:00
|
|
|
|
2009-02-03 00:41:40 -05:00
|
|
|
|
2009-04-08 17:44:33 -04:00
|
|
|
#
|
|
|
|
# GNU pkgconfig file
|
|
|
|
#
|
2010-01-15 14:22:49 -05:00
|
|
|
EXTRA_DIST = freetdm.pc.in
|
2009-04-08 17:44:33 -04:00
|
|
|
|
2011-02-19 17:35:41 -05:00
|
|
|
pkgconfigdir = @pkgconfigdir@
|
2010-01-15 14:22:49 -05:00
|
|
|
pkgconfig_DATA = freetdm.pc
|
2009-04-08 17:44:33 -04:00
|
|
|
|
|
|
|
|
2009-04-08 17:35:29 -04:00
|
|
|
#
|
2010-01-15 14:22:49 -05:00
|
|
|
# libfreetdm
|
2009-04-08 17:35:29 -04:00
|
|
|
#
|
2010-01-15 14:22:49 -05:00
|
|
|
libfreetdm_la_SOURCES = \
|
2010-10-31 21:13:27 -04:00
|
|
|
$(SRC)/hashtable.c \
|
|
|
|
$(SRC)/hashtable_itr.c \
|
|
|
|
$(SRC)/ftdm_io.c \
|
2010-12-24 15:58:04 -05:00
|
|
|
$(SRC)/ftdm_state.c \
|
2010-10-31 21:13:27 -04:00
|
|
|
$(SRC)/ftdm_queue.c \
|
|
|
|
$(SRC)/ftdm_sched.c \
|
|
|
|
$(SRC)/ftdm_call_utils.c \
|
2011-02-18 13:01:57 -05:00
|
|
|
$(SRC)/ftdm_variables.c \
|
2010-10-31 21:13:27 -04:00
|
|
|
$(SRC)/ftdm_config.c \
|
|
|
|
$(SRC)/ftdm_callerid.c \
|
|
|
|
$(SRC)/fsk.c \
|
|
|
|
$(SRC)/uart.c \
|
|
|
|
$(SRC)/g711.c \
|
|
|
|
$(SRC)/libteletone_detect.c \
|
|
|
|
$(SRC)/libteletone_generate.c \
|
|
|
|
$(SRC)/ftdm_buffer.c \
|
|
|
|
$(SRC)/ftdm_threadmutex.c \
|
|
|
|
$(SRC)/ftdm_dso.c \
|
|
|
|
$(SRC)/ftdm_cpu_monitor.c
|
2008-08-29 11:58:59 -04:00
|
|
|
|
2009-02-03 00:41:40 -05:00
|
|
|
library_include_HEADERS = \
|
2010-10-31 21:13:27 -04:00
|
|
|
$(SRC)/include/freetdm.h \
|
|
|
|
$(SRC)/include/ftdm_declare.h \
|
|
|
|
$(SRC)/include/ftdm_threadmutex.h \
|
|
|
|
$(SRC)/include/ftdm_os.h \
|
2011-01-18 16:10:14 -05:00
|
|
|
$(SRC)/include/ftdm_call_utils.h \
|
2010-10-31 21:13:27 -04:00
|
|
|
$(SRC)/include/ftdm_dso.h
|
2009-02-03 00:41:40 -05:00
|
|
|
|
2010-01-15 14:22:49 -05:00
|
|
|
lib_LTLIBRARIES = libfreetdm.la
|
2011-06-09 18:14:00 -04:00
|
|
|
libfreetdm_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2010-01-15 14:22:49 -05:00
|
|
|
libfreetdm_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS)
|
|
|
|
libfreetdm_la_LIBADD = $(LIBS)
|
2008-08-29 11:58:59 -04:00
|
|
|
|
2010-01-15 14:22:49 -05:00
|
|
|
core: libfreetdm.la
|
2009-02-09 14:13:02 -05:00
|
|
|
core-install: install-libLTLIBRARIES
|
|
|
|
|
2009-04-08 17:35:29 -04:00
|
|
|
#
|
|
|
|
# tools & test programs
|
|
|
|
#
|
2010-10-31 21:13:27 -04:00
|
|
|
noinst_PROGRAMS = testtones detect_tones detect_dtmf testpri testr2 testanalog testapp testcid
|
2009-04-08 17:35:29 -04:00
|
|
|
|
2009-02-03 14:48:04 -05:00
|
|
|
testapp_SOURCES = $(SRC)/testapp.c
|
2010-01-15 14:22:49 -05:00
|
|
|
testapp_LDADD = libfreetdm.la
|
2011-06-09 18:14:00 -04:00
|
|
|
testapp_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2009-04-08 17:35:29 -04:00
|
|
|
|
2009-02-03 14:48:04 -05:00
|
|
|
testcid_SOURCES = $(SRC)/testcid.c
|
2010-01-15 14:22:49 -05:00
|
|
|
testcid_LDADD = libfreetdm.la
|
2011-06-09 18:14:00 -04:00
|
|
|
testcid_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2008-02-17 16:52:17 -05:00
|
|
|
|
2009-04-08 17:35:29 -04:00
|
|
|
testtones_SOURCES = $(SRC)/testtones.c
|
2010-01-15 14:22:49 -05:00
|
|
|
testtones_LDADD = libfreetdm.la
|
2011-06-09 18:14:00 -04:00
|
|
|
testtones_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2008-02-17 16:52:17 -05:00
|
|
|
|
2009-04-08 17:35:29 -04:00
|
|
|
detect_tones_SOURCES = $(SRC)/detect_tones.c
|
2010-01-15 14:22:49 -05:00
|
|
|
detect_tones_LDADD = libfreetdm.la
|
2011-06-09 18:14:00 -04:00
|
|
|
detect_tones_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2008-02-17 16:52:17 -05:00
|
|
|
|
2009-04-08 17:35:29 -04:00
|
|
|
detect_dtmf_SOURCES = $(SRC)/detect_dtmf.c
|
2010-01-15 14:22:49 -05:00
|
|
|
detect_dtmf_LDADD = libfreetdm.la
|
2011-06-09 18:14:00 -04:00
|
|
|
detect_dtmf_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2008-02-17 16:52:17 -05:00
|
|
|
|
2010-04-02 01:24:20 -04:00
|
|
|
#testisdn_SOURCES = $(SRC)/testisdn.c
|
|
|
|
#testisdn_LDADD = libfreetdm.la
|
2011-06-09 18:14:00 -04:00
|
|
|
#testisdn_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2008-02-17 16:52:17 -05:00
|
|
|
|
2009-07-27 19:19:41 -04:00
|
|
|
testpri_SOURCES = $(SRC)/testpri.c
|
2010-01-15 14:22:49 -05:00
|
|
|
testpri_LDADD = libfreetdm.la
|
2011-06-09 18:14:00 -04:00
|
|
|
testpri_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2009-07-27 19:19:41 -04:00
|
|
|
|
2009-08-19 17:47:56 -04:00
|
|
|
testr2_SOURCES = $(SRC)/testr2.c
|
2010-01-15 14:22:49 -05:00
|
|
|
testr2_LDADD = libfreetdm.la
|
2011-06-09 18:14:00 -04:00
|
|
|
testr2_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2009-08-19 17:47:56 -04:00
|
|
|
|
2009-04-08 17:35:29 -04:00
|
|
|
testanalog_SOURCES = $(SRC)/testanalog.c
|
2010-01-15 14:22:49 -05:00
|
|
|
testanalog_LDADD = libfreetdm.la
|
2011-06-09 18:14:00 -04:00
|
|
|
testanalog_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2008-08-29 11:58:59 -04:00
|
|
|
|
2009-04-08 17:35:29 -04:00
|
|
|
#
|
2010-01-15 14:22:49 -05:00
|
|
|
# ftmod modules
|
2009-04-08 17:35:29 -04:00
|
|
|
#
|
2010-10-31 19:47:43 -04:00
|
|
|
mod_LTLIBRARIES = ftmod_zt.la ftmod_skel.la ftmod_analog.la ftmod_analog_em.la
|
2009-11-11 13:51:03 -05:00
|
|
|
|
2010-01-15 14:22:49 -05:00
|
|
|
ftmod_zt_la_SOURCES = $(SRC)/ftmod/ftmod_zt/ftmod_zt.c
|
2011-06-09 18:14:00 -04:00
|
|
|
ftmod_zt_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2010-10-31 21:13:27 -04:00
|
|
|
ftmod_zt_la_LDFLAGS = -shared -module -avoid-version
|
|
|
|
ftmod_zt_la_LIBADD = libfreetdm.la
|
2009-04-08 17:35:29 -04:00
|
|
|
|
2010-01-15 14:22:49 -05:00
|
|
|
ftmod_skel_la_SOURCES = $(SRC)/ftmod/ftmod_skel/ftmod_skel.c
|
2011-06-09 18:14:00 -04:00
|
|
|
ftmod_skel_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2010-01-15 14:22:49 -05:00
|
|
|
ftmod_skel_la_LDFLAGS = -module -avoid-version
|
2010-10-31 21:13:27 -04:00
|
|
|
ftmod_skel_la_LIBADD = libfreetdm.la
|
2009-04-08 17:35:29 -04:00
|
|
|
|
2010-10-31 21:13:27 -04:00
|
|
|
ftmod_analog_la_SOURCES = $(SRC)/ftmod/ftmod_analog/ftmod_analog.c
|
2011-06-09 18:14:00 -04:00
|
|
|
ftmod_analog_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2010-10-31 21:13:27 -04:00
|
|
|
ftmod_analog_la_LDFLAGS = -shared -module -avoid-version
|
|
|
|
ftmod_analog_la_LIBADD = libfreetdm.la
|
|
|
|
|
|
|
|
ftmod_analog_em_la_SOURCES = $(SRC)/ftmod/ftmod_analog_em/ftmod_analog_em.c
|
2011-06-09 18:14:00 -04:00
|
|
|
ftmod_analog_em_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2010-10-31 21:13:27 -04:00
|
|
|
ftmod_analog_em_la_LDFLAGS = -shared -module -avoid-version
|
|
|
|
ftmod_analog_em_la_LIBADD = libfreetdm.la
|
|
|
|
|
|
|
|
if HAVE_LIBSANGOMA
|
|
|
|
mod_LTLIBRARIES += ftmod_wanpipe.la
|
2010-01-15 14:22:49 -05:00
|
|
|
ftmod_wanpipe_la_SOURCES = $(SRC)/ftmod/ftmod_wanpipe/ftmod_wanpipe.c
|
2010-12-17 20:27:37 -05:00
|
|
|
# some structures within Wanpipe drivers are not c99 compatible, so we need to compile ftmod_wanpipe
|
|
|
|
# without c99 flags, use FTDM_COMPAT_CFLAGS instead
|
2011-06-09 18:14:00 -04:00
|
|
|
ftmod_wanpipe_la_CFLAGS = $(FTDM_COMPAT_CFLAGS) $(AM_CFLAGS) -D__LINUX__ -I/usr/include/wanpipe
|
2010-10-31 21:13:27 -04:00
|
|
|
ftmod_wanpipe_la_LDFLAGS = -shared -module -avoid-version -lsangoma
|
|
|
|
ftmod_wanpipe_la_LIBADD = libfreetdm.la
|
2009-04-22 17:22:42 -04:00
|
|
|
endif
|
2009-02-05 13:21:51 -05:00
|
|
|
|
2010-10-31 19:47:43 -04:00
|
|
|
if HAVE_LIBISDN
|
|
|
|
mod_LTLIBRARIES += ftmod_isdn.la
|
|
|
|
ftmod_isdn_la_SOURCES = $(SRC)/ftmod/ftmod_isdn/ftmod_isdn.c
|
2011-06-09 18:14:00 -04:00
|
|
|
ftmod_isdn_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) -D_GNU_SOURCE $(LIBISDN_CPPFLAGS) $(PCAP_CPPFLAGS)
|
2010-10-31 19:47:43 -04:00
|
|
|
ftmod_isdn_la_LDFLAGS = -shared -module -avoid-version $(LIBISDN_LDFLAGS) $(PCAP_LDFLAGS)
|
2010-10-31 21:13:27 -04:00
|
|
|
ftmod_isdn_la_LIBADD = libfreetdm.la $(LIBISDN_LIBS) $(PCAP_LIBS)
|
2010-10-31 19:47:43 -04:00
|
|
|
endif
|
2009-02-05 13:21:51 -05:00
|
|
|
|
2010-10-31 21:13:27 -04:00
|
|
|
if HAVE_LIBPRI
|
|
|
|
mod_LTLIBRARIES += ftmod_libpri.la
|
2010-01-15 14:22:49 -05:00
|
|
|
ftmod_libpri_la_SOURCES = $(SRC)/ftmod/ftmod_libpri/ftmod_libpri.c $(SRC)/ftmod/ftmod_libpri/lpwrap_pri.c
|
2011-10-26 13:41:07 -04:00
|
|
|
ftmod_libpri_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) $(LIBPRI_CPPFLAGS)
|
|
|
|
ftmod_libpri_la_LDFLAGS = -shared -module -avoid-version $(LIBPRI_LDFLAGS)
|
|
|
|
ftmod_libpri_la_LIBADD = libfreetdm.la $(LIBPRI_LIBS)
|
2009-02-05 15:44:13 -05:00
|
|
|
endif
|
2009-04-08 17:35:29 -04:00
|
|
|
|
2010-10-31 21:13:27 -04:00
|
|
|
if HAVE_PRITAP
|
|
|
|
mod_LTLIBRARIES += ftmod_pritap.la
|
2010-07-30 19:46:05 -04:00
|
|
|
ftmod_pritap_la_SOURCES = $(SRC)/ftmod/ftmod_pritap/ftmod_pritap.c
|
2011-06-09 18:14:00 -04:00
|
|
|
ftmod_pritap_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2010-10-31 21:13:27 -04:00
|
|
|
ftmod_pritap_la_LDFLAGS = -shared -module -avoid-version -lpri
|
|
|
|
ftmod_pritap_la_LIBADD = libfreetdm.la
|
2010-07-30 19:46:05 -04:00
|
|
|
endif
|
|
|
|
|
2010-10-31 21:13:27 -04:00
|
|
|
if HAVE_SNG_SS7
|
|
|
|
mod_LTLIBRARIES += ftmod_sangoma_ss7.la
|
|
|
|
ftmod_sangoma_ss7_la_SOURCES = \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_in.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cntrl.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_timers.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_sta.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_sts.c \
|
2010-11-26 15:59:24 -05:00
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_logger.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_relay.c
|
2010-10-31 21:13:27 -04:00
|
|
|
|
2011-06-09 18:14:00 -04:00
|
|
|
ftmod_sangoma_ss7_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) -D_GNU_SOURCE
|
2010-10-31 21:13:27 -04:00
|
|
|
ftmod_sangoma_ss7_la_LDFLAGS = -shared -module -avoid-version -lsng_ss7
|
|
|
|
ftmod_sangoma_ss7_la_LIBADD = libfreetdm.la
|
2010-06-05 18:23:39 -04:00
|
|
|
endif
|
|
|
|
|
2010-10-31 21:13:27 -04:00
|
|
|
if HAVE_SNG_ISDN
|
|
|
|
mod_LTLIBRARIES += ftmod_sangoma_isdn.la
|
|
|
|
ftmod_sangoma_isdn_la_SOURCES = \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cntrl.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_trace.c \
|
2011-05-26 11:38:24 -04:00
|
|
|
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_transfer.c \
|
2010-10-31 21:13:27 -04:00
|
|
|
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cntrl.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_rcv.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c \
|
|
|
|
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_out.c
|
|
|
|
|
2011-06-09 18:14:00 -04:00
|
|
|
ftmod_sangoma_isdn_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) -D_GNU_SOURCE
|
2010-10-31 21:13:27 -04:00
|
|
|
ftmod_sangoma_isdn_la_LDFLAGS = -shared -module -avoid-version -lsng_isdn
|
|
|
|
ftmod_sangoma_isdn_la_LIBADD = libfreetdm.la
|
2010-06-30 12:42:11 -04:00
|
|
|
endif
|
|
|
|
|
2010-10-31 21:13:27 -04:00
|
|
|
if HAVE_OPENR2
|
|
|
|
mod_LTLIBRARIES += ftmod_r2.la
|
2011-02-24 18:41:07 -05:00
|
|
|
ftmod_r2_la_SOURCES = $(SRC)/ftmod/ftmod_r2/ftmod_r2.c $(SRC)/ftmod/ftmod_r2/ftmod_r2_io_mf_lib.c
|
2011-06-09 18:14:00 -04:00
|
|
|
ftmod_r2_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
2010-10-31 21:13:27 -04:00
|
|
|
ftmod_r2_la_LDFLAGS = -shared -module -avoid-version -lopenr2
|
|
|
|
ftmod_r2_la_LIBADD = libfreetdm.la
|
2009-08-19 17:47:56 -04:00
|
|
|
endif
|
|
|
|
|
2012-05-07 15:10:25 -04:00
|
|
|
if HAVE_WAT
|
|
|
|
mod_LTLIBRARIES += ftmod_gsm.la
|
|
|
|
ftmod_gsm_la_SOURCES = $(SRC)/ftmod/ftmod_gsm/ftmod_gsm.c
|
|
|
|
ftmod_gsm_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
|
|
|
ftmod_gsm_la_LDFLAGS = -shared -module -avoid-version -lwat
|
|
|
|
ftmod_gsm_la_LIBADD = libfreetdm.la
|
|
|
|
endif
|
|
|
|
|
[FreeTDM] Add (experimental) ftmod_misdn
Add I/O plugin for mISDN stack that is included in the linux kernel
since version 2.6.27.
The in-kernel mISDN stack uses a socket based interface (AF_ISDN),
data and control commands are exchanged via datagram messages.
This makes writing a driver that doesn't use a separate (per-span)
thread to handle all incoming events a bit tricky, because responses
to control messages and incoming data are mixed and interfacing
with the synchronous FreeTDM I/O API is problematic.
B(*)/D-channel handling:
The current version uses misdn_wait() to poll() for activity on
the non-blocking channel sockets and misdn_read() to receive and
handle all pending events up to the first PH_DATA_IND (data) message
(which is what the caller of the read method is actually after).
In case no data has been received, misdn_read() returns FTDM_SUCCESS
with *datalen = 0, which is OK for all the signalling modules tested
(ftmod_libpri and (out-of-tree) ftmod_isdn).
To send data, misdn_write() is called, which just sends a PH_DATA_REQ
message to the mISDN channel socket.
(*) B-channels use a per-channel timerfd as a timing reference for
'ready-for-write' poll()ing in misdn_wait().
This is a workaround for a limitation of mISDN sockets, which do not
support POLLOUT waiting on b-channel sockets (in a useful way).
Sending/receiving of data works the same way as on d-channels, otherwise.
The module has received some minimal testing using a beronet
single-port HFC E1 and a HFC4-S quad-port BRI card on linux-3.0.x.
--- Limitations ---
- Only the most basic features have been implemented (alarms,
sending/receiving data/audio).
- Spans are limited to E1 and BRI/BRI_PTMP trunk types.
- D-Channels only work on 16 for PRI and 3 for BRI.
- NT/TE mode information is not available from freetdm.conf /
at configure_span()-time so the module assumes TE mode,
which should be only a problem for cards that can change
the port configuration (pin-out) from software.
- Current design (b-channel timerfd / misdn_wait()/_read()/_write())
should be fine for most SoHo use-cases
(scalability / cpu usage / timing precision).
--- Requirements ---
- mISDNif.h header (/usr/include/mISDN/mISDNif.h), provided by mISDNuser
(http://isdn.eversberg.eu/download/lcr-1.7/mISDNuser-20100525.tar.gz).
- Linux kernel with mISDN and timerfd enabled (>= 2.6.27)
and libc with timerfd support.
mISDN options can be found in the:
"Device Drivers" -> "ISDN support" -> "Modular ISDN driver"
section of make menuconfig. Timerfd is usually enabled by default.
The FreeTDM configure script will check for missing mISDNif.h
header and timerfd support and print a message.
You should see the following in the summary screen on success:
ftmod_misdn........................ yes
NOTE: Forcing mISDN support using the "--with-misdn" configure option,
will cause the configure script to fail on the first missing
dependency.
--- Usage ---
To use the module, make sure you have mISDN support in the kernel
(kernel modules loaded or kernel with built-in mISDN running),
the "misdn_info" application shipped with mISDNuser will output
a list of available mISDN ports on your system, e.g.:
Found 5 ports
Port 0 'hfc-4s.1-1': TE/NT-mode BRI S/T (for phone lines & phones)
2 B-channels: 1-2
B-protocols: RAW HDLC X75slp
...
Port 4 'hfc-e1.2': TE/NT-mode PRI E1 (for phone lines & E1 devices)
30 B-channels: 1-15 17-31
B-protocols: RAW HDLC X75slp
NOTE: ftmod_misdn will print an error message if mISDN support is not available,
or if there are no ports installed.
- Example freetdm.conf settings
[span misdn BRI_1]
trunk_type => BRI_PTMP
b-channel => 0:1,2
d-channel => 0:3
[span misdn PRI_1]
trunk_type => E1
b-channel => hfc-e1.2:1-15,17-31
d-channel => hfc-e1.2:16
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2011-09-07 16:51:29 -04:00
|
|
|
if HAVE_MISDN
|
|
|
|
mod_LTLIBRARIES += ftmod_misdn.la
|
|
|
|
ftmod_misdn_la_SOURCES = $(SRC)/ftmod/ftmod_misdn/ftmod_misdn.c
|
2011-10-01 08:05:14 -04:00
|
|
|
ftmod_misdn_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) $(MISDN_CFLAGS) -D_GNU_SOURCE
|
[FreeTDM] Add (experimental) ftmod_misdn
Add I/O plugin for mISDN stack that is included in the linux kernel
since version 2.6.27.
The in-kernel mISDN stack uses a socket based interface (AF_ISDN),
data and control commands are exchanged via datagram messages.
This makes writing a driver that doesn't use a separate (per-span)
thread to handle all incoming events a bit tricky, because responses
to control messages and incoming data are mixed and interfacing
with the synchronous FreeTDM I/O API is problematic.
B(*)/D-channel handling:
The current version uses misdn_wait() to poll() for activity on
the non-blocking channel sockets and misdn_read() to receive and
handle all pending events up to the first PH_DATA_IND (data) message
(which is what the caller of the read method is actually after).
In case no data has been received, misdn_read() returns FTDM_SUCCESS
with *datalen = 0, which is OK for all the signalling modules tested
(ftmod_libpri and (out-of-tree) ftmod_isdn).
To send data, misdn_write() is called, which just sends a PH_DATA_REQ
message to the mISDN channel socket.
(*) B-channels use a per-channel timerfd as a timing reference for
'ready-for-write' poll()ing in misdn_wait().
This is a workaround for a limitation of mISDN sockets, which do not
support POLLOUT waiting on b-channel sockets (in a useful way).
Sending/receiving of data works the same way as on d-channels, otherwise.
The module has received some minimal testing using a beronet
single-port HFC E1 and a HFC4-S quad-port BRI card on linux-3.0.x.
--- Limitations ---
- Only the most basic features have been implemented (alarms,
sending/receiving data/audio).
- Spans are limited to E1 and BRI/BRI_PTMP trunk types.
- D-Channels only work on 16 for PRI and 3 for BRI.
- NT/TE mode information is not available from freetdm.conf /
at configure_span()-time so the module assumes TE mode,
which should be only a problem for cards that can change
the port configuration (pin-out) from software.
- Current design (b-channel timerfd / misdn_wait()/_read()/_write())
should be fine for most SoHo use-cases
(scalability / cpu usage / timing precision).
--- Requirements ---
- mISDNif.h header (/usr/include/mISDN/mISDNif.h), provided by mISDNuser
(http://isdn.eversberg.eu/download/lcr-1.7/mISDNuser-20100525.tar.gz).
- Linux kernel with mISDN and timerfd enabled (>= 2.6.27)
and libc with timerfd support.
mISDN options can be found in the:
"Device Drivers" -> "ISDN support" -> "Modular ISDN driver"
section of make menuconfig. Timerfd is usually enabled by default.
The FreeTDM configure script will check for missing mISDNif.h
header and timerfd support and print a message.
You should see the following in the summary screen on success:
ftmod_misdn........................ yes
NOTE: Forcing mISDN support using the "--with-misdn" configure option,
will cause the configure script to fail on the first missing
dependency.
--- Usage ---
To use the module, make sure you have mISDN support in the kernel
(kernel modules loaded or kernel with built-in mISDN running),
the "misdn_info" application shipped with mISDNuser will output
a list of available mISDN ports on your system, e.g.:
Found 5 ports
Port 0 'hfc-4s.1-1': TE/NT-mode BRI S/T (for phone lines & phones)
2 B-channels: 1-2
B-protocols: RAW HDLC X75slp
...
Port 4 'hfc-e1.2': TE/NT-mode PRI E1 (for phone lines & E1 devices)
30 B-channels: 1-15 17-31
B-protocols: RAW HDLC X75slp
NOTE: ftmod_misdn will print an error message if mISDN support is not available,
or if there are no ports installed.
- Example freetdm.conf settings
[span misdn BRI_1]
trunk_type => BRI_PTMP
b-channel => 0:1,2
d-channel => 0:3
[span misdn PRI_1]
trunk_type => E1
b-channel => hfc-e1.2:1-15,17-31
d-channel => hfc-e1.2:16
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2011-09-07 16:51:29 -04:00
|
|
|
ftmod_misdn_la_LDFLAGS = -shared -module -avoid-version
|
|
|
|
ftmod_misdn_la_LIBADD = libfreetdm.la
|
|
|
|
endif
|
|
|
|
|
2009-04-08 17:35:29 -04:00
|
|
|
dox doxygen:
|
2010-09-27 21:22:52 -04:00
|
|
|
doxygen $(FT_SRCDIR)/docs/Doxygen.conf
|
2009-04-08 17:35:29 -04:00
|
|
|
|
2010-10-31 21:13:27 -04:00
|
|
|
mod_freetdm/mod_freetdm.$(DYNAMIC_LIB_EXTEN): libfreetdm.la mod_freetdm/mod_freetdm.c
|
|
|
|
$(MAKE) -C mod_freetdm
|
2009-04-08 17:35:29 -04:00
|
|
|
|
2010-01-15 14:22:49 -05:00
|
|
|
mod_freetdm: mod_freetdm/mod_freetdm.$(DYNAMIC_LIB_EXTEN)
|
2009-04-08 17:35:29 -04:00
|
|
|
|
2010-01-15 14:22:49 -05:00
|
|
|
mod_freetdm-install: mod_freetdm
|
2010-10-31 21:13:27 -04:00
|
|
|
$(MAKE) -C mod_freetdm install
|
2009-04-08 17:35:29 -04:00
|
|
|
|
2010-01-15 14:22:49 -05:00
|
|
|
mod_freetdm-clean:
|
2010-10-31 21:13:27 -04:00
|
|
|
@if [ -f mod_freetdm/mod_freetdm.$(DYNAMIC_LIB_EXTEN) ] ; then \
|
|
|
|
$(MAKE) -C mod_freetdm clean ; \
|
|
|
|
fi
|
2009-04-08 17:35:29 -04:00
|
|
|
|
|
|
|
install-data-local:
|
2010-10-31 21:13:27 -04:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(prefix)
|
2009-06-09 11:23:51 -04:00
|
|
|
$(mkinstalldirs) $(DESTDIR)@confdir@
|
2010-01-15 14:22:49 -05:00
|
|
|
@[ -f "$(DESTDIR)@confdir@/freetdm.conf" ] || ( cp conf/*.conf $(DESTDIR)@confdir@)
|
2010-04-19 11:39:03 -04:00
|
|
|
@echo FreeTDM Installed
|