Fixup Makefiles
Subsystems (2)
PATCH 1/1 Fixup Makefiles
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 <[email protected]>
--- Makefile.inc | 4 ++-- multipath/Makefile | 2 +- multipathd/Makefile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
Makefile.inc +2 -2
@@ -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
multipath/Makefile +1 -1
@@ -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
multipathd/Makefile +1 -1
@@ -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) #
Signature · 1 line
1.5.2.4