diff options
author | christophe.varoqui@free.fr <christophe.varoqui@free.fr> | 2003-12-10 00:50:25 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:13:07 -0700 |
commit | 61f76f5c9c12ec612458f515516b71a23b9410dd (patch) | |
tree | c8bb46124026283bfc91b68f5f20b1e7479fe285 /extras/multipath/Makefile | |
parent | 4763256c65859b94ac7a309cbb8f772d5426a08d (diff) |
[PATCH] more extras/multipath updates
* update the Makefiles to autodetect libgcc.a & gcc includes
"ulibc-style". Factorisation of udevdirs & others niceties
* drop a hint about absent /dev/sd? on failed open() for poor Debian
users who don't imagine their favorite distro with only 16 preconfigured
SCSI device nodes :)
Diffstat (limited to 'extras/multipath/Makefile')
-rw-r--r-- | extras/multipath/Makefile | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/extras/multipath/Makefile b/extras/multipath/Makefile index bccf1264f0..89e6f35185 100644 --- a/extras/multipath/Makefile +++ b/extras/multipath/Makefile @@ -6,16 +6,22 @@ EXEC = multipath prefix = /usr/local exec_prefix = ${prefix} -bindir = ${exec_prefix}/bin +bindir = ${exec_prefix}/bin +udevdir = ../.. +klibcdir = $(udevdir)/klibc +sysfsdir = $(udevdir)/libsysfs CC = gcc -CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -nostdinc -I../../klibc/klibc/include -I../../klibc/klibc/include/bits32 -I/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/include -I../../klibc/linux/include -I../../libsysfs -I. -LDFLAGS = -lsysfs -ldevmapper -ldlist +GCCINCDIR := ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"} +CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -nostdinc \ + -I$(klibcdir)/klibc/include -I$(klibcdir)/klibc/include/bits32 \ + -I$(GCCINCDIR) -I$(klibcdir)/linux/include -I$(sysfsdir) -I. OBJS = main.o CRT0 = ../../klibc/klibc/crt0.o LIB = ../../klibc/klibc/libc.a -LIBGCC = /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/libgcc.a +LIBGCC := $(shell $(CC) -print-libgcc-file-name ) + DMOBJS = libdevmapper/libdm-common.o libdevmapper/ioctl/libdevmapper.o SYSFSOBJS = ../../libsysfs/dlist.o ../../libsysfs/sysfs_bus.o \ ../../libsysfs/sysfs_class.o ../../libsysfs/sysfs_device.o \ |