3 # Copyright (C) 2004 Christophe Varoqui, <christophe.varoqui@opensvc.com>
6 # Allow to force some libraries to be used statically. (Uncomment one of the
7 # following lines or define the values when calling make.)
10 # WITH_LOCAL_LIBSYSFS = 1
17 ifeq ($(shell test -d /lib64 && echo 1),1)
25 ifeq ($(shell systemctl --version > /dev/null 2>&1 && echo 1), 1)
26 SYSTEMD = $(shell systemctl --version 2> /dev/null | sed -n 's/systemd \([0-9]*\)/\1/p')
31 exec_prefix = $(prefix)
32 bindir = $(exec_prefix)/sbin
33 libudevdir = ${prefix}/lib/udev
34 multipathdir = $(TOPDIR)/libmultipath
35 mandir = $(prefix)/usr/share/man/man8
36 man5dir = $(prefix)/usr/share/man/man5
37 man3dir = $(prefix)/usr/share/man/man3
38 rcdir = $(prefix)/etc/init.d
39 syslibdir = $(prefix)/$(LIB)
40 libdir = $(prefix)/$(LIB)/multipath
41 unitdir = $(prefix)/lib/systemd/system
42 mpathpersistdir = $(TOPDIR)/libmpathpersist
45 INSTALL_PROGRAM = install
48 RPM_OPT_FLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
51 OPTFLAGS = $(RPM_OPT_FLAGS) -Wunused -Wstrict-prototypes
52 CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\"
53 SHARED_FLAGS = -shared
56 $(CC) $(CFLAGS) -c -o $@ $<