diff options
Diffstat (limited to '')
-rw-r--r-- | tools/testing/selftests/landlock/Makefile | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/tools/testing/selftests/landlock/Makefile b/tools/testing/selftests/landlock/Makefile index a99596ca9882..348e2dbdb4e0 100644 --- a/tools/testing/selftests/landlock/Makefile +++ b/tools/testing/selftests/landlock/Makefile @@ -1,6 +1,10 @@ # SPDX-License-Identifier: GPL-2.0 +# +# First run: make -C ../../../.. headers_install -CFLAGS += -Wall -O2 +CFLAGS += -Wall -O2 $(KHDR_INCLUDES) + +LOCAL_HDRS += common.h src_test := $(wildcard *_test.c) @@ -8,17 +12,12 @@ TEST_GEN_PROGS := $(src_test:.c=) TEST_GEN_PROGS_EXTENDED := true -KSFT_KHDR_INSTALL := 1 -OVERRIDE_TARGETS := 1 -include ../lib.mk - -khdr_dir = $(top_srcdir)/usr/include +# Short targets: +$(TEST_GEN_PROGS): LDLIBS += -lcap +$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static -$(khdr_dir)/linux/landlock.h: khdr - @: - -$(OUTPUT)/true: true.c - $(LINK.c) $< $(LDLIBS) -o $@ -static +include ../lib.mk -$(OUTPUT)/%_test: %_test.c $(khdr_dir)/linux/landlock.h ../kselftest_harness.h common.h - $(LINK.c) $< $(LDLIBS) -o $@ -lcap -I$(khdr_dir) +# Targets with $(OUTPUT)/ prefix: +$(TEST_GEN_PROGS): LDLIBS += -lcap +$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static |