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)