summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2014-07-26 21:38:58 -0700
committerJohn Hawthorn <john.hawthorn@gmail.com>2014-07-26 21:38:58 -0700
commita5fb4fca671d7b04226cad3be72c94b19903cd14 (patch)
tree871bd605e0dd378a3ea8d957ee1952edb6b8a52d /Makefile
parenta159d98df3861cb2afb80f09d7777b590053ef63 (diff)
Add make install
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index aaca829..8eaeb2e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,9 @@
CFLAGS+=-Wall -Wextra -g -std=c99
+PREFIX?=/usr/local
+
+INSTALL=install
+INSTALL_PROGRAM=$(INSTALL)
+INSTALL_DATA=${INSTALL} -m 644
all: fzy fzytest
@@ -14,7 +19,10 @@ fzy: fzy.o match.o
%.o: %.c fzy.h
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+install: fzy
+ $(INSTALL_PROGRAM) fzy $(DESTDIR)$(PREFIX)/fzy
+
clean:
$(RM) fzy fzytest *.o
-.PHONY: test all clean
+.PHONY: test all clean install