selftests/exec: Remove pipe from TEST_GEN_FILES
[linux-2.6-microblaze.git] / tools / testing / selftests / exec / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 CFLAGS = -Wall
3 CFLAGS += -Wno-nonnull
4 CFLAGS += -D_GNU_SOURCE
5
6 TEST_PROGS := binfmt_script non-regular
7 TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216
8 TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
9 # Makefile is a run-time dependency, since it's accessed by the execveat test
10 TEST_FILES := Makefile
11
12 TEST_GEN_PROGS += recursion-depth
13
14 EXTRA_CLEAN := $(OUTPUT)/subdir.moved $(OUTPUT)/execveat.moved $(OUTPUT)/xxxxx* \
15                $(OUTPUT)/S_I*.test
16
17 include ../lib.mk
18
19 $(OUTPUT)/subdir:
20         mkdir -p $@
21 $(OUTPUT)/script:
22         echo '#!/bin/sh' > $@
23         echo 'exit $$*' >> $@
24         chmod +x $@
25 $(OUTPUT)/execveat.symlink: $(OUTPUT)/execveat
26         cd $(OUTPUT) && ln -s -f $(shell basename $<) $(shell basename $@)
27 $(OUTPUT)/execveat.denatured: $(OUTPUT)/execveat
28         cp $< $@
29         chmod -x $@
30 $(OUTPUT)/load_address_4096: load_address.c
31         $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,max-page-size=0x1000 -pie -static $< -o $@
32 $(OUTPUT)/load_address_2097152: load_address.c
33         $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,max-page-size=0x200000 -pie -static $< -o $@
34 $(OUTPUT)/load_address_16777216: load_address.c
35         $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,max-page-size=0x1000000 -pie -static $< -o $@