Allow installing tools to a prefix.

(Defaults to /usr/local.)
This commit is contained in:
Tim 'mithro' Ansell 2015-09-08 08:15:15 -07:00 committed by Sebastien Bourdeauducq
parent 40f47f447a
commit 12f5858850
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
TARGETS=flterm byteswap
CC=gcc
RM ?= rm -f
PREFIX ?= /usr/local
all: $(TARGETS)
@ -8,8 +9,8 @@ all: $(TARGETS)
$(CC) -O2 -Wall -I../common -s -o $@ $<
install: flterm
install -d /usr/local/bin
install -m755 -t /usr/local/bin $^
install -d $(PREFIX)/bin
install -m755 -t $(PREFIX)/bin $^
.PHONY: all clean install