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>
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
OBJS = main.o
CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir)
-LDFLAGS += -laio -ldevmapper -lpthread \
+LDFLAGS += -lpthread -ldevmapper -laio -ldl \
-lmultipath -L$(multipathdir)
EXEC = multipath
# 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)
#