summaryrefslogtreecommitdiff
path: root/multipathd/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'multipathd/Makefile')
-rw-r--r--multipathd/Makefile41
1 files changed, 13 insertions, 28 deletions
diff --git a/multipathd/Makefile b/multipathd/Makefile
index b82f159..d5525aa 100644
--- a/multipathd/Makefile
+++ b/multipathd/Makefile
@@ -1,4 +1,3 @@
-BUILD = glibc
EXEC = multipathd
include ../Makefile.inc
@@ -6,8 +5,11 @@ include ../Makefile.inc
#
# basic flags setting
#
-CFLAGS += -DDAEMON -I$(multipathdir) -I$(checkersdir)
-LDFLAGS = -lpthread -ldevmapper -lreadline -lncurses -laio
+CFLAGS += -DDAEMON -I$(multipathdir) -I$(checkersdir) -I$(libpriodir)
+LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -laio \
+ -lmultipath -L$(multipathdir) \
+ -lcheckers -L$(checkersdir) \
+ -lprio -L$(libpriodir)
#
# debuging stuff
@@ -19,40 +21,24 @@ LDFLAGS = -lpthread -ldevmapper -lreadline -lncurses -laio
#
# object files
#
-OBJS = main.o pidfile.o uxlsnr.o uxclnt.o cli.o cli_handlers.o \
- $(MULTIPATHLIB)-glibc.a $(CHECKERSLIB)-glibc.a \
- $(LIBPRIO)-glibc.a
+OBJS = main.o pidfile.o uxlsnr.o uxclnt.o cli.o cli_handlers.o
#
# directives
#
-all : $(BUILD)
+all : $(EXEC)
-glibc: $(EXEC)
-
-klibc:
- $(MAKE) BUILD=glibc glibc
-
-$(EXEC): clean $(OBJS)
- $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS)
+$(EXEC): $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXEC) $(OBJS)
$(GZIP) $(EXEC).8 > $(EXEC).8.gz
-$(LIBPRIO)-glibc.a:
- $(MAKE) -C $(libpriodir) BUILD=glibc glibc
-
-$(CHECKERSLIB)-glibc.a:
- $(MAKE) -C $(checkersdir) BUILD=glibc glibc
-
-$(MULTIPATHLIB)-glibc.a:
- $(MAKE) -C $(multipathdir) DAEMON=1 BUILD=glibc glibc
-
install:
- install -d $(DESTDIR)$(bindir)
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
- install -d $(DESTDIR)$(rcdir)
- install -d $(DESTDIR)$(mandir)
- install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(rcdir)
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
+ $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
uninstall:
rm -f $(DESTDIR)$(bindir)/$(EXEC)
@@ -60,6 +46,5 @@ uninstall:
rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz
clean:
- $(MAKE) -C $(multipathdir) prepare DAEMON=1
rm -f core *.o $(EXEC) *.gz