xref: /dragonfly/contrib/lvm2/dist/test/api/Makefile.in (revision 37de577a)
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
14srcdir = @srcdir@
15top_srcdir = @top_srcdir@
16top_builddir = @top_builddir@
17VPATH = @srcdir@
18
19ifeq ("@DEBUG@", "yes")
20	DEFS += -DDEBUG
21endif
22
23TARGETS = vgtest
24test_SOURCES = test.c
25vgtest_SOURCES = vgtest.c
26INCLUDES += -I../../include
27
28LVMLIBS = @LVM2APP_LIB@ -ldevmapper
29DEPLIBS = $(top_srcdir)/liblvm/liblvm2app.so $(top_srcdir)/libdm/libdevmapper.so
30
31DEFS += -D_REENTRANT
32
33include $(top_srcdir)/make.tmpl
34
35LDFLAGS = -L$(top_srcdir)/libdm -L$(top_srcdir)/liblvm
36
37ifeq ("@DMEVENTD@", "yes")
38	LVMLIBS += -ldevmapper-event -lpthread
39	LDFLAGS += -L$(top_srcdir)/daemons/dmeventd
40endif
41
42test_OBJECTS = $(test_SOURCES:.c=.o)
43vgtest_OBJECTS = $(vgtest_SOURCES:.c=.o)
44OBJECTS = $(test_OBJECTS) $(vgtest_OBJECTS)
45
46test: $(test_OBJECTS) $(DEPLIBS)
47	$(CC) -o test $(test_OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS)
48
49vgtest: $(vgtest_OBJECTS) $(DEPLIBS)
50	$(CC) -o vgtest $(vgtest_OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS)
51