2012-03-29 05:42:56 +08:00
|
|
|
# Makefile for vm selftests
|
|
|
|
|
2015-09-23 05:58:52 +08:00
|
|
|
CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
|
2016-11-29 19:55:49 +08:00
|
|
|
LDLIBS = -lrt
|
2016-11-29 19:55:47 +08:00
|
|
|
TEST_GEN_FILES = compaction_test
|
|
|
|
TEST_GEN_FILES += hugepage-mmap
|
|
|
|
TEST_GEN_FILES += hugepage-shm
|
|
|
|
TEST_GEN_FILES += map_hugetlb
|
|
|
|
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
|
2017-02-26 07:32:53 +08:00
|
|
|
TEST_GEN_FILES += userfaultfd_hugetlb
|
|
|
|
TEST_GEN_FILES += userfaultfd_shmem
|
2016-11-29 19:55:47 +08:00
|
|
|
TEST_GEN_FILES += mlock-random-test
|
2012-03-29 05:42:56 +08:00
|
|
|
|
2015-03-11 12:05:59 +08:00
|
|
|
TEST_PROGS := run_vmtests
|
|
|
|
|
|
|
|
include ../lib.mk
|
2012-03-29 05:42:56 +08:00
|
|
|
|
2016-11-29 19:55:52 +08:00
|
|
|
$(OUTPUT)/userfaultfd: LDLIBS += -lpthread ../../../../usr/include/linux/kernel.h
|
2017-02-26 07:32:53 +08:00
|
|
|
|
|
|
|
$(OUTPUT)/userfaultfd_hugetlb: userfaultfd.c ../../../../usr/include/linux/kernel.h
|
2017-02-23 07:43:07 +08:00
|
|
|
$(CC) $(CFLAGS) -DHUGETLB_TEST -O2 -o $@ $< -lpthread
|
|
|
|
|
2017-02-26 07:32:53 +08:00
|
|
|
$(OUTPUT)/userfaultfd_shmem: userfaultfd.c ../../../../usr/include/linux/kernel.h
|
2017-02-23 07:43:46 +08:00
|
|
|
$(CC) $(CFLAGS) -DSHMEM_TEST -O2 -o $@ $< -lpthread
|
|
|
|
|
2016-11-29 19:55:52 +08:00
|
|
|
$(OUTPUT)/mlock-random-test: LDLIBS += -lcap
|
2016-10-08 07:59:46 +08:00
|
|
|
|
2015-09-23 05:58:55 +08:00
|
|
|
../../../../usr/include/linux/kernel.h:
|
|
|
|
make -C ../../../.. headers_install
|