mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
09b7985cf6
incremental to udev-016/extras/multipath-0.0.16.3, * add a GROUP_BY_SERIAL flag. This should be useful for controlers that activate their spare paths on simple IO submition with a penalty. The StorageWorks HW defaults to this mode, even if the MULTIBUS mode is OK. * remove unused sg_err.c * big restructuring : split devinfo.c from main.c. Export : * void basename (char *, char *); * int get_serial (int, char *); * int get_lun_strings (char *, char *, char *, char *); * int get_evpd_wwid(char *, char *); * long get_disk_size (char *); Now we see clearly what is expected from an external package like scsi_id. * stop passing struct env as param
71 lines
1.9 KiB
Makefile
71 lines
1.9 KiB
Makefile
# Makefile
|
|
#
|
|
# Copyright (C) 2003 Christophe Varoqui, <christophe.varoqui@free.fr>
|
|
|
|
EXEC = multipath
|
|
|
|
prefix =
|
|
exec_prefix = ${prefix}
|
|
bindir = ${exec_prefix}/sbin
|
|
udevdir = ../..
|
|
klibcdir = $(udevdir)/klibc
|
|
sysfsdir = $(udevdir)/libsysfs
|
|
|
|
CC = gcc
|
|
GCCINCDIR := ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"}
|
|
KERNEL_DIR = /lib/modules/${shell uname -r}/build
|
|
CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -nostdinc \
|
|
-I$(klibcdir)/klibc/include -I$(klibcdir)/klibc/include/bits32 \
|
|
-I$(GCCINCDIR) -I$(KERNEL_DIR)/include -I$(sysfsdir) -I.
|
|
|
|
OBJS = devinfo.o main.o
|
|
CRT0 = ../../klibc/klibc/crt0.o
|
|
LIB = ../../klibc/klibc/libc.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 \
|
|
../../libsysfs/sysfs_dir.o ../../libsysfs/sysfs_driver.o \
|
|
../../libsysfs/sysfs_utils.o
|
|
|
|
SUBDIRS = libdevmapper
|
|
|
|
recurse:
|
|
@for dir in $(SUBDIRS); do\
|
|
$(MAKE) KERNEL_DIR=$(KERNEL_DIR) -C $$dir ; \
|
|
done
|
|
$(MAKE) $(EXEC)
|
|
$(MAKE) devmap_name
|
|
|
|
all: recurse
|
|
@echo ""
|
|
@echo "Make complete"
|
|
|
|
$(EXEC): $(OBJS)
|
|
$(LD) -o $(EXEC) $(CRT0) $(OBJS) $(SYSFSOBJS) $(DMOBJS) $(LIB) $(LIBGCC)
|
|
strip $(EXEC)
|
|
|
|
devmap_name: devmap_name.o
|
|
$(LD) -o devmap_name $(CRT0) devmap_name.o $(DMOBJS) $(LIB) $(LIBGCC)
|
|
strip devmap_name
|
|
|
|
clean:
|
|
rm -f core *.o $(EXEC) devmap_name
|
|
$(MAKE) -C libdevmapper clean
|
|
|
|
install:
|
|
install -d $(bindir)
|
|
install -m 755 $(EXEC) $(bindir)/
|
|
install -m 755 devmap_name $(bindir)/
|
|
install -d /etc/hotplug.d/scsi/
|
|
install -m 755 multipath.hotplug /etc/hotplug.d/scsi/
|
|
|
|
uninstall:
|
|
rm /etc/hotplug.d/scsi/multipath.hotplug
|
|
rm $(bindir)/$(EXEC)
|
|
rm $(bindir)/devmap_name
|
|
|
|
# Code dependencies
|
|
main.o: main.c main.h sg_include.h devinfo.h
|