diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-04-02 20:56:42 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-04-02 20:56:42 +0000 |
commit | cb01267f42eba7bc5a572235e5d2571cc9b60303 (patch) | |
tree | 421d7509698c604a76499fdc95432642f323d9ad /xpp/Makefile | |
parent | 8c29f87f0fe6465a171644f1d916481d0d2def4f (diff) |
Support for Astribanks 116x: tools part
* New USB firmware loading mechanism.
- Incompatible with previous one: upgrade using fxload or hard reset
- astribank_hexload is the new low-level loading tool
- fpga_load remains for backward compatibility.
- xpp/astribank_upgrade: automate upgrading using fxload
* Much enhanced control protocol ("MPP")
- astribank_tool is the low-level tool for that.
* Support for the TwinStar (dual USB port)
- Managed through astribank_tool
- Wrapper perl modules and scripts provided
* Allow explicit ordering of Astribanks
- /etc/dahdi/xpp_order - explicit order of Astribanks on the system
- The default sorter is now to use those and fall back to connectors
(previous default).
- An option to dahdi_registration to change sorting.
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@6313 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/Makefile')
-rw-r--r-- | xpp/Makefile | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/xpp/Makefile b/xpp/Makefile index 087bc4b..c8084b8 100644 --- a/xpp/Makefile +++ b/xpp/Makefile @@ -1,6 +1,5 @@ PEDANTIC = -ansi -pedantic -std=c99 -RANLIB = ranlib INSTALL = install INSTALL_DATA = install -m 644 @@ -54,12 +53,20 @@ PERL_SCRIPTS = \ PERL_MANS = $(PERL_SCRIPTS:%=%.8) -TARGETS = perlcheck -PROG_INSTALL = #genzaptelconf +ABHEXLOAD_OBJS = astribank_hexload.o hexfile.o pic_loader.o astribank_usb.o mpp_funcs.o debug.o +ABTOOL_OBJS = astribank_tool.o astribank_usb.o mpp_funcs.o debug.o +ABALLOW_OBJS = astribank_allow.o astribank_usb.o mpp_funcs.o debug.o + +TARGETS = .perlcheck +PROG_INSTALL = MAN_INSTALL = $(PROG_INSTALL:%=%.8) ifeq (1,$(PBX_USB)) -TARGETS += libhexfile.a fpga_load test_parse -PROG_INSTALL += fpga_load +TARGETS += fpga_load \ + astribank_tool \ + astribank_hexload \ + astribank_allow \ + test_parse +PROG_INSTALL += fpga_load astribank_tool astribank_hexload endif ifneq (,$(PERLLIBDIR)) PROG_INSTALL += $(PERL_SCRIPTS) @@ -94,27 +101,34 @@ ifneq (,$(PERLLIBDIR)) done endif -libhexfile.a: hexfile.o - $(AR) cru $@ $^ - $(RANLIB) $@ +fpga_load: fpga_load.o hexfile.o + $(CC) -L. -o $@ $^ $(EXTRA_LIBS) -lusb -fpga_load: fpga_load.o libhexfile.a - $(CC) -L. -o $@ $@.o $(EXTRA_LIBS) -lhexfile -lusb +astribank_hexload: $(ABHEXLOAD_OBJS) + $(CC) -L. -o $@ $(ABHEXLOAD_OBJS) $(EXTRA_LIBS) -lusb -fpga_load.o: CFLAGS+=-D_GNU_SOURCE # We use memrchr() +astribank_tool: $(ABTOOL_OBJS) + $(CC) -L. -o $@ $(ABTOOL_OBJS) $(EXTRA_LIBS) -lusb + +astribank_allow: $(ABALLOW_OBJS) + $(CC) -L. -o $@ $(ABALLOW_OBJS) $(EXTRA_LIBS) -lusb -hexfile.o: hexfile.c hexfile.h - $(CC) $(CFLAGS) $(PEDANTIC) -c $< +fpga_load.o: CFLAGS+=-D_GNU_SOURCE # We use memrchr() -test_parse.o: test_parse.c hexfile.h - $(CC) $(CFLAGS) $(PEDANTIC) -c $< +test_parse: test_parse.o hexfile.o + $(CC) -L. -o $@ $^ $(EXTRA_LIBS) -lusb -test_parse: test_parse.o libhexfile.a - $(CC) -L. -o $@ $@.o $(EXTRA_LIBS) -lhexfile -lusb -perlcheck: $(PERL_SCRIPTS) +.perlcheck: $(PERL_SCRIPTS) for i in $^; do perl -I./perl_modules -c $$i || exit 1; done touch $@ clean: - $(RM) *.o $(TARGETS) + $(RM) .depend *.o $(TARGETS) + +.PHONY: depend +depend: .depend +.depend: *.c *.h + @$(CC) -MM *.c > $@ || rm -f $@ + +include .depend |