[libmultipath] Remove libsysfs
[multipath-tools/.git] / libmultipath / Makefile
1 # Makefile
2 #
3 # Copyright (C) 2003 Christophe Varoqui, <christophe.varoqui@free.fr>
4 #
5 BUILD = glibc
6
7 include ../Makefile.inc
8
9 CFLAGS += -I$(checkersdir)
10
11 OBJS = memory.o parser.o vector.o devmapper.o callout.o \
12        hwtable.o blacklist.o util.o dmparser.o config.o \
13        structs.o discovery.o propsel.o dict.o \
14        pgpolicies.o debug.o regex.o defaults.o uevent.o \
15        switchgroup.o uxsock.o print.o alias.o log_pthread.o \
16        log.o configure.o structs_vec.o sysfs.o
17
18 PREVBUILD = $(shell nm debug.o 2> /dev/null|grep log_safe)
19
20 ifeq ($(strip $(DAEMON)),1)
21         OBJS += lock.o waiter.o
22         CFLAGS += -DDAEMON
23         CLEAN = $(shell if [ "x$(PREVBUILD)" = "x" ]; then echo clean; fi)
24 else
25         CLEAN = $(shell if [ ! "x$(PREVBUILD)" = "x" ]; then echo clean; fi)
26 endif
27
28 LIBDM_API_FLUSH = $(shell objdump -T /lib/libdevmapper.so.* | grep -c dm_task_no_flush)
29
30 ifeq ($(strip $(LIBDM_API_FLUSH)),1)
31         CFLAGS += -DLIBDM_API_FLUSH
32 endif
33
34 all: $(BUILD)
35
36 prepare: $(CLEAN)
37         @file *-$(BUILD).a >/dev/null 2>&1 || rm -f core *.o *.gz
38         @rm -f *-$(BUILD).a
39
40 klibc: $(OBJS)
41         ar rs libmultipath-klibc.a *.o
42
43 glibc: $(OBJS)
44         ar rs libmultipath-glibc.a *.o
45
46 install:
47
48 uninstall:
49
50 clean:
51         rm -f core *.a *.o *.gz