1# Makefile for vm selftests 2 3CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) 4BINARIES = compaction_test 5BINARIES += hugepage-mmap 6BINARIES += hugepage-shm 7BINARIES += map_hugetlb 8BINARIES += mlock2-tests 9BINARIES += on-fault-limit 10BINARIES += thuge-gen 11BINARIES += transhuge-stress 12BINARIES += userfaultfd 13 14all: $(BINARIES) 15%: %.c 16 $(CC) $(CFLAGS) -o $@ $^ -lrt 17userfaultfd: userfaultfd.c ../../../../usr/include/linux/kernel.h 18 $(CC) $(CFLAGS) -O2 -o $@ $< -lpthread 19 20../../../../usr/include/linux/kernel.h: 21 make -C ../../../.. headers_install 22 23TEST_PROGS := run_vmtests 24TEST_FILES := $(BINARIES) 25 26include ../lib.mk 27 28clean: 29 $(RM) $(BINARIES) 30