GNU Linux-libre 4.9-gnu1
[releases.git] / tools / testing / selftests / exec / Makefile
1 CFLAGS = -Wall
2 BINARIES = execveat
3 DEPS = execveat.symlink execveat.denatured script subdir
4 all: $(BINARIES) $(DEPS)
5
6 subdir:
7         mkdir -p $@
8 script:
9         echo '#!/bin/sh' > $@
10         echo 'exit $$*' >> $@
11         chmod +x $@
12 execveat.symlink: execveat
13         ln -s -f $< $@
14 execveat.denatured: execveat
15         cp $< $@
16         chmod -x $@
17 %: %.c
18         $(CC) $(CFLAGS) -o $@ $^
19
20 TEST_PROGS := execveat
21 # Makefile is a run-time dependency, since it's accessed by the execveat test
22 TEST_FILES := $(DEPS) Makefile
23
24 include ../lib.mk
25
26 clean:
27         rm -rf $(BINARIES) $(DEPS) subdir.moved execveat.moved xxxxx*