From 1ad8683858d8c7c6ef0b0dd65c78d764663ff504 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 12 Jul 2011 05:39:49 -0300 Subject: [PATCH] atusb/fw/Makefile (bindist): new target to upload and describe atusb.bin --- atusb/fw/Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/atusb/fw/Makefile b/atusb/fw/Makefile index ec27c5e..db0e9a7 100644 --- a/atusb/fw/Makefile +++ b/atusb/fw/Makefile @@ -61,7 +61,7 @@ endif # ----- Rules ----------------------------------------------------------------- -.PHONY: all clean upload prog dfu update version.c +.PHONY: all clean upload prog dfu update version.c bindist .PHONY: prog-app prog-read on off reset all: $(NAME).bin boot.hex @@ -135,6 +135,19 @@ boot-%.o: usb/%.c $(CC) $(CFLAGS) -DBOOT_LOADER -Os -o $@ -c $< $(MKDEP) +# ----- Distribution ---------------------------------------------------------- + +BINDIST_BASE=http://downloads.qi-hardware.com/people/werner/wpan/bindist +ATUSB_BIN_NAME=atusb-`git rev-parse HEAD | cut -c 1-7`.bin + +bindist: + qippl atusb.bin wpan/bindist/$(ATUSB_BIN_NAME) + @echo $(BINDIST_BASE)/$(ATUSB_BIN_NAME) + @echo md5sum: `md5sum atusb.bin | sed 's/ .*//'` + @echo atrf-id: \ + `sed '/.*number = \(.*\);/s//#\1/p;d' version.c` \ + `sed '/.*date = "\(.*\)";/s//\1/p;d' version.c` + # ----- Programming and device control ---------------------------------------- upload: $(NAME).bin boot.hex