Fixup Makefiles
authorHannes Reinecke <hare@suse.de>
Wed, 30 Apr 2008 09:04:55 +0000 (11:04 +0200)
committerChristophe Varoqui <christophe.varoqui@free.fr>
Wed, 30 Apr 2008 11:25:16 +0000 (13:25 +0200)
We're now using dlopen() etc, so we should link to libdl
explicitely instead of relying on some other library to do
this for us.
And '-fPIC' is a mandatory CFLAGS setting now, not an
optimisation.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Makefile.inc
multipath/Makefile
multipathd/Makefile

index 622f557..3e5bca0 100644 (file)
@@ -26,8 +26,8 @@ libdir            = $(prefix)/lib/multipath
 GZIP        = /bin/gzip -9 -c
 INSTALL_PROGRAM = install
 
-OPTFLAGS     = -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC
-CFLAGS      = $(OPTFLAGS)
+OPTFLAGS     = -pipe -g -Wall -Wunused -Wstrict-prototypes
+CFLAGS      = $(OPTFLAGS) -fPIC
 SHARED_FLAGS = -shared
 
 %.o:   %.c
index 71df431..2d74ffe 100644 (file)
@@ -7,7 +7,7 @@ include ../Makefile.inc
 OBJS = main.o
 
 CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir)
-LDFLAGS += -laio -ldevmapper -lpthread \
+LDFLAGS += -lpthread -ldevmapper -laio -ldl \
           -lmultipath -L$(multipathdir)
 
 EXEC = multipath
index dd223c4..b1af76c 100644 (file)
@@ -6,7 +6,7 @@ include ../Makefile.inc
 # basic flags setting
 #
 CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir)
-LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -laio \
+LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -laio -ldl \
           -lmultipath -L$(multipathdir)
 
 #