2014-12-22 04:07:59 +08:00
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
|
|
|
LEGACY_MAKE = \
|
|
|
|
$(MAKE) -f $(srcdir)/Makefile.legacy \
|
|
|
|
top_srcdir=$(top_srcdir) \
|
|
|
|
srcdir=$(srcdir)
|
|
|
|
|
2014-12-21 22:21:57 +08:00
|
|
|
CFLAGS = -g -Wall -O2 $(DAHDI_INCLUDE)
|
|
|
|
if DAHDI_DEVMODE
|
|
|
|
CFLAGS += \
|
|
|
|
-Werror \
|
|
|
|
-Wunused \
|
|
|
|
-Wundef \
|
|
|
|
$(DAHDI_DECLARATION_AFTER_STATEMENT) \
|
|
|
|
-Wmissing-format-attribute \
|
|
|
|
-Wformat-security \
|
|
|
|
#-Wformat=2
|
|
|
|
endif
|
2014-12-22 04:10:31 +08:00
|
|
|
|
2015-05-19 01:19:47 +08:00
|
|
|
SUBDIRS = xpp doc hotplug
|
2014-12-22 04:07:59 +08:00
|
|
|
|
2014-12-21 22:11:11 +08:00
|
|
|
if PPPD
|
|
|
|
SUBDIRS += ppp
|
|
|
|
endif
|
|
|
|
|
2015-05-19 01:19:47 +08:00
|
|
|
noinst_HEADERS = \
|
|
|
|
bittest.h \
|
|
|
|
dahdi_tools_version.h \
|
|
|
|
fxotune.h \
|
|
|
|
wavformat.h \
|
|
|
|
#
|
|
|
|
|
2014-12-22 04:10:31 +08:00
|
|
|
sbin_PROGRAMS = \
|
|
|
|
dahdi_test \
|
|
|
|
dahdi_maint \
|
|
|
|
dahdi_monitor \
|
|
|
|
dahdi_cfg \
|
|
|
|
dahdi_speed \
|
|
|
|
dahdi_scan \
|
|
|
|
fxotune
|
|
|
|
|
|
|
|
noinst_PROGRAMS = \
|
|
|
|
fxstest \
|
|
|
|
patgen \
|
|
|
|
pattest \
|
|
|
|
patlooptest \
|
|
|
|
dahdi_diag \
|
|
|
|
timertest
|
|
|
|
|
2015-05-19 01:19:47 +08:00
|
|
|
dist_sbin_SCRIPTS = \
|
2014-12-22 04:10:31 +08:00
|
|
|
dahdi_span_assignments \
|
|
|
|
dahdi_waitfor_span_assignments \
|
|
|
|
dahdi_span_types
|
|
|
|
|
|
|
|
if PBX_HDLC
|
|
|
|
sbin_PROGRAMS += sethdlc
|
|
|
|
noinst_PROGRAMS += hdlcstress hdlctest hdlcgen hdlcverify
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Libtool versioning for libtonezone:
|
|
|
|
# Bump when interface changes
|
|
|
|
LTZ_CURRENT = 2
|
|
|
|
# Bump if interface change is backward compatible
|
|
|
|
LTZ_AGE = 0
|
|
|
|
# Bump if only implementation change
|
|
|
|
LTZ_REVISION = 0
|
|
|
|
|
|
|
|
lib_LTLIBRARIES = libtonezone.la
|
|
|
|
|
|
|
|
libtonezone_la_SOURCES = \
|
|
|
|
zonedata.c \
|
|
|
|
tonezone.c \
|
|
|
|
version.c
|
2015-05-25 23:22:01 +08:00
|
|
|
dahdiinclude_HEADERS = tonezone.h
|
2014-12-22 04:10:31 +08:00
|
|
|
libtonezone_la_CFLAGS = $(CFLAGS) -I$(srcdir) -DBUILDING_TONEZONE
|
|
|
|
libtonezone_la_LDFLAGS = -version-info "$(LTZ_CURRENT):$(LTZ_REVISION):$(LTZ_AGE)"
|
|
|
|
|
2015-05-19 02:59:33 +08:00
|
|
|
if PBX_PCAP
|
|
|
|
noinst_PROGRAMS += dahdi_pcap
|
|
|
|
dahdi_pcap_LDADD = -lpcap
|
|
|
|
endif
|
|
|
|
|
2014-12-22 04:10:31 +08:00
|
|
|
patlooptest_LDADD = libtonezone.la -lm
|
|
|
|
fxstest_LDADD = libtonezone.la -lm
|
|
|
|
fxotune_LDADD = -lm
|
|
|
|
dahdi_speed_CFLAGS = -O2
|
|
|
|
|
|
|
|
dahdi_maint_SOURCES = dahdi_maint.c version.c
|
|
|
|
|
|
|
|
if PBX_NEWT
|
|
|
|
sbin_PROGRAMS += dahdi_tool
|
|
|
|
dahdi_tool_CFLAGS = $(CFLAGS) $(NEWT_INCLUDE)
|
|
|
|
dahdi_tool_LDADD = $(NEWT_LIB)
|
|
|
|
endif
|
|
|
|
|
|
|
|
dahdi_cfg_LDFLAGS = -lm -lpthread
|
|
|
|
dahdi_cfg_LDADD = libtonezone.la
|
|
|
|
|
2015-05-19 01:19:47 +08:00
|
|
|
udevrulesdir = @udevrulesdir@
|
|
|
|
udevrules_DATA = dahdi.rules
|
|
|
|
|
2014-12-22 04:07:59 +08:00
|
|
|
all-local:
|
|
|
|
$(LEGACY_MAKE) all
|
|
|
|
|
|
|
|
clean-local:
|
|
|
|
$(LEGACY_MAKE) clean
|
|
|
|
|
|
|
|
install-exec-hook:
|
|
|
|
$(LEGACY_MAKE) install
|
2014-12-22 04:10:31 +08:00
|
|
|
@echo "Compatibility symlinks (should be removed in the future)"
|
2015-06-14 21:27:51 +08:00
|
|
|
ln -sf libtonezone.so.2.0.0 $(DESTDIR)$(libdir)/libtonezone.so.2.0
|
2014-12-22 04:07:59 +08:00
|
|
|
|
2015-05-19 01:19:47 +08:00
|
|
|
bashcompdir = $(sysconfdir)/bash_completion.d
|
|
|
|
|
|
|
|
install-data-hook:
|
|
|
|
mkdir -p $(DESTDIR)$(bashcompdir)
|
|
|
|
install -m 644 $(srcdir)/dahdi-bash-completion $(DESTDIR)$(bashcompdir)/dahdi
|
|
|
|
|
|
|
|
# Handle these files specially -- install them only with 'install-config'
|
|
|
|
special_config_files = \
|
|
|
|
init.conf.sample \
|
|
|
|
blacklist.sample \
|
|
|
|
modprobe.conf.sample \
|
|
|
|
#
|
|
|
|
|
|
|
|
install-config:
|
|
|
|
mkdir -p $(DESTDIR)$(dahdiconfdir)
|
|
|
|
mkdir -p $(DESTDIR)$(sysconfdir)/modprobe.d
|
|
|
|
install -m644 xpp/genconf_parameters $(DESTDIR)$(dahdiconfdir)/genconf_parameters
|
|
|
|
install -m644 init.conf.sample $(DESTDIR)$(dahdiconfdir)/init.conf
|
|
|
|
install -m644 blacklist.sample $(DESTDIR)$(sysconfdir)/modprobe.d/dahdi-blacklist.conf
|
|
|
|
install -m644 modprobe.conf.sample $(DESTDIR)$(sysconfdir)/modprobe.d/dahdi.conf
|
|
|
|
$(LEGACY_MAKE) config
|
|
|
|
|
|
|
|
dahdiconfdir = @sysconfdir@/dahdi
|
|
|
|
dahdiconf_DATA = \
|
|
|
|
system.conf.sample \
|
|
|
|
assigned-spans.conf.sample \
|
|
|
|
span-types.conf.sample \
|
|
|
|
modules.sample \
|
|
|
|
#
|
|
|
|
|
|
|
|
build_scripts = \
|
|
|
|
build_tools/dahdi_svn_tarball \
|
|
|
|
build_tools/dahdi_sysfs_copy \
|
|
|
|
build_tools/dump_sys_state \
|
|
|
|
build_tools/make_firmware_object.in \
|
|
|
|
build_tools/make_tree \
|
|
|
|
build_tools/make_version \
|
|
|
|
build_tools/test_kernel_git \
|
|
|
|
build_tools/uninstall-modules \
|
|
|
|
#
|
|
|
|
|
|
|
|
.version:
|
|
|
|
if ./build_tools/make_version . dahdi/tools > $@.tmp; then \
|
|
|
|
mv "$@.tmp" "$@"; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
uninstall-hook:
|
|
|
|
$(RM) $(DESTDIR)$(sysconfdir)/dahdi/span-types.conf.sample
|
|
|
|
$(RM) $(DESTDIR)$(sysconfdir)/dahdi/assigned-spans.conf.sample
|
|
|
|
$(RM) $(DESTDIR)$(sysconfdir)/dahdi/system.conf
|
|
|
|
$(RM) $(DESTDIR)$(bashcompdir)/dahdi
|
|
|
|
|
|
|
|
docs:
|
2014-12-22 04:07:59 +08:00
|
|
|
$(LEGACY_MAKE) $@
|
|
|
|
|
|
|
|
DISTCLEANFILES = makeopts config.log config.status .*.d
|
|
|
|
|
2014-12-08 03:00:42 +08:00
|
|
|
MAINTAINERCLEANFILES = \
|
|
|
|
m4/libtool.m4 \
|
|
|
|
m4/ltoptions.m4 \
|
|
|
|
m4/ltsugar.m4 \
|
|
|
|
m4/ltversion.m4 \
|
|
|
|
m4/lt~obsolete.m4 \
|
|
|
|
#
|
|
|
|
|
2015-05-19 01:19:47 +08:00
|
|
|
EXTRA_DIST = \
|
|
|
|
.version \
|
|
|
|
LICENSE \
|
|
|
|
LICENSE.LGPL \
|
|
|
|
UPGRADE.txt \
|
|
|
|
bootstrap.sh \
|
|
|
|
Makefile.legacy \
|
|
|
|
dahdi.init \
|
|
|
|
dahdi.xml \
|
|
|
|
dahdi_pcap.c \
|
|
|
|
ifup-hdlc \
|
|
|
|
dahdi-bash-completion \
|
|
|
|
$(special_config_files) \
|
|
|
|
$(dahdiconf_DATA) \
|
|
|
|
$(udevrules_DATA) \
|
|
|
|
$(build_scripts) \
|
|
|
|
#
|
|
|
|
|
2014-12-22 04:07:59 +08:00
|
|
|
.PHONY: docs config
|