Skip to contentSkip to conversation

multipath-tools: add library dependencies

PATCH New Guido Günther 1 participant 1 message Nov 21, 2009 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipath-tools: add library dependencies

Hi,
attached patch adds dependent libraries when building the shared lib. This allows other tools like dpkg-shlibdeps to deduce the needed dependencies automatically.
Cheers,
-- Guido

From: =?UTF-8?q?Guido=20G=C3=BCnther?= <[email protected]>
Date: Sun, 30 Aug 2009 14:18:21 +0200
Subject: [PATCH] add library dependencies

---
 libmultipath/Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
libmultipath/Makefile +2 -1
index 3f2a48d..ec1ab9f 100644
@@ -7,6 +7,7 @@ include ../Makefile.inc
 SONAME=0d
 DEVLIB = libmultipath.so
 LIBS = $(DEVLIB).$(SONAME)
+LIBDEPS = -lpthread -ldl -ldevmapper
 
 OBJS = memory.o parser.o vector.o devmapper.o callout.o \
        hwtable.o blacklist.o util.o dmparser.o config.o \
@@ -25,7 +26,7 @@ endif
 all: $(LIBS)
 
 $(LIBS): $(OBJS)
-	$(CC) $(SHARED_FLAGS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS)
+	$(CC) $(SHARED_FLAGS) $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS)
 	ln -sf $@ $(DEVLIB)
 
 install: