1 # 2 # Copyright (C) 2009 Red Hat, Inc. All rights reserved. 3 # 4 # This file is part of LVM2. 5 # 6 # This copyrighted material is made available to anyone wishing to use, 7 # modify, copy, or redistribute it subject to the terms and conditions 8 # of the GNU General Public License v.2. 9 # 10 # You should have received a copy of the GNU General Public License 11 # along with this program; if not, write to the Free Software Foundation, 12 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 13 14 srcdir = . 15 top_srcdir = ../.. 16 top_builddir = ../.. 17 18 19 ifeq ("no", "yes") 20 DEFS += -DDEBUG 21 endif 22 23 TARGETS = vgtest 24 test_SOURCES = test.c 25 vgtest_SOURCES = vgtest.c 26 INCLUDES += -I../../include 27 28 LVMLIBS = -ldevmapper 29 DEPLIBS = $(top_srcdir)/liblvm/liblvm2app.so $(top_srcdir)/libdm/libdevmapper.so 30 31 DEFS += -D_REENTRANT 32 33 include $(top_srcdir)/make.tmpl 34 35 LDFLAGS = -L$(top_srcdir)/libdm -L$(top_srcdir)/liblvm 36 37 ifeq ("", "yes") 38 LVMLIBS += -ldevmapper-event -lpthread 39 LDFLAGS += -L$(top_srcdir)/daemons/dmeventd 40 endif 41 42 test_OBJECTS = $(test_SOURCES:.c=.o) 43 vgtest_OBJECTS = $(vgtest_SOURCES:.c=.o) 44 OBJECTS = $(test_OBJECTS) $(vgtest_OBJECTS) 45 46 test: $(test_OBJECTS) $(DEPLIBS) 47 $(CC) -o test $(test_OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS) 48 49 vgtest: $(vgtest_OBJECTS) $(DEPLIBS) 50 $(CC) -o vgtest $(vgtest_OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS) 51