Applied,
Thanks.
On Mon, Mar 13, 2017 at 5:47 PM, Xose Vazquez Perez <xose.vazquez@xxxxxxxxx> wrote:
Replace LDFLAGS with LIBDEPS, build libdmmp shared library without CFLAGS
Cc: Gris Ge <fge@xxxxxxxxxx>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com >
Cc: device-mapper development <dm-devel@xxxxxxxxxx>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@xxxxxxxxx>
---
libdmmp/Makefile | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libdmmp/Makefile b/libdmmp/Makefile
index c98ae67..aaff285 100644
--- a/libdmmp/Makefile
+++ b/libdmmp/Makefile
@@ -9,21 +9,22 @@ LIBDMMP_VERSION=0.1.0
SONAME=$(LIBDMMP_VERSION)
DEVLIB = libdmmp.so
LIBS = $(DEVLIB).$(SONAME)
-LIBDEPS = -pthread
PKGFILE = libdmmp.pc
EXTRA_MAN_FILES = libdmmp.h.3
HEADERS = libdmmp/libdmmp.h
+
OBJS = libdmmp.o libdmmp_mp.o libdmmp_pg.o libdmmp_path.o libdmmp_misc.o
CFLAGS += -fvisibility=hidden -I$(libdmmpdir) -I$(mpathcmddir) \
$(shell pkg-config --cflags json-c)
-LDFLAGS += $(shell pkg-config --libs json-c) -L$(mpathcmddir) -lmpathcmd
+
+LIBDEPS += $(shell pkg-config --libs json-c) -L$(mpathcmddir) -lmpathcmd -pthread
all: $(LIBS) doc
-$(LIBS): $(OBJS)
- $(CC) $(LDFLAGS) $(SHARED_FLAGS) \
- -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS) $(LIBDEPS)
+$(LIBS):
+ $(CC) -c $(CFLAGS) *.c
+ $(CC) $(LDFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ -o $@ $(OBJS) $(LIBDEPS)
$(LN) $@ $(DEVLIB)
install:
--
2.12.0
-- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel