summaryrefslogtreecommitdiff
path: root/xpp/Makefile
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-06-19 17:34:36 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-06-19 17:34:36 +0000
commitda10e87bd6c69c4374de470b7b286c36c823fdc2 (patch)
tree8ae3ddc2b5eff066497697c0c6ec1bc7ee6433ad /xpp/Makefile
parentc1ae88873823bdc2d884f72cc2b06eab017b97b1 (diff)
XPP tools rename: part 2.
Removed obsolete astribank_hook (not needed) and print_modes (moved to kernel). git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@4416 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/Makefile')
-rw-r--r--xpp/Makefile47
1 files changed, 15 insertions, 32 deletions
diff --git a/xpp/Makefile b/xpp/Makefile
index 2e3624c..81a14c0 100644
--- a/xpp/Makefile
+++ b/xpp/Makefile
@@ -10,10 +10,10 @@ INSTALL_DATA = install -m 644
#
# These variables should be passed to us. But until then...
#
-ZAPTEL_DIR ?= $(shell if [ -f "../../zaptel.h" ]; then echo "../.."; else echo "../../.."; fi)
-ZAP_KERNEL ?= $(shell if [ -d "$(ZAPTEL_DIR)/kernel" ]; then echo "$(ZAPTEL_DIR)/kernel"; else echo "$(ZAPTEL_DIR)"; fi)
+DAHDI_TOOLSDIR ?= ..
+DAHDI_KERNELDIR =
--include $(ZAPTEL_DIR)/makeopts
+include $(DAHDI_TOOLSDIR)/makeopts
INSTALL_DATA = $(INSTALL) -m 644
@@ -26,50 +26,43 @@ INSTALL ?= install
INSTALL_DATA = $(INSTALL) -m 644
SBINDIR = $(prefix)/sbin
-DATADIR = $(datadir)/zaptel
+DATADIR = $(datadir)/dahdi
MANDIR = $(mandir)/man8
HOTPLUG_USB_DIR = /etc/hotplug/usb
UDEV_RULES_DIR = /etc/udev/rules.d
PERLLIBDIR := $(shell eval `perl -V:sitelib`; echo "$$sitelib")
-PERL_DIRS := $(shell cd zconf; find * -name '[A-Z]*' -type d| xargs)
+PERL_DIRS := $(shell cd perl_modules; find * -name '[A-Z]*' -type d| xargs)
PERL_MODS_PAT := *.pm $(PERL_DIRS:%=%/*.pm)
-PERL_MODS := $(shell cd zconf; echo $(PERL_MODS_PAT))
+PERL_MODS := $(shell cd perl_modules; echo $(PERL_MODS_PAT))
XPD_FIRMWARE = $(wildcard ../firmwares/*.hex)
-XPD_INIT_DATA = $(XPD_FIRMWARE) init_fxo_modes
+XPD_INIT_DATA = $(XPD_FIRMWARE)
XPD_INIT = $(wildcard ../init_card_?_*) xpp_fxloader
# Variables that should be defined above, but need sane defaults:
# FIXME: Are those values really sane?
HOSTCC ?= $(CC)
-ifeq (,$(PBX_LIBUSB))
-# No PBX_LIBUSB? Maybe we compile against zaptel-1.2
-# Let's make a poor man detection of libusb
-PBX_LIBUSB = $(shell if [ -r /usr/include/usb.h ]; then echo 1; else echo 0; fi)
-endif
-
-WCTDM=$(shell for i in $(ZAP_KERNEL)/wctdm.c $(ZAP_KERNEL)/fxo_modes.h; do [ -f "$$i" ] && echo "$$i"; done)
CFLAGS = -g -Wall $(EXTRA_CFLAGS)
%.8: %
pod2man --section 8 $^ > $@ || $(RM) $@
PERL_SCRIPTS = \
- zt_registration \
+ dahdi_registration \
xpp_sync \
- lszaptel \
+ lsdahdi \
xpp_blink \
- zapconf \
- zaptel_hardware \
+ dahdi_genconf \
+ dahdi_hardware \
#
PERL_MANS = $(PERL_SCRIPTS:%=%.8)
-TARGETS = init_fxo_modes print_modes perlcheck
+TARGETS = perlcheck
PROG_INSTALL = genzaptelconf
MAN_INSTALL = $(PROG_INSTALL:%=%.8)
-ifeq (1,$(PBX_LIBUSB))
+ifeq (1,$(PBX_USB))
TARGETS += libhexfile.a fpga_load test_parse
PROG_INSTALL += fpga_load
endif
@@ -104,7 +97,7 @@ ifneq (,$(PERLLIBDIR))
done
for i in $(PERL_MODS); \
do \
- $(INSTALL_DATA) "zconf/$$i" "$(DESTDIR)$(PERLLIBDIR)/$$i"; \
+ $(INSTALL_DATA) "perl_modules/$$i" "$(DESTDIR)$(PERLLIBDIR)/$$i"; \
done
endif
@@ -126,18 +119,8 @@ test_parse.o: test_parse.c hexfile.h
test_parse: test_parse.o libhexfile.a
$(CC) -L. -o $@ $@.o $(EXTRA_LIBS) -lhexfile -lusb
-print_modes: print_modes.c wctdm_fxomodes.h
- $(HOSTCC) -o $@ $(CFLAGS) $<
-
-wctdm_fxomodes.h: $(WCTDM)
- @echo Building FXO modes from: $(WCTDM)
- perl -n -e 'print if (/^static struct fxo_mode {$$/ .. /};$$/)' $(WCTDM) >$@ || rm -f $@
-
-init_fxo_modes: print_modes
- ./$< >$@
-
perlcheck: $(PERL_SCRIPTS)
- for i in $^; do perl -I./zconf -c $$i || exit 1; done
+ for i in $^; do perl -I./perl_modules -c $$i || exit 1; done
touch $@
clean: