public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - build: cleanup libfenced linking
@ 2009-08-26  7:25 Fabio M. Di Nitto
  0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-08-26  7:25 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=cf2470d0578ba87f88d815ffb2259bbfd91978c5
Commit:        cf2470d0578ba87f88d815ffb2259bbfd91978c5
Parent:        d3764cf043a0e260f545fd202cd9bb29fb3425bb
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Wed Aug 26 09:24:21 2009 +0200
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Wed Aug 26 09:24:21 2009 +0200

build: cleanup libfenced linking

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 configure                   |   14 ++++++++++++++
 fence/fence_node/Makefile   |   12 +++++-------
 fence/fence_tool/Makefile   |   10 ++++------
 fence/fenced/Makefile       |    9 +++++----
 group/dlm_controld/Makefile |    9 ++++-----
 group/gfs_controld/Makefile |    7 +++----
 group/tool/Makefile         |    5 ++---
 make/defines.mk.input       |    2 ++
 8 files changed, 39 insertions(+), 29 deletions(-)

diff --git a/configure b/configure
index 1a60cab..aac1070 100755
--- a/configure
+++ b/configure
@@ -45,6 +45,8 @@ my %options = (
 	dlmcontrollibdir => \$dlmcontrollibdir,
 	fenceincdir => \$fenceincdir,
 	fencelibdir => \$fencelibdir,
+	fencedincdir => \$fencedincdir,
+	fencedlibdir => \$fencedlibdir,
 	logtincdir => \$logtincdir,
 	logtlibdir => \$logtlibdir,
 	ncursesincdir => \$ncursesincdir,
@@ -131,6 +133,8 @@ my $err = &GetOptions (\%options,
 		    'dlmcontrollibdir=s',
 		    'fenceincdir=s',
 		    'fencelibdir=s',
+		    'fencedincdir=s',
+		    'fencedlibdir=s',
 		    'logtincdir=s',
 		    'logtlibdir=s',
 		    'ncursesincdir=s',
@@ -240,6 +244,8 @@ if ($help || !$err) {
   print "--dlmcontrollibdir=\tthe base directory for dlmcontrol libraries.  (Default: ./dlm/libdlmcontrol)\n";
   print "--fenceincdir=\tthe base directory for fence include files.  (Default: ./fence/libfence)\n";
   print "--fencelibdir=\tthe base directory for fence libraries.  (Default: ./fence/libfence)\n";
+  print "--fencedincdir=\tthe base directory for fence include files.  (Default: ./fence/libfenced)\n";
+  print "--fencedlibdir=\tthe base directory for fence libraries.  (Default: ./fence/libfenced)\n";
   print "--logtincdir=\tthe base directory for logthread include files.  (Default: ./common/liblogthread)\n";
   print "--logtlibdir=\tthe base directory for logthread libraries.  (Default: ./common/liblogthread)\n";
   print "--ncursesincdir=\tthe base directory for ncurses include files.  (Default: {incdir})\n";
@@ -472,6 +478,12 @@ if (!$fenceincdir) {
 if (!$fencelibdir) {
   $fencelibdir="${objdir}/fence/libfence";
 }
+if (!$fencedincdir) {
+  $fencedincdir="${cdir}/fence/libfenced";
+}
+if (!$fencedlibdir) {
+  $fencedlibdir="${objdir}/fence/libfenced";
+}
 if (!$logtincdir) {
   $logtincdir="${cdir}/common/liblogthread";
 }
@@ -719,6 +731,8 @@ while (<IFILE>) {
   $_ =~ s/\@DLMCONTROLLIBDIR\@/$dlmcontrollibdir/;
   $_ =~ s/\@FENCEINCDIR\@/$fenceincdir/;
   $_ =~ s/\@FENCELIBDIR\@/$fencelibdir/;
+  $_ =~ s/\@FENCEDINCDIR\@/$fencedincdir/;
+  $_ =~ s/\@FENCEDLIBDIR\@/$fencedlibdir/;
   $_ =~ s/\@LOGTINCDIR\@/$logtincdir/;
   $_ =~ s/\@LOGTLIBDIR\@/$logtlibdir/;
   $_ =~ s/\@NCURSESINCDIR\@/$ncursesincdir/;
diff --git a/fence/fence_node/Makefile b/fence/fence_node/Makefile
index 9f97089..9b79449 100644
--- a/fence/fence_node/Makefile
+++ b/fence/fence_node/Makefile
@@ -14,18 +14,16 @@ OBJS=	fence_node.o
 
 CFLAGS += -D_FILE_OFFSET_BITS=64
 
-CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${fenceincdir} -I${logtincdir}
-CFLAGS += -I$(S)/../libfenced
+CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${logtincdir}
+CFLAGS += -I${fenceincdir} -I${fencedincdir}
 CFLAGS += -I${incdir}
 
-LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -L${fencelibdir} -lccs -lcman -lfence
+LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -lccs -lcman
+LDFLAGS += -L${fencelibdir} -L${fencedlibdir} -lfence -lfenced
 LDFLAGS += -L${logtlibdir} -llogthread
-LDFLAGS += -L../libfenced -lfenced
 LDFLAGS += -L${libdir}
 
-LDDEPS += ../libfenced/libfenced.a
-
-${TARGET}: ${OBJS} ${LDDEPS}
+${TARGET}: ${OBJS}
 	$(CC) -o $@ $^ $(LDFLAGS)
 
 depends:
diff --git a/fence/fence_tool/Makefile b/fence/fence_tool/Makefile
index 51413fc..dab3e8f 100644
--- a/fence/fence_tool/Makefile
+++ b/fence/fence_tool/Makefile
@@ -13,17 +13,15 @@ include $(OBJDIR)/make/uninstall.mk
 OBJS=fence_tool.o
 
 CFLAGS += -D_FILE_OFFSET_BITS=64
-CFLAGS += -I${ccsincdir} -I${cmanincdir}
-CFLAGS += -I$(S)/../libfenced -I$(S)/../include
+CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${fencedincdir}
+CFLAGS += -I$(S)/../include
 CFLAGS += -I${incdir} 
 
 LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -lccs -lcman
-LDFLAGS += -L../libfenced -lfenced
+LDFLAGS += -L${fencedlibdir} -lfenced
 LDFLAGS += -L${libdir}
 
-LDDEPS += ../libfenced/libfenced.a
-
-${TARGET}: ${OBJS} ${LDDEPS}
+${TARGET}: ${OBJS}
 	$(CC) -o $@ $^ $(LDFLAGS)
 
 depends:
diff --git a/fence/fenced/Makefile b/fence/fenced/Makefile
index 9fc9307..7455544 100644
--- a/fence/fenced/Makefile
+++ b/fence/fenced/Makefile
@@ -19,12 +19,13 @@ OBJS=	config.o \
 	logging.o
 
 CFLAGS += -D_FILE_OFFSET_BITS=64
-CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${logtincdir} -I${fenceincdir} -I${corosyncincdir}
-CFLAGS += -I$(S) -I$(S)/../include -I$(S)/../libfenced -I$(SRCDIR)/group/lib
+CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${logtincdir} -I${corosyncincdir}
+CFLAGS += -I${fenceincdir} -I${fencedincdir}
+CFLAGS += -I$(S) -I$(S)/../include -I$(SRCDIR)/group/lib
 CFLAGS += -I${incdir}
 
-LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -L${logtlibdir} -lccs -lcman -llogthread
-LDFLAGS += -L${fencelibdir} -lfence
+LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -lccs -lcman
+LDFLAGS += -L${logtlibdir} -L${fencelibdir} -llogthread -lfence
 LDFLAGS += -L${corosynclibdir} -lcpg -lpthread
 LDFLAGS += -L../../group/lib -l group
 LDFLAGS += -L${libdir}
diff --git a/group/dlm_controld/Makefile b/group/dlm_controld/Makefile
index e5766ed..fb795ec 100644
--- a/group/dlm_controld/Makefile
+++ b/group/dlm_controld/Makefile
@@ -35,7 +35,7 @@ endif
 CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${logtincdir} 
 CFLAGS += -I${dlmincdir} -I${dlmcontrolincdir}
 CFLAGS += -I${corosyncincdir} -I${openaisincdir}
-CFLAGS += -I$(SRCDIR)/fence/libfenced/
+CFLAGS += -I${fencedincdir}
 CFLAGS += -I${KERNEL_SRC}/include/
 CFLAGS += -I$(S)/../lib/ -I$(S)/../include/
 ifdef enable_pacemaker
@@ -59,13 +59,12 @@ PCMK_LDFLAGS += `pkg-config glib-2.0 --libs`
 PCMK_LDFLAGS += `xml2-config --libs`
 
 CMAN_LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -lccs -lcman
-CMAN_LDFLAGS += -L../../fence/libfenced/ -lfenced
-CMAN_LDDEPS += ../../fence/libfenced/libfenced.a
+CMAN_LDFLAGS += -L${fencedlibdir} -lfenced
 
-dlm_controld: ${OBJS} ${LDDEPS} ${CMAN_LDDEPS}
+dlm_controld: ${OBJS} ${LDDEPS}
 	$(CC) -o $@ $^ $(LDFLAGS) $(CMAN_LDFLAGS)
 
-dlm_controld.pcmk: ${OBJS} ${LDDEPS} ${PCMK_LDDEPS}
+dlm_controld.pcmk: ${OBJS} ${LDDEPS}
 	$(CC) -o $@ $^ $(LDFLAGS) $(PCMK_LDFLAGS)
 
 depends:
diff --git a/group/gfs_controld/Makefile b/group/gfs_controld/Makefile
index 0b3a9e7..b0e6894 100644
--- a/group/gfs_controld/Makefile
+++ b/group/gfs_controld/Makefile
@@ -22,9 +22,9 @@ OBJS= 	main.o \
 	logging.o
 
 CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${logtincdir} -I${dlmcontrolincdir}
-CFLAGS += -I${corosyncincdir} -I${openaisincdir}
+CFLAGS += -I${corosyncincdir} -I${openaisincdir} -I${fencedincdir}
 CFLAGS += -I${KERNEL_SRC}/include/
-CFLAGS += -I$(S)/../libgfscontrol -I$(S)/../../fence/libfenced/
+CFLAGS += -I$(S)/../libgfscontrol
 CFLAGS += -I$(S)/../lib/ -I$(S)/../include/
 CFLAGS += -I${incdir}
 
@@ -33,12 +33,11 @@ LDFLAGS += -L${dlmcontrollibdir} -ldlmcontrol
 LDFLAGS += -L${logtlibdir} -llogthread
 LDFLAGS += -L${corosynclibdir} -lcpg -lpthread
 LDFLAGS += -L${openaislibdir} -lSaCkpt
-LDFLAGS += -L../../fence/libfenced/ -lfenced
+LDFLAGS += -L${fencedlibdir} -lfenced
 LDFLAGS += -L../lib -lgroup
 LDFLAGS += -L${libdir}
 
 LDDEPS += ../lib/libgroup.a
-LDDEPS += ../../fence/libfenced/libfenced.a
 
 ${TARGET}: ${OBJS} ${LDDEPS}
 	$(CC) -o $@ $^ $(LDFLAGS)
diff --git a/group/tool/Makefile b/group/tool/Makefile
index ba5d960..d6421f6 100644
--- a/group/tool/Makefile
+++ b/group/tool/Makefile
@@ -14,20 +14,19 @@ OBJS=	main.o
 
 CFLAGS += -I$(S) -I$(S)/../daemon/ -I$(S)/../lib/
 CFLAGS += -I${dlmcontrolincdir}
-CFLAGS += -I$(S)/../../fence/libfenced
+CFLAGS += -I${fencedincdir}
 CFLAGS += -I$(S)/../libgfscontrol
 CFLAGS += -I${incdir}
 CFLAGS += -I${KERNEL_SRC}/include/
 
 LDFLAGS += -L${dlmcontrollibdir} -ldlmcontrol
+LDFLAGS += -L${fencedlibdir} -lfenced
 LDFLAGS += -L../lib -lgroup
-LDFLAGS += -L../../fence/libfenced -lfenced
 LDFLAGS += -L../libgfscontrol -lgfscontrol
 LDFLAGS += -L${libdir}
 
 LDDEPS += ../lib/libgroup.a
 LDDEPS += ../libgfscontrol/libgfscontrol.a
-LDDEPS += ../../fence/libfenced/libfenced.a
 
 ${TARGET}: ${OBJS} ${LDDEPS}
 	$(CC) -o $@ $^ $(LDFLAGS)
diff --git a/make/defines.mk.input b/make/defines.mk.input
index f6c3c82..b098e75 100644
--- a/make/defines.mk.input
+++ b/make/defines.mk.input
@@ -45,6 +45,8 @@ dlmcontrolincdir ?= @DLMCONTROLINCDIR@
 dlmcontrollibdir ?= @DLMCONTROLLIBDIR@
 fenceincdir ?= @FENCEINCDIR@
 fencelibdir ?= @FENCELIBDIR@
+fencedincdir ?= @FENCEDINCDIR@
+fencedlibdir ?= @FENCEDLIBDIR@
 logtincdir ?= @LOGTINCDIR@
 logtlibdir ?= @LOGTLIBDIR@
 ncursesincdir ?= @NCURSESINCDIR@


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-26  7:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-26  7:25 cluster: STABLE3 - build: cleanup libfenced linking Fabio M. Di Nitto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).