Dave Young | f0f57b2 | 2012-03-28 14:42:56 -0700 | [diff] [blame] | 1 | # Makefile for vm selftests |
| 2 | |
Thierry Reding | d0a8711 | 2015-09-22 14:58:52 -0700 | [diff] [blame] | 3 | CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) |
Sri Jayaramappa | bd67d5c | 2015-04-23 14:21:41 -0400 | [diff] [blame] | 4 | BINARIES = compaction_test |
| 5 | BINARIES += hugepage-mmap |
| 6 | BINARIES += hugepage-shm |
Sri Jayaramappa | bd67d5c | 2015-04-23 14:21:41 -0400 | [diff] [blame] | 7 | BINARIES += map_hugetlb |
Eric B Munson | b3b0d09 | 2015-11-05 18:51:43 -0800 | [diff] [blame] | 8 | BINARIES += mlock2-tests |
| 9 | BINARIES += on-fault-limit |
Sri Jayaramappa | bd67d5c | 2015-04-23 14:21:41 -0400 | [diff] [blame] | 10 | BINARIES += thuge-gen |
Konstantin Khlebnikov | 0085d61 | 2014-10-09 15:29:34 -0700 | [diff] [blame] | 11 | BINARIES += transhuge-stress |
Andrea Arcangeli | c47174f | 2015-09-04 15:47:23 -0700 | [diff] [blame] | 12 | BINARIES += userfaultfd |
Dave Young | f0f57b2 | 2012-03-28 14:42:56 -0700 | [diff] [blame] | 13 | |
Joern Engel | fc256f0 | 2013-07-03 15:09:18 -0700 | [diff] [blame] | 14 | all: $(BINARIES) |
Dave Young | f0f57b2 | 2012-03-28 14:42:56 -0700 | [diff] [blame] | 15 | %: %.c |
Andrey Skvortsov | f5db310 | 2015-01-07 21:35:54 +0300 | [diff] [blame] | 16 | $(CC) $(CFLAGS) -o $@ $^ -lrt |
Andrea Arcangeli | 67f6a02 | 2015-09-22 14:58:55 -0700 | [diff] [blame] | 17 | userfaultfd: 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 |
Dave Young | f0f57b2 | 2012-03-28 14:42:56 -0700 | [diff] [blame] | 22 | |
Michael Ellerman | 5e29a91 | 2015-03-11 15:05:59 +1100 | [diff] [blame] | 23 | TEST_PROGS := run_vmtests |
Michael Ellerman | 32dcfba | 2015-03-11 15:06:00 +1100 | [diff] [blame] | 24 | TEST_FILES := $(BINARIES) |
Michael Ellerman | 5e29a91 | 2015-03-11 15:05:59 +1100 | [diff] [blame] | 25 | |
| 26 | include ../lib.mk |
Dave Young | f0f57b2 | 2012-03-28 14:42:56 -0700 | [diff] [blame] | 27 | |
| 28 | clean: |
Joern Engel | fc256f0 | 2013-07-03 15:09:18 -0700 | [diff] [blame] | 29 | $(RM) $(BINARIES) |