2009-03-06 16:19:52 +00:00
#
# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
2013-07-12 16:40:10 -04:00
# Copyright (C) 2004-2013 Red Hat, Inc. All rights reserved.
2009-03-06 16:19:52 +00:00
#
# This file is part of LVM2.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU General Public License v.2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
2016-01-21 11:49:46 +01:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2009-03-06 16:19:52 +00:00
srcdir = @srcdir@
top_srcdir = @top_srcdir@
2009-10-02 19:10:31 +00:00
top_builddir = @top_builddir@
2009-03-06 16:19:52 +00:00
SOURCES = \
2010-02-24 18:16:10 +00:00
lvm_misc.c \
2013-07-12 16:40:10 -04:00
lvm_prop.c \
2009-07-14 03:02:14 +00:00
lvm_base.c \
2009-07-23 23:40:05 +00:00
lvm_lv.c \
lvm_pv.c \
2009-07-14 03:02:14 +00:00
lvm_vg.c
2009-03-06 16:19:52 +00:00
2009-05-22 14:44:59 +00:00
LIB_NAME = liblvm2app
2009-07-22 20:12:14 +00:00
LIB_VERSION = $( LIB_VERSION_APP)
2009-03-06 16:19:52 +00:00
2009-04-08 14:04:35 +00:00
i f e q ( "@STATIC_LINK@" , "yes" )
2009-07-22 21:09:13 +00:00
LIB_STATIC = $( LIB_NAME) .a
e n d i f
2010-04-09 21:42:48 +00:00
LIB_SHARED = $( LIB_NAME) .$( LIB_SUFFIX)
2009-03-06 16:19:52 +00:00
2010-04-09 21:42:48 +00:00
CLEAN_TARGETS += liblvm.cflow $( LIB_NAME) .a
2009-03-06 16:19:52 +00:00
2010-06-25 18:17:38 +00:00
EXPORTED_HEADER = $( srcdir) /lvm2app.h
EXPORTED_FN_PREFIX = lvm
2012-02-08 10:52:45 +00:00
LDDEPS += $( top_builddir) /lib/liblvm-internal.a
2010-03-04 09:51:37 +00:00
i n c l u d e $( top_builddir ) / m a k e . t m p l
2009-03-06 16:19:52 +00:00
2017-08-01 00:01:07 +02:00
LDFLAGS += -L$( top_builddir) /lib -L$( top_builddir) /daemons/dmeventd
2018-02-08 09:32:19 -06:00
LIBS += $( LVMINTERNAL_LIBS) -ldevmapper -laio
2009-03-08 17:06:55 +00:00
2010-04-09 21:42:48 +00:00
.PHONY : install_dynamic install_static install_include install_pkgconfig
2009-07-22 21:09:13 +00:00
INSTALL_TYPE = install_dynamic
i f e q ( "@STATIC_LINK@" , "yes" )
INSTALL_TYPE += install_static
e n d i f
i f e q ( "@PKGCONFIG@" , "yes" )
INSTALL_TYPE += install_pkgconfig
e n d i f
install : $( INSTALL_TYPE ) install_include
2010-04-09 21:42:48 +00:00
install_include : $( srcdir ) /lvm 2app .h
$( INSTALL_DATA) -D $< $( includedir) /$( <F)
2009-07-22 21:09:13 +00:00
2010-04-09 21:42:48 +00:00
install_dynamic : install_lib_shared
2009-07-22 21:09:13 +00:00
install_static : $( LIB_STATIC )
2010-04-09 21:42:48 +00:00
$( INSTALL_DATA) -D $< $( usrlibdir) /$( <F)
2009-07-22 21:09:13 +00:00
2010-04-09 21:42:48 +00:00
install_pkgconfig : $( LIB_NAME ) .pc
2010-05-11 08:57:02 +00:00
$( INSTALL_DATA) -D $< $( pkgconfigdir) /lvm2app.pc
2009-07-22 21:09:13 +00:00
2009-03-06 16:19:52 +00:00
liblvm.cflow : $( SOURCES )
set -e; ( echo -n "SOURCES += " ; \
echo $( SOURCES) | \
2009-07-22 20:29:56 +00:00
sed " s/^/ /;s/ / $( top_srcdir) \/liblvm\//g;s/ $$ // " ; \
2009-03-06 16:19:52 +00:00
) > $@
cflow : liblvm .cflow
2009-07-22 21:09:13 +00:00
2015-05-18 10:27:48 +02:00
DISTCLEAN_TARGETS += $( LIB_NAME) .pc