summaryrefslogtreecommitdiff
path: root/kpartx
diff options
context:
space:
mode:
authorChristophe Varoqui <christophe.varoqui@free.fr>2008-04-04 00:58:41 +0200
committerChristophe Varoqui <christophe.varoqui@free.fr>2008-04-04 00:58:41 +0200
commit27c93c5efff1d425b9b71a62efe59465b4150303 (patch)
tree4685f20f1dfddf57c290752394873920a1202870 /kpartx
parent3aaecad682efef27ce6196c6d29db4cb93c9f2fb (diff)
downloadmultipath-tools-27c93c5efff1d425b9b71a62efe59465b4150303.tar.gz
multipath-tools-27c93c5efff1d425b9b71a62efe59465b4150303.tar.bz2
multipath-tools-27c93c5efff1d425b9b71a62efe59465b4150303.zip
Move to a shared lib model for
1) checkers (one lib for all checkers for a start) 2) prioritizers (one helper lib, plus one lib per prioritizer) 3) libmultipath Collaterals include : o Remove old prioritizer callouts. o Drop the klibc support o Add remove_map(s)/remove_map(s)_and_stop_waiter(s) helpers Regression testing is needed now.
Diffstat (limited to 'kpartx')
-rw-r--r--kpartx/Makefile43
1 files changed, 12 insertions, 31 deletions
diff --git a/kpartx/Makefile b/kpartx/Makefile
index b4cca6c..21e4ad4 100644
--- a/kpartx/Makefile
+++ b/kpartx/Makefile
@@ -2,49 +2,30 @@
#
# Copyright (C) 2003 Christophe Varoqui, <christophe.varoqui@free.fr>
#
-BUILD=glibc
-
include ../Makefile.inc
CFLAGS += -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-ifeq ($(strip $(BUILD)),klibc)
- OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o gpt.o crc32.o \
- lopart.o xstrncpy.o devmapper.o dasd.o mac.o sun.o \
- $(MULTIPATHLIB)-$(BUILD).a $(libdm)
-else
- LDFLAGS = -ldevmapper
- OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \
- gpt.o mac.o crc32.o lopart.o xstrncpy.o devmapper.o
-endif
-
+LDFLAGS = -ldevmapper
+OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \
+ gpt.o mac.o crc32.o lopart.o xstrncpy.o devmapper.o
EXEC = kpartx
-all: $(BUILD)
-
-prepare:
- rm -f core *.o *.gz
+all: $(EXEC)
-glibc: prepare $(OBJS)
+$(EXEC): $(OBJS)
$(CC) $(OBJS) -o $(EXEC) $(LDFLAGS)
$(GZIP) $(EXEC).8 > $(EXEC).8.gz
-klibc: prepare $(OBJS)
- $(CC) -static -o $(EXEC) $(CRT0) $(OBJS) $(KLIBC) $(LIBGCC)
- $(GZIP) $(EXEC).8 > $(EXEC).8.gz
-
-$(MULTIPATHLIB)-$(BUILD).a:
- make -C $(multipathdir) BUILD=$(BUILD)
-
install: $(EXEC) $(EXEC).8
- install -d $(DESTDIR)$(bindir)
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
- install -d $(DESTDIR)$(libudevdir)
- install -m 755 kpartx_id $(DESTDIR)$(libudevdir)
- install -d $(DESTDIR)/etc/udev/rules.d
- install -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/
- install -d $(DESTDIR)$(mandir)
- install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)
+ $(INSTALL_PROGRAM) -m 755 kpartx_id $(DESTDIR)$(libudevdir)
+ $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
+ $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
+ $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
uninstall:
rm -f $(DESTDIR)$(bindir)/$(EXEC)