Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / tools / testing / selftests / exec / Makefile
1 CC = $(CROSS_COMPILE)gcc
2 CFLAGS = -Wall
3 BINARIES = execveat
4 DEPS = execveat.symlink execveat.denatured script subdir
5 all: $(BINARIES) $(DEPS)
6
7 subdir:
8         mkdir -p $@
9 script:
10         echo '#!/bin/sh' > $@
11         echo 'exit $$*' >> $@
12         chmod +x $@
13 execveat.symlink: execveat
14         ln -s -f $< $@
15 execveat.denatured: execveat
16         cp $< $@
17         chmod -x $@
18 %: %.c
19         $(CC) $(CFLAGS) -o $@ $^
20
21 run_tests: all
22         ./execveat
23
24 clean:
25         rm -rf $(BINARIES) $(DEPS) subdir.moved execveat.moved xxxxx*