Merge branch 'master' of git://git.kernel.org/pub/scm/linux/storage/multipath-tools/
[platform/upstream/multipath-tools.git] / Makefile.inc
1 # Makefile.inc
2 #
3 # Copyright (C) 2004 Christophe Varoqui, <christophe.varoqui@opensvc.com>
4
5 #
6 # Allow to force some libraries to be used statically. (Uncomment one of the
7 # following lines or define the values when calling make.)
8 #
9 # WITH_LOCAL_LIBDM      = 1
10 # WITH_LOCAL_LIBSYSFS   = 1
11
12 ifeq ($(TOPDIR),)
13         TOPDIR  = ..
14 endif
15
16 ifndef LIB
17         ifeq ($(shell test -d /lib64 && echo 1),1)
18                 LIB=lib64
19         else
20                 LIB=lib
21         endif
22 endif
23
24 prefix      = 
25 exec_prefix = $(prefix)
26 bindir      = $(exec_prefix)/sbin
27 libudevdir  = ${prefix}/lib/udev
28 multipathdir = $(TOPDIR)/libmultipath
29 mandir      = $(prefix)/usr/share/man/man8
30 man5dir     = $(prefix)/usr/share/man/man5
31 rcdir       = $(prefix)/etc/init.d
32 syslibdir   = $(prefix)/$(LIB)
33 libdir      = $(prefix)/$(LIB)/multipath
34
35 GZIP        = /bin/gzip -9 -c
36 INSTALL_PROGRAM = install
37
38 OPTFLAGS     = -pipe -g -Wall -Wunused -Wstrict-prototypes
39 CFLAGS       = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\"
40 SHARED_FLAGS = -shared
41
42 %.o:    %.c
43         $(CC) $(CFLAGS) -c -o $@ $<
44