summaryrefslogtreecommitdiff
path: root/Makeconf
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-02-17 04:36:42 +0000
committerRoland McGrath <roland@gnu.org>1999-02-17 04:36:42 +0000
commitb6462749f675b3076c1547939ae8411f4dbd6297 (patch)
treec16c275ca82737e78cead97b1f37e4a4ac75152a /Makeconf
parentb45d110ee8d5a48a60d717e385602dd0a85d383d (diff)
1999-02-16 Roland McGrath <roland@baalperazim.frob.com>
* Makeconf ($(libname).so): Make it a symlink to $(libname).so.$(hurd-version). ($(libname).so.$(hurd-version)): New target, renamed from $(libname).so; link the actual shared object with this name.
Diffstat (limited to 'Makeconf')
-rw-r--r--Makeconf11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makeconf b/Makeconf
index b6932932..4818164a 100644
--- a/Makeconf
+++ b/Makeconf
@@ -281,9 +281,16 @@ $(libname)_p.a: $(patsubst %.o,%_p.o,$(OBJS))
$(AR) r $@ $^
$(RANLIB) $@
-$(libname).so: $(patsubst %.o,%_pic.o,$(OBJS)) $(library_deps)
- $(CC) -shared -Wl,-soname=$(libname).so.$(hurd-version) -o $(libname).so \
+# The shared object needs to be findable in the build directory as
+# libfoo.so.VERSION (i.e. its soname) so that ld finds it when looking
+# for dependencies of other shared libraries.
+# But we also need the libfoo.so name that -lfoo looks for, so
+# we make that a symlink.
+$(libname).so.$(hurd-version): $(patsubst %.o,%_pic.o,$(OBJS)) $(library_deps)
+ $(CC) -shared -Wl,-soname=$@ -o $@ \
$(rpath) $(CFLAGS) $(LDFLAGS) $($@-LDFLAGS) $^
+$(libname).so: $(libname).so.$(hurd-version)
+ ln -f -s $< $@
endif
# Providing directory dependencies