2008-12-07 22:37:07 +03:00
#
2009-07-21 17:51:05 +04:00
# Copyright (C) 2009 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
i f e q ( "@DEBUG@" , "yes" )
DEFS += -DDEBUG
e n d i f
2009-09-04 17:49:02 +04:00
TARGETS = vgtest
2009-07-21 17:51:05 +04:00
test_SOURCES = test.c
vgtest_SOURCES = vgtest.c
2009-10-02 23:10:31 +04:00
INCLUDES += -I../../include
2008-12-07 22:37:07 +03:00
2009-05-22 18:44:59 +04:00
LVMLIBS = @LVM2APP_LIB@ -ldevmapper
2009-11-30 18:12:34 +03:00
DEPLIBS = $( top_builddir) /liblvm/liblvm2app.so $( top_builddir) /libdm/libdevmapper.so
2008-12-07 22:37:07 +03:00
DEFS += -D_REENTRANT
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
2009-11-30 18:12:34 +03:00
LDFLAGS = -L$( top_builddir) /libdm -L$( top_builddir) /liblvm
2009-03-08 20:06:55 +03:00
2009-09-15 02:56:27 +04:00
i f e q ( "@DMEVENTD@" , "yes" )
2010-03-04 14:21:05 +03:00
LVMLIBS += -ldevmapper-event
2009-11-30 18:12:34 +03:00
LDFLAGS += -L$( top_builddir) /daemons/dmeventd
2009-09-15 02:56:27 +04:00
e n d i f
2009-07-21 17:51:05 +04:00
test_OBJECTS = $( test_SOURCES:.c= .o)
vgtest_OBJECTS = $( vgtest_SOURCES:.c= .o)
OBJECTS = $( test_OBJECTS) $( vgtest_OBJECTS)
test : $( test_OBJECTS ) $( DEPLIBS )
2010-04-14 20:13:34 +04:00
$( CC) -o test $( test_OBJECTS) $( CFLAGS) $( LDFLAGS) $( LVMLIBS) $( LIBS) $( READLINE_LIBS)
2008-12-07 22:37:07 +03:00
2009-07-21 17:51:05 +04:00
vgtest : $( vgtest_OBJECTS ) $( DEPLIBS )
$( CC) -o vgtest $( vgtest_OBJECTS) $( CFLAGS) $( LDFLAGS) $( LVMLIBS) $( LIBS)