From patchwork Thu Aug 11 18:32:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xose Vazquez Perez X-Patchwork-Id: 9275789 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E829C6022E for ; Thu, 11 Aug 2016 18:37:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA28D28768 for ; Thu, 11 Aug 2016 18:37:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEB6D28777; Thu, 11 Aug 2016 18:37:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E6C5C28768 for ; Thu, 11 Aug 2016 18:37:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u7BIXhg8027349; Thu, 11 Aug 2016 14:33:44 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u7BIXCMf020337 for ; Thu, 11 Aug 2016 14:33:12 -0400 Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7BIXC8d007248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 11 Aug 2016 14:33:12 -0400 Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2521437E63 for ; Thu, 11 Aug 2016 18:33:10 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id q128so799044wma.1 for ; Thu, 11 Aug 2016 11:33:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6/i8K1ofE+456qb8iHuNqvsaOD01Y5v6uJmWkqy23uo=; b=L+QjfAH1nSz1XZVpePQDSlwRiWzcoJyXcgRxdXFmgF8maGt4DiImFvGc6RZehOUDgy zVNnLzMjQmVRNH3vMd1Q1P7wAxCpN+Q8BFtEXj7dk6tUtAaBdoUb1QaGMy2iGBt9UpsF EwdUf8Oo98K/sJZ9c1eaxIgG6uqbZ8q6vEH8LKeWJlejLZaSctqTUH3+7oduzhooRugC lnA3wij656jNyhuaoinJInd2ftdbRKx31f+e0gbxp6mffG0gX8jLjpGxKcR1nPz6RJGn Vl3mOzub4qhaNJiv9l8z75ANXhkg/vDVdlLF2L6hvwKVM+8rnTwsyDjYdlGVQPRuuE7k U3TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6/i8K1ofE+456qb8iHuNqvsaOD01Y5v6uJmWkqy23uo=; b=OMlHMejc68L7yejoyOpiD+gpoSZ2siaACz2aiNP6sntL5jqIb/74R6KqFjpo2pNKWI McSdaURhG5iGbpsG57/GIa3Hi6Bx3KINg0M7a4C0bzJ7sYSbp3pw3uebdW7wPUYLFt5f a+vRts9MFtM824Ot25rWepouVNMppylJwe8w2KZnHw1wWibEzoRpAuuB9IV4xAmSFwUP wZrJlIf/9PptlC2JG8JbgQELl14swW4E8bVmutg1rI42gq+hrpgfZIpOn0ZW24PUI2cd 92CoKI3lKC4pS+9Dtf+dAD0OIPG1SDUHNjOdx8Q6UrQcFE0+NgoaVsjTPDCSgvUdHWqj JwsA== X-Gm-Message-State: AEkoouu38Acwfcu/uNskbvjqXFUQ4tzG+Ezjlzxf2qbSvDJXN/NBcXqmGwjoHM20hdLRAg== X-Received: by 10.195.2.42 with SMTP id bl10mr9383805wjd.21.1470940388635; Thu, 11 Aug 2016 11:33:08 -0700 (PDT) Received: from localhost ([31.221.137.200]) by smtp.gmail.com with ESMTPSA id qe2sm3884401wjc.28.2016.08.11.11.33.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Aug 2016 11:33:07 -0700 (PDT) From: Xose Vazquez Perez To: Date: Thu, 11 Aug 2016 20:32:19 +0200 Message-Id: <1470940345-4441-3-git-send-email-xose.vazquez@gmail.com> In-Reply-To: <1470940345-4441-1-git-send-email-xose.vazquez@gmail.com> References: <1470940345-4441-1-git-send-email-xose.vazquez@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 11 Aug 2016 18:33:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 11 Aug 2016 18:33:10 +0000 (UTC) for IP:'74.125.82.65' DOMAIN:'mail-wm0-f65.google.com' HELO:'mail-wm0-f65.google.com' FROM:'xose.vazquez@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.02 (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 74.125.82.65 mail-wm0-f65.google.com 74.125.82.65 mail-wm0-f65.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-loop: dm-devel@redhat.com Cc: device-mapper development , Xose Vazquez Perez Subject: [dm-devel] [PATCH 03/11] multipath-tools: Makefiles housekeeping X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP Apart of this relevant change in libmpathpersist/Makefile - $(CC) -Wall -fPIC -c $(CFLAGS) *.c + $(CC) -c $(CFLAGS) *.c Mainly indent and order code. Compiled tested, also installed and uninstalled. Cc: Christophe Varoqui Cc: device-mapper development Signed-off-by: Xose Vazquez Perez --- Makefile | 32 ++++++++++++------------- Makefile.inc | 48 +++++++++++++++++++------------------- kpartx/Makefile | 5 ++-- libmpathcmd/Makefile | 6 ++--- libmpathpersist/Makefile | 18 +++++--------- libmultipath/Makefile | 29 +++++++++++------------ libmultipath/checkers/Makefile | 5 ++-- libmultipath/prioritizers/Makefile | 5 ++-- mpathpersist/Makefile | 13 +++++------ multipath/Makefile | 8 +++---- multipathd/Makefile | 32 ++++++++----------------- 11 files changed, 89 insertions(+), 112 deletions(-) diff --git a/Makefile b/Makefile index cf1acd9..7786c83 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,3 @@ -# Makefile # # Copyright (C) 2003 Christophe Varoqui, # @@ -6,16 +5,17 @@ # # Try to supply the linux kernel headers. # -ifeq ($(KRNLSRC),) -KRNLLIB = /lib/modules/$(shell uname -r) -ifeq ($(shell test -r $(KRNLLIB)/source && echo 1),1) -KRNLSRC = $(KRNLLIB)/source -KRNLOBJ = $(KRNLLIB)/build -else -KRNLSRC = $(KRNLLIB)/build -KRNLOBJ = $(KRNLLIB)/build -endif +ifeq ($(KRNLSRC),) + KRNLLIB = /lib/modules/$(shell uname -r) + ifeq ($(shell test -r $(KRNLLIB)/source && echo 1),1) + KRNLSRC = $(KRNLLIB)/source + KRNLOBJ = $(KRNLLIB)/build + else + KRNLSRC = $(KRNLLIB)/build + KRNLOBJ = $(KRNLLIB)/build + endif endif + export KRNLSRC export KRNLOBJ @@ -30,10 +30,10 @@ BUILDDIRS = \ mpathpersist \ kpartx -ifeq ($(MULTIPATH_VERSION),) -VERSION = $(shell basename ${PWD} | cut -d'-' -f3) +ifeq ($(MULTIPATH_VERSION),) + VERSION = $(shell basename ${PWD} | cut -d'-' -f3) else -VERSION = $(MULTIPATH_VERSION) + VERSION = $(MULTIPATH_VERSION) endif all: recurse @@ -59,11 +59,11 @@ recurse_uninstall: $(MAKE) -C $$dir uninstall || exit $?; \ done -clean: recurse_clean +clean: recurse_clean -install: recurse_install +install: recurse_install -uninstall: recurse_uninstall +uninstall: recurse_uninstall .PHONY: TAGS TAGS: diff --git a/Makefile.inc b/Makefile.inc index 3e8635f..0808e64 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1,6 +1,6 @@ -# Makefile.inc # # Copyright (C) 2004 Christophe Varoqui, +# # # Allow to force some libraries to be used statically. (Uncomment one of the @@ -39,32 +39,32 @@ ifndef SYSTEMDPATH SYSTEMDPATH=usr/lib endif -prefix = -exec_prefix = $(prefix) -bindir = $(exec_prefix)/sbin -libudevdir = $(prefix)/$(SYSTEMDPATH)/udev -udevrulesdir = $(libudevdir)/rules.d -multipathdir = $(TOPDIR)/libmultipath -mandir = $(prefix)/usr/share/man/man8 -man5dir = $(prefix)/usr/share/man/man5 -man3dir = $(prefix)/usr/share/man/man3 -syslibdir = $(prefix)/$(LIB) -incdir = $(prefix)/usr/include -libdir = $(prefix)/$(LIB)/multipath -unitdir = $(prefix)/$(SYSTEMDPATH)/systemd/system -mpathpersistdir = $(TOPDIR)/libmpathpersist -mpathcmddir = $(TOPDIR)/libmpathcmd +prefix = +exec_prefix = $(prefix) +bindir = $(exec_prefix)/sbin +libudevdir = $(prefix)/$(SYSTEMDPATH)/udev +udevrulesdir = $(libudevdir)/rules.d +multipathdir = $(TOPDIR)/libmultipath +mandir = $(prefix)/usr/share/man/man8 +man5dir = $(prefix)/usr/share/man/man5 +man3dir = $(prefix)/usr/share/man/man3 +syslibdir = $(prefix)/$(LIB) +incdir = $(prefix)/usr/include +libdir = $(prefix)/$(LIB)/multipath +unitdir = $(prefix)/$(SYSTEMDPATH)/systemd/system +mpathpersistdir = $(TOPDIR)/libmpathpersist +mpathcmddir = $(TOPDIR)/libmpathcmd -GZIP = gzip -9 -c -RM = rm -f -LN = ln -sf -INSTALL_PROGRAM = install +GZIP = gzip -9 -c +RM = rm -f +LN = ln -sf +INSTALL_PROGRAM = install -OPTFLAGS = -Wunused -Wstrict-prototypes -O2 -g -pipe -Wformat-security -Wall \ - -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 +OPTFLAGS = -Wunused -Wstrict-prototypes -O2 -g -pipe -Wformat-security -Wall \ + -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" -SHARED_FLAGS = -shared +CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" +SHARED_FLAGS = -shared %.o: %.c $(CC) $(CFLAGS) -c -o $@ $< diff --git a/kpartx/Makefile b/kpartx/Makefile index 70f836e..75b7606 100644 --- a/kpartx/Makefile +++ b/kpartx/Makefile @@ -1,4 +1,3 @@ -# Makefile # # Copyright (C) 2003 Christophe Varoqui, # @@ -6,15 +5,17 @@ include ../Makefile.inc CFLAGS += -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +LDFLAGS = -ldevmapper + LIBDM_API_COOKIE = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_set_cookie' /usr/include/libdevmapper.h) ifneq ($(strip $(LIBDM_API_COOKIE)),0) CFLAGS += -DLIBDM_API_COOKIE endif -LDFLAGS = -ldevmapper OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \ gpt.o mac.o ps3.o crc32.o lopart.o xstrncpy.o devmapper.o + EXEC = kpartx all: $(EXEC) diff --git a/libmpathcmd/Makefile b/libmpathcmd/Makefile index 44c221d..457c4ca 100644 --- a/libmpathcmd/Makefile +++ b/libmpathcmd/Makefile @@ -1,8 +1,6 @@ -# Makefile -# include ../Makefile.inc -SONAME=0 +SONAME = 0 DEVLIB = libmpathcmd.so LIBS = $(DEVLIB).$(SONAME) @@ -27,4 +25,4 @@ uninstall: $(RM) $(DESTDIR)$(incdir)/mpath_cmd.h clean: - $(RM) core *.a *.o *.gz *.so *.so.* + $(RM) core *.a *.o *.so *.so.* *.gz diff --git a/libmpathpersist/Makefile b/libmpathpersist/Makefile index 07fcf70..1c4b2e1 100644 --- a/libmpathpersist/Makefile +++ b/libmpathpersist/Makefile @@ -1,23 +1,20 @@ -# Makefile -# include ../Makefile.inc -SONAME=0 +SONAME = 0 DEVLIB = libmpathpersist.so LIBS = $(DEVLIB).$(SONAME) - CFLAGS += -I$(multipathdir) -I$(mpathpersistdir) -I$(mpathcmddir) -LIBDEPS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath \ - -L$(mpathcmddir) -lmpathcmd + +LIBDEPS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath \ + -L$(mpathcmddir) -lmpathcmd OBJS = mpath_persist.o mpath_updatepr.o mpath_pr_ioctl.o all: $(LIBS) - $(LIBS): - $(CC) -Wall -fPIC -c $(CFLAGS) *.c + $(CC) -c $(CFLAGS) *.c $(CC) $(SHARED_FLAGS) $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS) $(LN) $(LIBS) $(DEVLIB) $(GZIP) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz @@ -42,7 +39,4 @@ uninstall: $(RM) $(DESTDIR)$(syslibdir)/$(DEVLIB) clean: - $(RM) core *.a *.o - $(RM) libmpathpersist.so.0 - $(RM) libmpathpersist.so - $(RM) mpath_persistent_reserve_in.3.gz mpath_persistent_reserve_out.3.gz + $(RM) core *.a *.o *.so *.so.* *.gz diff --git a/libmultipath/Makefile b/libmultipath/Makefile index e44397b..3a20f8e 100644 --- a/libmultipath/Makefile +++ b/libmultipath/Makefile @@ -1,15 +1,18 @@ -# Makefile # # Copyright (C) 2003 Christophe Varoqui, # include ../Makefile.inc -SONAME=0 +SONAME = 0 DEVLIB = libmultipath.so LIBS = $(DEVLIB).$(SONAME) + CFLAGS += -I$(mpathcmddir) + LIBDEPS = -lpthread -ldl -ldevmapper -ludev -L$(mpathcmddir) -lmpathcmd + ifdef SYSTEMD + CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD) ifeq ($(shell test $(SYSTEMD) -gt 209 && echo 1), 1) LIBDEPS += -lsystemd else @@ -17,14 +20,6 @@ ifdef SYSTEMD endif endif -OBJS = memory.o parser.o vector.o devmapper.o callout.o \ - hwtable.o blacklist.o util.o dmparser.o config.o \ - structs.o discovery.o propsel.o dict.o \ - pgpolicies.o debug.o defaults.o uevent.o \ - switchgroup.o uxsock.o print.o alias.o log_pthread.o \ - log.o configure.o structs_vec.o sysfs.o prio.o checkers.o \ - lock.o waiter.o file.o wwids.o prioritizers/alua_rtpg.o - LIBDM_API_FLUSH = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_no_flush' /usr/include/libdevmapper.h) ifneq ($(strip $(LIBDM_API_FLUSH)),0) @@ -43,16 +38,20 @@ ifneq ($(strip $(LIBUDEV_API_RECVBUF)),0) CFLAGS += -DLIBUDEV_API_RECVBUF endif -ifdef SYSTEMD - CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD) -endif - LIBDM_API_DEFERRED = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_deferred_remove' /usr/include/libdevmapper.h) ifneq ($(strip $(LIBDM_API_DEFERRED)),0) CFLAGS += -DLIBDM_API_DEFERRED endif +OBJS = memory.o parser.o vector.o devmapper.o callout.o \ + hwtable.o blacklist.o util.o dmparser.o config.o \ + structs.o discovery.o propsel.o dict.o \ + pgpolicies.o debug.o defaults.o uevent.o \ + switchgroup.o uxsock.o print.o alias.o log_pthread.o \ + log.o configure.o structs_vec.o sysfs.o prio.o checkers.o \ + lock.o waiter.o file.o wwids.o prioritizers/alua_rtpg.o + all: $(LIBS) $(LIBS): $(OBJS) @@ -70,4 +69,4 @@ uninstall: $(RM) $(DESTDIR)$(syslibdir)/$(DEVLIB) clean: - $(RM) core *.a *.o *.gz *.so *.so.* + $(RM) core *.a *.o *.so *.so.* *.gz diff --git a/libmultipath/checkers/Makefile b/libmultipath/checkers/Makefile index 5fd2099..e46192c 100644 --- a/libmultipath/checkers/Makefile +++ b/libmultipath/checkers/Makefile @@ -1,9 +1,10 @@ -# Makefile # # Copyright (C) 2003 Christophe Varoqui, # include ../../Makefile.inc +CFLAGS += -I.. + LIBS= \ libcheckcciss_tur.so \ libcheckreadsector0.so \ @@ -14,8 +15,6 @@ LIBS= \ libcheckrdac.so \ libcheckrbd.so -CFLAGS += -I.. - all: $(LIBS) libcheckrbd.so: rbd.o diff --git a/libmultipath/prioritizers/Makefile b/libmultipath/prioritizers/Makefile index bb76700..eff5fc1 100644 --- a/libmultipath/prioritizers/Makefile +++ b/libmultipath/prioritizers/Makefile @@ -1,9 +1,10 @@ -# Makefile # # Copyright (C) 2007 Christophe Varoqui, # include ../../Makefile.inc +CFLAGS += -I.. + LIBS = \ libprioalua.so \ libprioconst.so \ @@ -18,8 +19,6 @@ LIBS = \ libprioweightedpath.so \ libpriosysfs.so -CFLAGS += -I.. - all: $(LIBS) libprioalua.so: alua.o alua_rtpg.o diff --git a/mpathpersist/Makefile b/mpathpersist/Makefile index a458c4d..d545514 100644 --- a/mpathpersist/Makefile +++ b/mpathpersist/Makefile @@ -1,14 +1,14 @@ -# Makefile -# include ../Makefile.inc -OBJS = main.o - CFLAGS += -I$(multipathdir) -I$(mpathpersistdir) -LDFLAGS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist -L$(multipathdir) -L$(mpathcmddir) -lmpathcmd -lmultipath -ludev + +LDFLAGS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist \ + -L$(multipathdir) -L$(mpathcmddir) -lmpathcmd -lmultipath -ludev EXEC = mpathpersist +OBJS = main.o + all: $(EXEC) $(EXEC): $(OBJS) @@ -22,8 +22,7 @@ install: $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) clean: - $(RM) *.o $(EXEC) - $(RM) mpathpersist.8.gz + $(RM) core *.o $(EXEC) *.gz uninstall: $(RM) $(DESTDIR)$(bindir)/$(EXEC) diff --git a/multipath/Makefile b/multipath/Makefile index 9c57d3b..b125ae3 100644 --- a/multipath/Makefile +++ b/multipath/Makefile @@ -1,17 +1,17 @@ -# Makefile # # Copyright (C) 2003 Christophe Varoqui, # include ../Makefile.inc -OBJS = main.o - CFLAGS += -I$(multipathdir) -I$(mpathcmddir) + LDFLAGS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev \ - -L$(mpathcmddir) -lmpathcmd + -L$(mpathcmddir) -lmpathcmd EXEC = multipath +OBJS = main.o + all: $(EXEC) $(EXEC): $(OBJS) diff --git a/multipathd/Makefile b/multipathd/Makefile index 092b74b..03d7815 100644 --- a/multipathd/Makefile +++ b/multipathd/Makefile @@ -1,42 +1,30 @@ -EXEC = multipathd - include ../Makefile.inc # -# basic flags setting +# debuging stuff # +#CFLAGS += -DLCKDBG +#CFLAGS += -D_DEBUG_ +#CFLAGS += -DLOGDBG CFLAGS += -I$(multipathdir) -I$(mpathpersistdir) -I$(mpathcmddir) + +LDFLAGS += -ludev -ldl -L$(multipathdir) -lmultipath -L$(mpathpersistdir) \ + -lmpathpersist -L$(mpathcmddir) -lmpathcmd -lurcu -lpthread \ + -ldevmapper -lreadline + ifdef SYSTEMD CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD) -endif -LDFLAGS += -lurcu -lpthread -ldevmapper -lreadline -ifdef SYSTEMD ifeq ($(shell test $(SYSTEMD) -gt 209 && echo 1), 1) LDFLAGS += -lsystemd else LDFLAGS += -lsystemd-daemon endif endif -LDFLAGS += -ludev -ldl \ - -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist \ - -L$(mpathcmddir) -lmpathcmd - -# -# debuging stuff -# -#CFLAGS += -DLCKDBG -#CFLAGS += -D_DEBUG_ -#CFLAGS += -DLOGDBG -# -# object files -# OBJS = main.o pidfile.o uxlsnr.o uxclnt.o cli.o cli_handlers.o +EXEC = multipathd -# -# directives -# all : $(EXEC) $(EXEC): $(OBJS)