summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3c83800..da4a3c1 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,9 @@ CC := gcc
OPT ?= -O2
+DESTDIR = /
+PREFIX = /usr
+
DEPLOY=tbdiff-deploy
CREATE=tbdiff-create
@@ -34,12 +37,13 @@ ifeq (,$(findstring clean,$(MAKECMDGOALS)))
endif
install: $(DEPLOY) $(CREATE)
- install $(CREATE) /usr/local/bin
- install $(DEPLOY) /usr/local/bin
+ install -m 755 -d $(DESTDIR)$(PREFIX)/bin
+ install $(CREATE) $(DESTDIR)$(PREFIX)/bin
+ install $(DEPLOY) $(DESTDIR)$(PREFIX)/bin
uninstall:
- rm -rf /usr/local/bin/$(DEPLOY)
- rm -rf /usr/local/bin/$(CREATE)
+ rm -rf $(DESTDIR)/$(DEPLOY)
+ rm -rf $(DESTDIR)/$(CREATE)
test:
cd tests && ./run_tests.sh && fakeroot -- ./cross_plat.sh && cd ..