X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=Makefile;h=fc8d4c1020dac2bce5e7f32c440847aa189fac51;hb=2b421d0ecf9ec717a6864da01a071d3c9bfeec7e;hp=af2301cec7c28052f2c481b816551000f915c202;hpb=572ac4c4c2e04fc12cf11dc1d60d528209f9919c;p=sigrok-firmware-fx2lafw.git diff --git a/Makefile b/Makefile index af2301ce..fc8d4c10 100644 --- a/Makefile +++ b/Makefile @@ -18,25 +18,72 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -all: saleae-logic cwav-usbeeax cwav-usbeesx cypress-fx2 +# sigrok-firmware-fx2lafw package/tarball version number. +VERSION = "0.1.0" + +DESTDIR ?= /usr/local/share/sigrok-firmware + +REPO = git://sigrok.org/sigrok-firmware-fx2lafw + +TARBALLDIR = sigrok-firmware-fx2lafw-$(VERSION) +TARBALLBINDIR = sigrok-firmware-fx2lafw-bin-$(VERSION) + +all: build-all + +build-all: saleae-logic cwav-usbeeax cwav-usbeedx cwav-usbeesx cypress-fx2 braintechnology-usb-lps saleae-logic: - $(MAKE) -C hw/saleae-logic + @$(MAKE) -C hw/saleae-logic cwav-usbeeax: - $(MAKE) -C hw/cwav-usbeeax + @$(MAKE) -C hw/cwav-usbeeax + +cwav-usbeedx: + @$(MAKE) -C hw/cwav-usbeedx cwav-usbeesx: - $(MAKE) -C hw/cwav-usbeesx + @$(MAKE) -C hw/cwav-usbeesx cypress-fx2: - $(MAKE) -C hw/cypress-fx2 + @$(MAKE) -C hw/cypress-fx2 -clean: - rm -rf hw/saleae-logic/build - rm -rf hw/cwav-usbeeax/build - rm -rf hw/cwav-usbeesx/build - rm -rf hw/cypress-fx2/build +braintechnology-usb-lps: + @$(MAKE) -C hw/braintechnology-usb-lps + +ChangeLog: + @git log > ChangeLog || touch ChangeLog + +dist: + @git clone $(REPO) $(TARBALLDIR) + @cd $(TARBALLDIR) && $(MAKE) ChangeLog && cd .. + @rm -rf $(TARBALLDIR)/.git + @tar -c -z -f $(TARBALLDIR).tar.gz $(TARBALLDIR) + @rm -rf $(TARBALLDIR) -.PHONY: saleae-logic cwav-usbeeax cwav-usbeesx cypress-fx2 +distbin: build-all ChangeLog + @mkdir $(TARBALLBINDIR) + @cp hw/*/build/*.fw $(TARBALLBINDIR) + @cp README NEWS ChangeLog $(TARBALLBINDIR) + @tar -c -z -f $(TARBALLBINDIR).tar.gz $(TARBALLBINDIR) + @rm -rf $(TARBALLBINDIR) + @rm -f ChangeLog + +install: build-all + @mkdir -p $(DESTDIR) + @cp hw/saleae-logic/build/*.fw $(DESTDIR) + @cp hw/cwav-usbeeax/build/*.fw $(DESTDIR) + @cp hw/cwav-usbeedx/build/*.fw $(DESTDIR) + @cp hw/cwav-usbeesx/build/*.fw $(DESTDIR) + @cp hw/cypress-fx2/build/*.fw $(DESTDIR) + @cp hw/braintechnology-usb-lps/build/*.fw $(DESTDIR) + +clean: + @rm -rf hw/saleae-logic/build + @rm -rf hw/cwav-usbeeax/build + @rm -rf hw/cwav-usbeedx/build + @rm -rf hw/cwav-usbeesx/build + @rm -rf hw/cypress-fx2/build + @rm -rf hw/braintechnology-usb-lps/build + @$(MAKE) -C fx2lib clean +.PHONY: saleae-logic cwav-usbeeax cwav-usbeedx cwav-usbeesx cypress-fx2 braintechnology-usb-lps