summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-02-15 23:21:19 +0100
committerLouis Burda <quent.burda@gmail.com>2023-02-15 23:21:19 +0100
commit2e7caa3edbc35e7660d44e863588fa4c1c4870a7 (patch)
tree3f5dfed57b62aef8bf684b5d026a360fcbd7cebe
parentfda2cdb74759d14a9c9c0644fb6e5bd2505e2639 (diff)
downloadfindhex-2e7caa3edbc35e7660d44e863588fa4c1c4870a7.tar.gz
findhex-2e7caa3edbc35e7660d44e863588fa4c1c4870a7.zip
Add install and uninstall targets
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1ce34a1..e9db10c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
+PREFIX ?= /usr/local
+BINDIR ?= /bin
+
CFLAGS = -Wunused-variable -Wunused-function
all: findhex
@@ -7,4 +10,10 @@ clean:
findhex: findhex.c
-.PHONY: all clean
+install:
+ install -m755 findhex -t "$(DESTDIR)$(PREFIX)$(BINDIR)"
+
+uninstall:
+ rm -f "$(DESTDIR)$(PREFIX)$(BINDIR)/findhex"
+
+.PHONY: all clean install uninstall