From 77986fa71a65194a97f5311c2c5b5c54a23d5acc Mon Sep 17 00:00:00 2001 From: Dave Wysochanski Date: Sun, 8 Mar 2009 17:06:55 +0000 Subject: [PATCH] Add DSO generation for new LVM application library. Fix test/api/test build. --- liblvm/Makefile.in | 15 +++++++++++++-- test/api/Makefile.in | 7 ++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/liblvm/Makefile.in b/liblvm/Makefile.in index 6f90f6a5b..548de5997 100644 --- a/liblvm/Makefile.in +++ b/liblvm/Makefile.in @@ -19,14 +19,25 @@ VPATH = @srcdir@ SOURCES =\ lvm_base.c -LIB_STATIC = liblvm.a +LIB_NAME = liblvm +LIB_VERSION = $(LIB_VERSION_LVM) -$(SUBDIRS): $(LIB_STATIC) +LIB_STATIC = $(LIB_NAME).a +LIB_SHARED = $(LIB_NAME).so CLEAN_TARGETS += liblvm.cflow include $(top_srcdir)/make.tmpl +CLDFLAGS += -z now +LIBS += -ldevmapper -llvm-internal + +$(VERSIONED_SHLIB): %.$(LIB_SUFFIX).$(LIB_VERSION): $(interface)/%.$(LIB_SUFFIX) + rm -f $@ + $(LN_S) $< $@ + rm -f $(LIB_NAME).$(LIB_SUFFIX) + $(LN_S) $< $(LIB_NAME).$(LIB_SUFFIX) + liblvm.cflow: $(SOURCES) set -e; (echo -n "SOURCES += "; \ echo $(SOURCES) | \ diff --git a/test/api/Makefile.in b/test/api/Makefile.in index 4032a7808..6ac967f36 100644 --- a/test/api/Makefile.in +++ b/test/api/Makefile.in @@ -30,10 +30,11 @@ LVMLIBS = -llvm -ldevmapper DEFS += -D_REENTRANT CFLAGS += -fno-strict-aliasing -LDFLAGS += -L$(top_srcdir)/api/lib - include $(top_srcdir)/make.tmpl -test: $(OBJECTS) $(top_srcdir)/lib/liblvm.a $(top_srcdir)/libdm/libdevmapper.so +LDFLAGS = -L$(top_srcdir)/libdm -L$(top_srcdir)/liblvm +CLDFLAGS = -L$(top_srcdir)/libdm -L$(top_srcdir)/liblvm + +test: $(OBJECTS) $(top_srcdir)/liblvm/liblvm.a $(top_srcdir)/libdm/libdevmapper.so $(CC) -o test $(OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS) -- 2.43.5