summaryrefslogtreecommitdiff
path: root/src/lib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Makefile')
-rw-r--r--src/lib/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/Makefile b/src/lib/Makefile
index 0c69ba3..e1068c1 100644
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -1,2 +1,10 @@
-libre_datadir=$(datadir)/libretools
+libre_execdir=$(bindir)
+libre_datadir=$(libexecdir)/libretools
include ../../common.mk
+
+rootdir=$(shell sed -r 's|^/||;s|[^/]+|..|g'<<<$(bindir))
+
+$(DESTDIR)$(libre_execdir)/%: %
+ install -Dm755 '$<' '$(DESTDIR)$(libre_datadir)/$(@F)'
+ install -d '$(@D)'
+ ln -sf '$(rootdir)$(libre_datadir)/$(@F)' "$@"