2 # Copyright (C) 2009 Red Hat, Inc. All rights reserved.
4 # This file is part of LVM2.
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.
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
15 top_srcdir = @top_srcdir@
16 top_builddir = @top_builddir@
18 ifeq ("@DEBUG@", "yes")
24 wrapper_SOURCES = test.c
25 INCLUDES += -I../../include
27 UNIT = vgtest.t percent.t
29 LVMLIBS = @LVM2APP_LIB@ -ldevmapper
30 DEPLIBS = $(top_builddir)/liblvm/liblvm2app.so $(top_builddir)/libdm/libdevmapper.so
34 include $(top_builddir)/make.tmpl
36 LDFLAGS = -L$(top_builddir)/libdm -L$(top_builddir)/liblvm
38 ifeq ("@DMEVENTD@", "yes")
39 LVMLIBS += -ldevmapper-event
40 LDFLAGS += -L$(top_builddir)/daemons/dmeventd
43 test_OBJECTS = $(test_SOURCES:.c=.o)
44 wrapper_OBJECTS = $(wrapper_SOURCES:.c=.o)
45 OBJECTS = $(test_OBJECTS)
51 test: $(test_OBJECTS) $(DEPLIBS)
52 $(CC) -o test $(test_OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS) $(READLINE_LIBS)
55 $(CC) -o $@ $(<) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS)
57 wrapper: $(wrapper_OBJECTS) $(DEPLIBS)
58 $(CC) -o wrapper $(wrapper_OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS) -lreadline
60 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
61 cd $(top_builddir) && $(SHELL) ./config.status test/api/Makefile