From 4a79cf302096979290d67822c364e5407bf2d48e Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 29 Jun 1995 19:33:46 +0000 Subject: (all) [makemode == library]: Add $(libname).so. (install) [makemode == library]: Install $(libname.so) too. ($(libname).so) [makemode == library]: New rule to build shared library. (%_pic.o): New rule to build pic object files. --- Makeconf | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Makeconf') diff --git a/Makeconf b/Makeconf index 20f47994..d0af049c 100644 --- a/Makeconf +++ b/Makeconf @@ -119,13 +119,14 @@ install: $(targets) endif ifeq ($(makemode),library) -all: $(libname).a -install: $(libname).a $(installhdrs) +all: $(libname).a $(libname).so +install: $(libname).a $(installhdrs) $(libname).so ifdef installhdrs $(INSTALL_DATA) $(installhdrs) $(includedir)/hurd/ endif $(INSTALL_DATA) $(libname).a $(libdir)/$(libname).a $(RANLIB) $(libdir)/$(libname).a + $(INSTALL_DATA) $(libname).so $(libdir)/$(libname).so endif # Provide default. @@ -157,6 +158,9 @@ $(libname).a: $(OBJS) rm -f $(libname).a $(AR) r $@ $^ $(RANLIB) $@ + +$(libname).so: $(patsubst %.o,%_pic.o,$(OBJS)) + $(CC) -shared $(CFLAGS) -o $(libname).so $+ endif # Making a snapshot @@ -199,6 +203,11 @@ relink: $(HURDLIBS-files): FORCE $(MAKE) -C $(dir $@) $(notdir $@) + +# Default rule to build PIC object files. +%_pic.o: %.c + $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC $< -o $@ + # How to build RPC stubs -- cgit v1.2.3