]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blame - Makefile
Makefile: Add a 'distbin' target.
[sigrok-firmware-fx2lafw.git] / Makefile
CommitLineData
d5f5ea73
UH
1##
2## This file is part of the fx2lafw project.
3##
1b6280b7 4## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
d5f5ea73
UH
5##
6## This program is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation; either version 2 of the License, or
9## (at your option) any later version.
10##
11## This program is distributed in the hope that it will be useful,
12## but WITHOUT ANY WARRANTY; without even the implied warranty of
13## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14## GNU General Public License for more details.
15##
16## You should have received a copy of the GNU General Public License
17## along with this program; if not, write to the Free Software
18## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19##
20
d4c18241
UH
21# sigrok-firmware-fx2lafw package/tarball version number.
22VERSION = "0.1.0"
23
a15c1f06
UH
24DESTDIR ?= /usr/local/share/sigrok-firmware
25
d4c18241
UH
26REPO = git://sigrok.git.sourceforge.net/gitroot/sigrok/fx2lafw
27
28TARBALLDIR = sigrok-firmware-fx2lafw-$(VERSION)
d9531f65 29TARBALLBINDIR = sigrok-firmware-fx2lafw-bin-$(VERSION)
d4c18241 30
a15c1f06
UH
31all: build-all
32
33build-all: saleae-logic cwav-usbeeax cwav-usbeesx cypress-fx2 braintechnology-usb-lps
6e078ef4
UH
34
35saleae-logic:
0bac7de5 36 @$(MAKE) -C hw/saleae-logic
e1c8448f 37
1b6280b7 38cwav-usbeeax:
0bac7de5 39 @$(MAKE) -C hw/cwav-usbeeax
c430e296 40
f55de58e 41cwav-usbeesx:
0bac7de5 42 @$(MAKE) -C hw/cwav-usbeesx
95550c95 43
572ac4c4 44cypress-fx2:
0bac7de5 45 @$(MAKE) -C hw/cypress-fx2
572ac4c4 46
312f8b34 47braintechnology-usb-lps:
0bac7de5 48 @$(MAKE) -C hw/braintechnology-usb-lps
312f8b34 49
38abb1cb
UH
50ChangeLog:
51 @git log > ChangeLog || touch ChangeLog
52
d4c18241 53dist:
0bac7de5
UH
54 @git clone $(REPO) $(TARBALLDIR)
55 @cd $(TARBALLDIR) && $(MAKE) ChangeLog && cd ..
56 @rm -rf $(TARBALLDIR)/.git
d4c18241
UH
57 @tar -c -z -f $(TARBALLDIR).tar.gz $(TARBALLDIR)
58 @rm -rf $(TARBALLDIR)
59
d9531f65
UH
60distbin: build-all ChangeLog
61 @mkdir $(TARBALLBINDIR)
62 @cp hw/*/build/*.fw $(TARBALLBINDIR)
63 @cp README NEWS ChangeLog $(TARBALLBINDIR)
64 @tar -c -z -f $(TARBALLBINDIR).tar.gz $(TARBALLBINDIR)
65 @rm -rf $(TARBALLBINDIR)
66 @rm -f ChangeLog
67
a15c1f06
UH
68install: build-all
69 @mkdir -p $(DESTDIR)
70 @cp hw/saleae-logic/build/*.fw $(DESTDIR)
71 @cp hw/cwav-usbeeax/build/*.fw $(DESTDIR)
72 @cp hw/cwav-usbeesx/build/*.fw $(DESTDIR)
73 @cp hw/cypress-fx2/build/*.fw $(DESTDIR)
74 @cp hw/braintechnology-usb-lps/build/*.fw $(DESTDIR)
75
1b6280b7 76clean:
a15c1f06
UH
77 @rm -rf hw/saleae-logic/build
78 @rm -rf hw/cwav-usbeeax/build
79 @rm -rf hw/cwav-usbeesx/build
80 @rm -rf hw/cypress-fx2/build
81 @rm -rf hw/braintechnology-usb-lps/build
0bac7de5 82 @$(MAKE) -C fx2lib clean
60b99ccc 83
312f8b34 84.PHONY: saleae-logic cwav-usbeeax cwav-usbeesx cypress-fx2 braintechnology-usb-lps
106ee45c 85