summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-04-08 19:44:53 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2021-04-12 09:54:15 +0200
commitaee0cd6530c6340f6f0a8256b887c8561f29dde6 (patch)
tree1bbff466a7f8f3ef9a2e870607daf7e62de2a37b /test/unit
parent01f108c4d03f848a84bff74104dd18b21c7a8e3f (diff)
downloadlvm2-aee0cd6530c6340f6f0a8256b887c8561f29dde6.tar.gz
makefiles: static linking enhancements
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/unit/Makefile b/test/unit/Makefile
index 7bc711719..455c18d2a 100644
--- a/test/unit/Makefile
+++ b/test/unit/Makefile
@@ -42,16 +42,19 @@ CLEAN_TARGETS += $(UNIT_DEPENDS) $(UNIT_OBJECTS) \
$(UNIT_SOURCE:%.c=%.gcno) \
$(UNIT_TARGET)
+lib/liblvm-internal.a: lib
+libdaemon/client/libdaemonclient.a: libdaemon
+
$(UNIT_TARGET): $(UNIT_OBJECTS) $(LVMINTERNAL_LIBS)
@echo " [LD] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) \
- -o $@ $+ $(DMEVENT_LIBS) $(SYSTEMD_LIBS) -L$(top_builddir)/libdm -ldevmapper $(LIBS) -laio
+ -o $@ $+ $(LVMLIBS)
-.PHONEY: run-unit-test unit-test
+.PHONY: run-unit-test unit-test
unit-test: $(UNIT_TARGET)
run-unit-test: $(UNIT_TARGET)
@echo "Running unit tests"
- LD_LIBRARY_PATH=libdm $(UNIT_TARGET) run
+ LD_LIBRARY_PATH=$(top_builddir)/libdm $(UNIT_TARGET) run
ifeq ("$(DEPENDS)","yes")
-include $(UNIT_SOURCE:%.c=%.d)