From 69995f7b416412cdc9b04fa13afdc2795c42e1ac Mon Sep 17 00:00:00 2001 From: "Joseph C. Lehner" Date: Mon, 25 Jan 2016 14:53:06 +0100 Subject: [PATCH] Add "install" target --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.25.1