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