If the kernel headers aren't installed we can't build all the tests. Add a new make target rule 'khdr' in the file lib.mk to generate the kernel headers and that gets include for every test-dir Makefile that includes lib.mk If the testdir in turn have its own sub-dirs the top_srcdir needs to be set to the linux-rootdir to be able to generate the kernel headers. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Fathi Boudra <fathi.boudra@linaro.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
32 lines
773 B
Makefile
32 lines
773 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Makefile for vm selftests
|
|
|
|
ifndef OUTPUT
|
|
OUTPUT := $(shell pwd)
|
|
endif
|
|
|
|
CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
|
|
LDLIBS = -lrt
|
|
TEST_GEN_FILES = compaction_test
|
|
TEST_GEN_FILES += gup_benchmark
|
|
TEST_GEN_FILES += hugepage-mmap
|
|
TEST_GEN_FILES += hugepage-shm
|
|
TEST_GEN_FILES += map_hugetlb
|
|
TEST_GEN_FILES += map_populate
|
|
TEST_GEN_FILES += mlock-random-test
|
|
TEST_GEN_FILES += mlock2-tests
|
|
TEST_GEN_FILES += on-fault-limit
|
|
TEST_GEN_FILES += thuge-gen
|
|
TEST_GEN_FILES += transhuge-stress
|
|
TEST_GEN_FILES += userfaultfd
|
|
TEST_GEN_FILES += va_128TBswitch
|
|
TEST_GEN_FILES += virtual_address_range
|
|
|
|
TEST_PROGS := run_vmtests
|
|
|
|
include ../lib.mk
|
|
|
|
$(OUTPUT)/userfaultfd: LDLIBS += -lpthread
|
|
|
|
$(OUTPUT)/mlock-random-test: LDLIBS += -lcap
|