xref: /linux/tools/testing/selftests/landlock/Makefile (revision 960ed6ca4c46c1e7a44f3f7b8be2c147757459e4)
1# SPDX-License-Identifier: GPL-2.0
2#
3# First run: make -C ../../../.. headers_install
4
5CFLAGS += -Wall -O2 $(KHDR_INCLUDES)
6
7LOCAL_HDRS += common.h
8
9src_test := $(wildcard *_test.c)
10
11TEST_GEN_PROGS := $(src_test:.c=)
12
13TEST_GEN_PROGS_EXTENDED := \
14	true \
15	sandbox-and-launch \
16	wait-pipe \
17	wait-pipe-sandbox
18
19# Short targets:
20$(TEST_GEN_PROGS): LDLIBS += -lcap -lpthread
21$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static
22
23include ../lib.mk
24
25# Targets with $(OUTPUT)/ prefix:
26$(TEST_GEN_PROGS): LDLIBS += -lcap -lpthread
27$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static
28