3 VERSION = $(shell git describe --always | tail -c +2)
5 CFLAGS += -Wall -g -DNMRPFLASH_VERSION=\"$(VERSION)\"
8 nmrpflash_OBJ = nmrp.o tftp.o ethsock.o main.o util.o
10 .PHONY: clean install release release/osx release/linux release/win32
12 nmrpflash: $(nmrpflash_OBJ)
13 $(CC) $(CFLAGS) -o nmrpflash $(nmrpflash_OBJ) $(LDFLAGS)
16 $(CC) -c $(CFLAGS) $< -o $@
19 CC=afl-gcc CFLAGS=-DNMRPFLASH_FUZZ make nmrpflash
23 rm -f nmrp.o tftp.o main.o ethsock.o nmrpflash
26 install -m 755 nmrpflash $(PREFIX)/bin
29 CFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.6" make release
30 zip nmrpflash-$(VERSION)-osx.zip nmrpflash
32 release/linux: release
33 zip nmrpflash-$(VERSION)-linux.zip nmrpflash
36 zip nmrpflash-$(VERSION)-win32.zip nmrpflash.exe
38 release: clean nmrpflash