1234567891011121314151617181920212223242526272829303132333435363738394041 |
- CC ?= gcc
- PREFIX ?= /usr/local
- VERSION = $(shell git describe --always)
- CFLAGS += -Wall -g -DNMRPFLASH_VERSION=\"$(VERSION)\"
- LIBS = -lpcap
- .PHONY: clean install release release/osx release/linux release/win32
- nmrpflash: nmrp.o tftp.o ethsock.o main.o
- $(CC) $(CFLAGS) -o nmrpflash nmrp.o tftp.o ethsock.o main.o $(LIBS)
- nmrp.o: nmrp.c nmrpd.h
- $(CC) $(CFLAGS) -c -o nmrp.o nmrp.c
- tftp.o: tftp.c nmrpd.h
- $(CC) $(CFLAGS) -c -o tftp.o tftp.c
- ethsock.o: ethsock.c nmrpd.h
- $(CC) $(CFLAGS) -c -o ethsock.o ethsock.c
- main.o: main.c nmrpd.h
- $(CC) $(CFLAGS) -c -o main.o main.c
- clean:
- rm -f nmrp.o tftp.o main.o ethsock.o nmrpflash nmrpflash.exe
- install: nmrpflash
- install -m 755 nmrpflash $(PREFIX)/bin
- release/osx:
- CFLAGS="-arch i686 -arch x86_64" make release
- zip nmrpflash-osx.zip nmrpflash
- release/linux: release
- zip nmrpflash-linux.zip nmrpflash
- release/win32:
- zip nmrpflash-win32.zip nmrpflash.exe
- release: clean nmrpflash
- strip nmrpflash
|