summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2016-09-05 21:17:31 +0200
committerjaseg <code@jaseg.net>2016-09-05 21:22:39 +0200
commit74b9fedbf1c28481d3d54ef90e6b9733e49242d4 (patch)
tree2a181bf3da31ec5ea8ce3a762bd905d81a3b3dbb
parent88c27c9df81fc88978991a27a454a4035c457ed0 (diff)
downloadlolcat-74b9fedbf1c28481d3d54ef90e6b9733e49242d4.tar.gz
lolcat-74b9fedbf1c28481d3d54ef90e6b9733e49242d4.tar.bz2
lolcat-74b9fedbf1c28481d3d54ef90e6b9733e49242d4.zip
Make install dir customizable
-rw-r--r--Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 8cb68ba..7af28d3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,9 @@
-LOLCAT_SRC = lolcat.c
-CENSOR_SRC = censor.c
-CFLAGS = -std=c11 -Wall
+LOLCAT_SRC := lolcat.c
+CENSOR_SRC := censor.c
+CFLAGS := -std=c11 -Wall
+
+DESTDIR := /usr/local/bin
ifeq ($(shell uname -s),Darwin)
LOLCAT_SRC += memorymapping/src/fmemopen.c
@@ -36,8 +38,8 @@ censor: $(CENSOR_SRC)
gcc $(CFLAGS) -o $@ $^
install: lolcat censor
- install lolcat /usr/local/bin
- install censor /usr/local/bin
+ install lolcat $(DESTDIR)/
+ install censor $(DESTDIR)/
clean:
rm -f lolcat lolcat-static.o lolcat-static censor censor-static.o censor-static