Remove DAEMON defines
[platform/upstream/multipath-tools.git] / libmultipath / Makefile
1 # Makefile
2 #
3 # Copyright (C) 2003 Christophe Varoqui, <christophe.varoqui@free.fr>
4 #
5 include ../Makefile.inc
6
7 LIBS = libmultipath.so
8
9 OBJS = memory.o parser.o vector.o devmapper.o callout.o \
10        hwtable.o blacklist.o util.o dmparser.o config.o \
11        structs.o discovery.o propsel.o dict.o \
12        pgpolicies.o debug.o regex.o defaults.o uevent.o \
13        switchgroup.o uxsock.o print.o alias.o log_pthread.o \
14        log.o configure.o structs_vec.o sysfs.o prio.o checkers.o \
15        lock.o waiter.o
16
17 LIBDM_API_FLUSH = $(shell if test -d /lib64 ; then objdump -T /lib64/libdevmapper.so* ; else objdump -T /lib/libdevmapper.so.* ; fi | grep -c dm_task_no_flush)
18
19 ifeq ($(strip $(LIBDM_API_FLUSH)),1)
20         CFLAGS += -DLIBDM_API_FLUSH
21 endif
22
23 all: $(LIBS)
24
25 $(LIBS): $(OBJS)
26         $(CC) $(SHARED_FLAGS) $(CFLAGS) -o $@ $(OBJS)
27
28 install:
29         $(INSTALL_PROGRAM) -o root -g root -m 755 -d $(libdir)
30         $(INSTALL_PROGRAM) -o root -g root -m 755 $(LIBS) $(libdir)/$(LIBS)
31
32 uninstall:
33         rm -f $(libdir)/$(LIBS)
34
35 clean:
36         rm -f core *.a *.o *.gz *.so