summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-02 23:41:46 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-09-03 22:18:28 (GMT)
commit7d060257e316eb6a2a43345fbc0e2b8759221a1f (patch)
tree8cbe8c87acf7f0076491d6d899475f850803447b /Makefile
parent6e331742d205da8beecf704f863c874fbacc330e (diff)
downloadeeshow-7d060257e316eb6a2a43345fbc0e2b8759221a1f.zip
eeshow-7d060257e316eb6a2a43345fbc0e2b8759221a1f.tar.gz
eeshow-7d060257e316eb6a2a43345fbc0e2b8759221a1f.tar.bz2
Makefile (install, uninstall): simplify managing the many executables we have now
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b767af6..4cd91b6 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,8 @@
SHELL = /bin/bash
+PREFIX ?= /usr/local
+
NAME = eeshow
OBJS_KICAD = \
@@ -81,7 +83,7 @@ endif
include Makefile.c-common
.PHONY: test neo900 sch test testref png pngref pdf diff view newref
-.PHONY: leak
+.PHONY: leak install uninstall
all:: eeshow eeplot eediff eetest
@@ -200,6 +202,16 @@ leak: eediff
# ./eeplot -N 1 $(NEO900_HW)/neo900.pro -- pdf >/dev/null
# ./eeplot -N 1 $(NEO900_HW)/neo900.pro -- png >/dev/null
+#----- Install / uninstall ---------------------------------------------------
+
+install: eeshow eeplot eediff
+ mkdir -p $(DESTDIR)/$(PREFIX)/bin/
+ install -m 755 $^ $(DESTDIR)/$(PREFIX)/bin/
+
+uninstall:
+ for n in eeshow eeplot eediff; do \
+ rm -f $(DESTDIR)/$(PREFIX)/bin/$$n; done
+
#----- Cleanup ----------------------------------------------------------------
spotless::