X-Git-Url: http://git.linex4red.de/pub/USBaspLoader.git/blobdiff_plain/61085a4540e9abf0d1698396638db7c617d0e48e..refs/heads/master:/updater/Makefile diff --git a/updater/Makefile b/updater/Makefile index a1bc14d..db0cd8c 100644 --- a/updater/Makefile +++ b/updater/Makefile @@ -57,7 +57,15 @@ usbasploader.o: usbasploader.raw $(DEPENDS) updater.o: updater.c usbasploader.h usbasploader.raw usbasploader.o $(DEPENDS) +ifndef UPDATECRC32 $(CC) updater.c -c -o updater.o -DSIZEOF_new_firmware=$(shell stat -c %s usbasploader.raw) $(CFLAGS) +else +ifeq ($(UPDATECRC32), 0) + $(CC) updater.c -c -o updater.o -DSIZEOF_new_firmware=$(shell stat -c %s usbasploader.raw) -DUPDATECRC32=0x$(shell crc32 usbasploader.raw) $(CFLAGS) +else + $(CC) updater.c -c -o updater.o -DSIZEOF_new_firmware=$(shell stat -c %s usbasploader.raw) -DUPDATECRC32=$(UPDATECRC32) $(CFLAGS) +endif +endif # $(CC) updater.c -c -o updater.o $(CFLAGS) updater.elf: updater.o usbasploader.o $(DEPENDS)