Do not build lvm2api tests when lvm2api lib is not enabled.
endif
TARGETS =
+ifeq ("@APPLIB@", "yes")
+TARGETS += test
test_SOURCES = test.c
wrapper_SOURCES = test.c
INCLUDES += -I../../include
-UNIT = vgtest.t percent.t
+TARGETS += vgtest.t percent.t
+endif
LVMLIBS = @LVM2APP_LIB@ -ldevmapper
DEPLIBS = $(top_builddir)/liblvm/liblvm2app.so $(top_builddir)/libdm/libdevmapper.so
wrapper_OBJECTS = $(wrapper_SOURCES:.c=.o)
OBJECTS = $(test_OBJECTS)
-all: tests test
+all: tests
-tests: $(UNIT)
+tests: $(TARGETS)
test: $(test_OBJECTS) $(DEPLIBS)
$(CC) -o test $(test_OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS) $(READLINE_LIBS)