2008-12-07 22:37:07 +03:00
#
2012-10-05 12:33:41 +04:00
# Copyright (C) 2009-2012 Red Hat, Inc. All rights reserved.
2008-12-07 22:37:07 +03: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,
2009-07-21 17:51:05 +04:00
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2008-12-07 22:37:07 +03:00
srcdir = @srcdir@
top_srcdir = @top_srcdir@
2009-10-02 23:10:31 +04:00
top_builddir = @top_builddir@
2008-12-07 22:37:07 +03:00
2011-11-23 16:21:41 +04:00
TARGETS =
2011-03-02 00:30:43 +03:00
i f e q ( "@APPLIB@" , "yes" )
TARGETS += test
2011-11-23 16:21:41 +04:00
SOURCES = test.c
2008-12-07 22:37:07 +03:00
2012-10-05 12:33:41 +04:00
TARGETS += \
lvtest.t \
2013-07-11 10:01:04 +04:00
vglist.t \
2012-10-05 12:33:41 +04:00
percent.t \
pe_start.t \
thin_percent.t \
vgtest.t
SOURCES2 = \
lvtest.c \
2013-07-11 10:01:04 +04:00
vglist.c \
2012-10-05 12:33:41 +04:00
percent.c \
pe_start.c \
thin_percent.c \
vgtest.c
2011-03-02 00:30:43 +03:00
e n d i f
2010-12-12 23:36:38 +03:00
2009-11-30 18:12:34 +03:00
i n c l u d e $( top_builddir ) / m a k e . t m p l
2008-12-07 22:37:07 +03:00
2011-11-23 16:21:41 +04:00
DEFS += -D_REENTRANT
DEPLIBS += $( top_builddir) /liblvm/liblvm2app.so $( top_builddir) /libdm/libdevmapper.so
LDFLAGS += -L$( top_builddir) /liblvm
2011-11-23 17:02:17 +04:00
LVMLIBS = @LVM2APP_LIB@ -ldevmapper
i f e q ( "@DMEVENTD@" , "yes" )
LVMLIBS += -ldevmapper-event
LDFLAGS += -L$( top_builddir) /daemons/dmeventd
e n d i f
LVMLIBS += $( LIBS)
2008-12-07 22:37:07 +03:00
2010-12-12 23:36:38 +03:00
%.t : %.o $( DEPLIBS )
2011-11-23 16:21:41 +04:00
$( CC) -o $@ $( <) $( LDFLAGS) $( LVMLIBS)
2010-12-12 23:36:38 +03:00
2011-11-23 16:21:41 +04:00
test : $( OBJECTS ) $( DEPLIBS )
$( CC) -o $@ $( OBJECTS) $( LDFLAGS) $( LVMLIBS) $( READLINE_LIBS)
2010-12-12 23:36:38 +03:00
Makefile : $( srcdir ) /Makefile .in $( top_builddir ) /config .status
cd $( top_builddir) && $( SHELL) ./config.status test/api/Makefile