From f0c9fe010597acb63fe6d587b425470c4078f5e6 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 2 Feb 2006 19:16:47 +0000 Subject: [PATCH] Add %.so: %.a make template rule. --- WHATS_NEW | 1 + make.tmpl.in | 6 ++++-- tools/Makefile.in | 2 -- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 12a2667d1..efa0957d6 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.02 - ==================================== + Add %.so: %.a make template rule. Switchover library building to use LIB_SUFFIX. Only do lockfs filesystem sync when suspending snapshots. Always print warning if activation is disabled. diff --git a/make.tmpl.in b/make.tmpl.in index 421d13007..5a49f0742 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -27,8 +27,6 @@ LIBS = @LIBS@ CFLAGS += @DEFS@ CFLAGS += @CFLAGS@ CLDFLAGS += @CLDFLAGS@ -CLDWHOLEARCHIVE += @CLDWHOLEARCHIVE@ -CLDNOWHOLEARCHIVE += @CLDNOWHOLEARCHIVE@ LDDEPS += @LDDEPS@ LDFLAGS += @LDFLAGS@ LIB_SUFFIX = @LIB_SUFFIX@ @@ -163,6 +161,10 @@ $(LIB_SHARED): $(OBJECTS) $(LDDEPS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@ endif +%.so: %.a + $(CC) -shared -Wl,-soname,$(notdir $@).$(LIB_VERSION) \ + $(CLDFLAGS) $(LIBS) -o $@ @CLDWHOLEARCHIVE@ $< @CLDNOWHOLEARCHIVE@ + $(LIB_STATIC): $(OBJECTS) $(RM) $@ $(AR) rs $@ $(OBJECTS) diff --git a/tools/Makefile.in b/tools/Makefile.in index 0041c8a5c..f5023aee4 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -111,8 +111,6 @@ liblvm2cmd.a: $(top_srcdir)/lib/liblvm.a $(OBJECTS) $(AR) rs $@ $(OBJECTS) liblvm2cmd.so: liblvm2cmd.a $(LDDEPS) - $(CC) -o liblvm2cmd.so $(SOFLAG) $(CLDFLAGS) \ - $(CLDWHOLEARCHIVE) liblvm2cmd.a $(CLDNOWHOLEARCHIVE) .commands: commands.h cmdnames.h Makefile $(CC) -E -P cmdnames.h 2> /dev/null | \