summaryrefslogtreecommitdiff
path: root/xpp/utils/Makefile
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-09-04 23:53:30 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-09-04 23:53:30 +0000
commitd1dca1a4fed07a51f4a2b013902eca069ae1734c (patch)
treedaeb458935244fae1a2293068a46140e694fafc0 /xpp/utils/Makefile
parentee5282ac097e112e9baf1c760211e6ee0f2a4fe8 (diff)
* Re-add calibrate_slics to the FXS initialization process
* xpp/utils: Build and install init_fxo_modes . Data is based on data from wctdm.c . TODO: a separate daa.h? * Fail the script if automatic calibration has failed. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1394 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/utils/Makefile')
-rw-r--r--xpp/utils/Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/xpp/utils/Makefile b/xpp/utils/Makefile
index d840333..7dc4fa2 100644
--- a/xpp/utils/Makefile
+++ b/xpp/utils/Makefile
@@ -10,11 +10,13 @@ DATADIR = /usr/share/zaptel
MANDIR = /usr/share/man/man8
HOTPLUG_USB_DIR = /etc/hotplug/usb
-DATA_FILES = $(wildcard ../init_data_*.cmd *.hex)
+DATA_FILES = $(wildcard ../init_data_*.cmd *.hex) init_fxo_modes
+
+WCTDM=../../wctdm.c
CFLAGS = -g -Wall $(EXTRA_CFLAGS)
-TARGETS = libhexfile.a fpga_load test_parse
+TARGETS = libhexfile.a fpga_load test_parse init_fxo_modes
all: $(TARGETS)
@@ -23,7 +25,7 @@ install: all
$(INSTALL) genzaptelconf fpga_load $(DESTDIR)$(BINDIR)/
$(INSTALL) -d $(DESTDIR)$(DATADIR)
$(INSTALL_DATA) $(DATA_FILES) $(DESTDIR)$(DATADIR)/
- $(INSTALL) ../initialize_registers $(DESTDIR)$(DATADIR)/
+ $(INSTALL) ../initialize_registers ../calibrate_slics $(DESTDIR)$(DATADIR)/
$(INSTALL) -d $(DESTDIR)$(MANDIR)
$(INSTALL_DATA) fpga_load.8 genzaptelconf.8 $(DESTDIR)$(MANDIR)/
$(INSTALL) -d $(DESTDIR)$(HOTPLUG_USB_DIR)
@@ -46,5 +48,13 @@ 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.o: wctdm_fxomodes.h
+
+wctdm_fxomodes.h: $(WCTDM)
+ perl -n -e 'print if (/^static struct fxo_mode {$$/ .. /};$$/)' $(WCTDM) >$@
+
+init_fxo_modes: print_modes
+ ./$^ >$@
+
clean:
$(RM) *.o $(TARGETS)