From 83a24ddc444a90bca9697c0c2f057c84dc24e1b4 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 27 Jul 2015 22:40:45 +0200 Subject: Define and use DESTDIR for installation (by Larry Doolittle) --- iceprog/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'iceprog') diff --git a/iceprog/Makefile b/iceprog/Makefile index b0d735a..86c69f4 100644 --- a/iceprog/Makefile +++ b/iceprog/Makefile @@ -1,16 +1,17 @@ # CC = clang LDLIBS = -lftdi -lm CFLAGS = -MD -O0 -ggdb -Wall -std=c99 +DESTDIR = /usr/local all: iceprog iceprog: iceprog.o install: all - cp iceprog /usr/local/bin/iceprog + cp iceprog $(DESTDIR)/bin/iceprog uninstall: - rm -f /usr/local/bin/iceprog + rm -f $(DESTDIR)/bin/iceprog clean: rm -f iceprog -- cgit v1.2.3