diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-06-29 19:33:46 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-06-29 19:33:46 +0000 |
commit | 4a79cf302096979290d67822c364e5407bf2d48e (patch) | |
tree | 19d33de04282ee7339d3ff3c0e457c6803d13e2e /Makeconf | |
parent | 8c6ec49dac3d034e8518de7ef1d0959246fd37f8 (diff) |
(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.
Diffstat (limited to 'Makeconf')
-rw-r--r-- | Makeconf | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 @@ -200,6 +204,11 @@ $(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 # User settable variables: |