xref: /linux/tools/testing/selftests/landlock/Makefile (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
1e1199815SMickaël Salaün# SPDX-License-Identifier: GPL-2.0
2a5254052SMickaël Salaün#
3a5254052SMickaël Salaün# First run: make -C ../../../.. headers_install
4e1199815SMickaël Salaün
5cb542c66SMuhammad Usama AnjumCFLAGS += -Wall -O2 $(KHDR_INCLUDES)
6a5254052SMickaël Salaün
7a5254052SMickaël SalaünLOCAL_HDRS += common.h
8e1199815SMickaël Salaün
9e1199815SMickaël Salaünsrc_test := $(wildcard *_test.c)
10e1199815SMickaël Salaün
11e1199815SMickaël SalaünTEST_GEN_PROGS := $(src_test:.c=)
12e1199815SMickaël Salaün
13e1199815SMickaël SalaünTEST_GEN_PROGS_EXTENDED := true
14e1199815SMickaël Salaün
15*091873e4SMickaël Salaün# Short targets:
16*091873e4SMickaël Salaün$(TEST_GEN_PROGS): LDLIBS += -lcap
17a5254052SMickaël Salaün$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static
18a5254052SMickaël Salaün
19e1199815SMickaël Salaüninclude ../lib.mk
20e1199815SMickaël Salaün
21*091873e4SMickaël Salaün# Targets with $(OUTPUT)/ prefix:
22*091873e4SMickaël Salaün$(TEST_GEN_PROGS): LDLIBS += -lcap
23a5254052SMickaël Salaün$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static
24