[dm-devel] [PATCH] multipath-tools: clean up libdmmp/Makefile

Christophe Varoqui christophe.varoqui at opensvc.com
Thu Mar 16 06:44:54 UTC 2017


Applied,
Thanks.

On Mon, Mar 13, 2017 at 5:47 PM, Xose Vazquez Perez <xose.vazquez at gmail.com>
wrote:

> Replace LDFLAGS with LIBDEPS, build libdmmp shared library without CFLAGS
>
> Cc: Gris Ge <fge at redhat.com>
> Cc: Christophe Varoqui <christophe.varoqui at opensvc.com>
> Cc: device-mapper development <dm-devel at redhat.com>
> Signed-off-by: Xose Vazquez Perez <xose.vazquez at gmail.com>
> ---
>  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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20170316/aed1408d/attachment.htm>


More information about the dm-devel mailing list