From: Joseph C. Lehner Date: Mon, 25 Jan 2016 13:53:06 +0000 (+0100) Subject: Add "install" target X-Git-Tag: v0.9~95 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=69995f7b416412cdc9b04fa13afdc2795c42e1ac;p=oweals%2Fnmrpflash.git Add "install" target --- diff --git a/Makefile b/Makefile index 0ad5c8b..4842452 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ CC ?= gcc +PREFIX ?= /usr/local CFLAGS = -Wall +.PHONY: clean install + nmrp-flash: nmrp.o tftp.o main.o $(CC) $(CFLAGS) -o nmrp-flash nmrp.o tftp.o main.o @@ -14,5 +17,8 @@ main.o: main.c nmrpd.h $(CC) $(CFLAGS) -c -o main.o main.c clean: - rm -f nmrp.o tftp.o main.o nmrpd + rm -f nmrp.o tftp.o main.o nmrp-flash + +install: nmrp-flash + install -m 755 nmrp-flash $(PREFIX)/bin