From b6462749f675b3076c1547939ae8411f4dbd6297 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Feb 1999 04:36:42 +0000 Subject: 1999-02-16 Roland McGrath * 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. --- Makeconf | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Makeconf') 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 -- cgit v1.2.3