summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-23 16:00:35 -0400
committermidipix <writeonce@midipix.org>2016-04-23 17:00:21 -0400
commitdaae2d3a4014d5d18c1939bae1e9349ff15f72ae (patch)
treecfa9fc5cbde73230368ebbf8cbaac1b22f268cbf
parent028ddb42d67a96dbebb4eeb4adf3d3cac7f757ff (diff)
downloadslibtool-daae2d3a4014d5d18c1939bae1e9349ff15f72ae.tar.bz2
slibtool-daae2d3a4014d5d18c1939bae1e9349ff15f72ae.tar.xz
project: support static-only and shared-only installed utility via symlinks.
-rw-r--r--project/extras.mk14
1 files changed, 14 insertions, 0 deletions
diff --git a/project/extras.mk b/project/extras.mk
index caf26a3..f65c526 100644
--- a/project/extras.mk
+++ b/project/extras.mk
@@ -6,3 +6,17 @@ CFLAGS_MACHINE := -DSLBT_MACHINE=\"$(shell $(CC) $(CFLAGS) -dumpmachine)\"
src/driver/slbt_driver_ctx.o: CFLAGS += $(CFLAGS_MACHINE)
src/driver/slbt_driver_ctx.lo: CFLAGS += $(CFLAGS_MACHINE)
+
+install-app-extras: app
+
+install-app-extras:
+ mkdir -p $(DESTDIR)$(BINDIR)
+
+ rm -f bin/$(PACKAGE)-shared$(OS_APP_SUFFIX).tmp
+ rm -f bin/$(PACKAGE)-static$(OS_APP_SUFFIX).tmp
+
+ ln -s ./$(PACKAGE)$(OS_APP_SUFFIX) bin/$(PACKAGE)-shared$(OS_APP_SUFFIX).tmp
+ ln -s ./$(PACKAGE)$(OS_APP_SUFFIX) bin/$(PACKAGE)-static$(OS_APP_SUFFIX).tmp
+
+ mv bin/$(PACKAGE)-shared$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(PACKAGE)-shared$(OS_APP_SUFFIX)
+ mv bin/$(PACKAGE)-static$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(PACKAGE)-static$(OS_APP_SUFFIX)