]> git.feebdaed.xyz Git - 0xmirror/xdp-tools.git/commitdiff
libxdp: Make sure to build the test files as part of the regular compile
authorToke Høiland-Jørgensen <toke@redhat.com>
Thu, 18 Sep 2025 11:16:42 +0000 (13:16 +0200)
committerToke Høiland-Jørgensen <toke@toke.dk>
Fri, 19 Sep 2025 14:06:08 +0000 (16:06 +0200)
Add a dependency to build the test helpers as part of the normal
compile; otherwise they won't be built until the 'make test' target is
run.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
lib/libxdp/Makefile

index 4716fb00be952e9465e68d58fc1f1d85a41fa3a3..0c02f06ef4f5be8049fc89fee2a4c5f5a799c4a1 100644 (file)
@@ -39,7 +39,7 @@ VERSION_SCRIPT := libxdp.map
 CHECK_RULES := check_abi
 endif
 
-all: $(STATIC_LIBS) $(SHARED_LIBS) $(XDP_OBJS) $(PC_FILE) check man
+all: $(STATIC_LIBS) $(SHARED_LIBS) $(XDP_OBJS) $(PC_FILE) check man build_tests
 
 clean:
        $(Q)rm -f $(STATIC_LIBS) $(STATIC_OBJS) $(SHARED_LIBS) $(SHARED_OBJS) $(XDP_OBJS) $(PC_FILE) $(MAN_OBJ) $(TEMPLATED_SOURCES) *.ll
@@ -153,6 +153,10 @@ $(MAN_PAGE): $(MAN_OBJ) $(LIBMK)
 
 endif
 
+.PHONY: build_tests
+build_tests: $(SHARED_LIBS) $(STATIC_LIBS)
+       $(Q)$(MAKE) -C $(TEST_DIR)
+
 .PHONY: test
 test: all
        $(Q)$(MAKE) -C $(TEST_DIR) run