Makefile 1.1 KB
Newer Older
1
# SPDX-License-Identifier: GPL-2.0
2
# Makefile for vm selftests
3
uname_M := $(shell uname -m 2>/dev/null || echo not)
4
MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/')
5

6
CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
7
LDLIBS = -lrt
8
TEST_GEN_FILES = compaction_test
9
TEST_GEN_FILES += gup_benchmark
10 11 12
TEST_GEN_FILES += hugepage-mmap
TEST_GEN_FILES += hugepage-shm
TEST_GEN_FILES += map_hugetlb
13
TEST_GEN_FILES += map_fixed_noreplace
14
TEST_GEN_FILES += map_populate
15
TEST_GEN_FILES += mlock-random-test
16
TEST_GEN_FILES += mlock2-tests
17
TEST_GEN_FILES += mremap_dontunmap
18 19 20 21
TEST_GEN_FILES += on-fault-limit
TEST_GEN_FILES += thuge-gen
TEST_GEN_FILES += transhuge-stress
TEST_GEN_FILES += userfaultfd
22

23
ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64))
24
TEST_GEN_FILES += va_128TBswitch
25
TEST_GEN_FILES += virtual_address_range
26
TEST_GEN_FILES += write_to_hugetlbfs
27
endif
28

29 30
TEST_PROGS := run_vmtests

31 32
TEST_FILES := test_vmalloc.sh

33
KSFT_KHDR_INSTALL := 1
34
include ../lib.mk
35

36
$(OUTPUT)/userfaultfd: LDLIBS += -lpthread
37

38
$(OUTPUT)/mlock-random-test: LDLIBS += -lcap