summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2009-05-29 02:28:49 +0200
committerGuillem Jover <guillem@hadrons.org>2009-05-29 02:28:49 +0200
commit5902730a03a2df02a0ad71c62ce83046fc6c2bb8 (patch)
treee4cb6c68483a4270b4c99913effdbd5b32ded9b4
parent42601170ace98fe62c1f63a4d1b820a0bacf3e1a (diff)
downloadlibbsd-5902730a03a2df02a0ad71c62ce83046fc6c2bb8.tar.gz
Create a relative symlink for .so if libdir and usrlibdir are the same
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 53ab4f3..fbe23c1 100644
--- a/Makefile
+++ b/Makefile
@@ -157,7 +157,13 @@ install: libs man
done
install -m644 $(LIB_MANS) $(DESTDIR)/$(mandir)/man3
install -m644 $(LIB_PKGCONFIG) $(DESTDIR)/$(pkgconfigdir)
+ifeq ($(libdir),$(usrlibdir))
+ # If both dirs are the same, do a relative symlink.
+ ln -sf $(LIB_SHARED) $(DESTDIR)/$(usrlibdir)/$(LIB_SHARED_SO)
+else
+ # Otherwise, do an absolute one.
ln -sf $(libdir)/$(LIB_SHARED) $(DESTDIR)/$(usrlibdir)/$(LIB_SHARED_SO)
+endif
ln -sf $(LIB_SHARED) $(DESTDIR)/$(libdir)/$(LIB_SONAME)
.PHONY: clean