2015-11-30 22:54:52 +03:00
# Copyright (C) 2011-2015 Red Hat, Inc. All rights reserved.
2011-11-21 01:43:20 +04: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 13:49:46 +03:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2011-11-21 01:43:20 +04:00
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
2011-11-23 16:21:41 +04:00
VPATH = $( srcdir)
2015-11-27 12:54:57 +03:00
UNITS = \
bitset_t.c\
config_t.c\
dmlist_t.c\
2015-11-30 22:54:52 +03:00
dmstatus_t.c\
2015-11-27 12:54:57 +03:00
matcher_t.c\
string_t.c\
run.c
i n c l u d e $( top_builddir ) / m a k e . t m p l
2013-06-03 14:05:02 +04:00
i f e q ( $( MAKECMDGOALS ) , d i s t c l e a n )
SOURCES = $( UNITS)
e n d i f
i f e q ( "$(TESTING)" , "yes" )
SOURCES = $( UNITS)
2012-01-27 14:55:02 +04:00
TARGETS = run
e n d i f
2011-11-21 01:43:20 +04:00
2011-11-23 16:21:41 +04:00
i f e q ( "$(TESTING)" , "yes" )
2012-01-27 01:40:36 +04:00
LDLIBS += -ldevmapper @CUNIT_LIBS@
2011-12-11 19:15:57 +04:00
CFLAGS += @CUNIT_CFLAGS@
2012-02-23 17:11:07 +04:00
check : unit
2011-11-23 16:21:41 +04:00
2015-11-30 22:54:52 +03:00
$(TARGETS) : $( OBJECTS ) $( top_builddir ) /libdm /libdevmapper .$( LIB_SUFFIX )
2015-11-27 12:54:57 +03:00
2011-11-23 16:21:41 +04:00
unit : $( TARGETS )
@echo Running unit tests
LD_LIBRARY_PATH = $( top_builddir) /libdm ./$( TARGETS)
2011-12-11 19:15:57 +04:00
e n d i f