forked from openSUSE/multipath-tools-pre2021
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.inc
62 lines (51 loc) · 1.54 KB
/
Makefile.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Makefile.inc
#
# Copyright (C) 2004 Christophe Varoqui, <[email protected]>
#
# Allow to force some libraries to be used statically. (Uncomment one of the
# following lines or define the values when calling make.)
#
# WITH_LOCAL_LIBDM = 1
# WITH_LOCAL_LIBSYSFS = 1
ifeq ($(TOPDIR),)
TOPDIR = ..
endif
ifndef LIB
ifeq ($(shell test -d /lib64 && echo 1),1)
LIB=lib64
else
LIB=lib
endif
endif
ifndef SYSTEMD
ifeq ($(shell systemctl --version > /dev/null 2>&1 && echo 1), 1)
SYSTEMD = $(shell systemctl --version 2> /dev/null | sed -n 's/systemd \([0-9]*\)/\1/p')
endif
endif
ifndef SYSTEMDPATH
SYSTEMDPATH=usr/lib
endif
prefix =
exec_prefix = $(prefix)
bindir = $(exec_prefix)/sbin
libudevdir = $(prefix)/$(SYSTEMDPATH)/udev
udevrulesdir = $(libudevdir)/rules.d
multipathdir = $(TOPDIR)/libmultipath
mandir = $(prefix)/usr/share/man/man8
man5dir = $(prefix)/usr/share/man/man5
man3dir = $(prefix)/usr/share/man/man3
rcdir = $(prefix)/etc/init.d
syslibdir = $(prefix)/$(LIB)
libdir = $(prefix)/$(LIB)/multipath
unitdir = $(prefix)/$(SYSTEMDPATH)/systemd/system
mpathpersistdir = $(TOPDIR)/libmpathpersist
GZIP = gzip -9 -c
INSTALL_PROGRAM = install
ifndef RPM_OPT_FLAGS
RPM_OPT_FLAGS = -O2 -g -pipe -Wformat-security -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
endif
OPTFLAGS = $(RPM_OPT_FLAGS) -Wunused -Wstrict-prototypes
CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\"
SHARED_FLAGS = -shared
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<