xref: /linux/tools/testing/selftests/arm64/fp/Makefile (revision f057b57270c2a17d3f45c177e9434fa5745caa48)
1# SPDX-License-Identifier: GPL-2.0
2
3# A proper top_srcdir is needed by KSFT(lib.mk)
4top_srcdir = $(realpath ../../../../../)
5
6CFLAGS += $(KHDR_INCLUDES)
7
8TEST_GEN_PROGS := \
9	fp-ptrace \
10	fp-stress \
11	sve-ptrace sve-probe-vls \
12	vec-syscfg \
13	za-fork za-ptrace
14TEST_GEN_PROGS_EXTENDED := fp-pidbench fpsimd-test \
15	kernel-test \
16	rdvl-sme rdvl-sve \
17	sve-test \
18	ssve-test \
19	za-test \
20	zt-ptrace \
21	zt-test \
22	vlset
23TEST_PROGS_EXTENDED := fpsimd-stress sve-stress ssve-stress za-stress
24
25EXTRA_CLEAN += $(OUTPUT)/asm-utils.o $(OUTPUT)/rdvl.o $(OUTPUT)/za-fork-asm.o
26
27# Build with nolibc to avoid effects due to libc's clone() support
28$(OUTPUT)/fp-pidbench: fp-pidbench.S $(OUTPUT)/asm-utils.o
29	$(CC) -nostdlib $^ -o $@
30$(OUTPUT)/fp-ptrace: fp-ptrace.c fp-ptrace-asm.S
31$(OUTPUT)/fpsimd-test: fpsimd-test.S $(OUTPUT)/asm-utils.o
32	$(CC) -nostdlib $^ -o $@
33$(OUTPUT)/rdvl-sve: rdvl-sve.c $(OUTPUT)/rdvl.o
34$(OUTPUT)/rdvl-sme: rdvl-sme.c $(OUTPUT)/rdvl.o
35$(OUTPUT)/sve-ptrace: sve-ptrace.c
36$(OUTPUT)/sve-probe-vls: sve-probe-vls.c $(OUTPUT)/rdvl.o
37$(OUTPUT)/sve-test: sve-test.S $(OUTPUT)/asm-utils.o
38	$(CC) -nostdlib $^ -o $@
39$(OUTPUT)/ssve-test: sve-test.S $(OUTPUT)/asm-utils.o
40	$(CC) -DSSVE -nostdlib $^ -o $@
41$(OUTPUT)/vec-syscfg: vec-syscfg.c $(OUTPUT)/rdvl.o
42$(OUTPUT)/vlset: vlset.c
43$(OUTPUT)/za-fork: za-fork.c $(OUTPUT)/za-fork-asm.o
44	$(CC) -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \
45		-include ../../../../include/nolibc/nolibc.h -I../..\
46		-static -ffreestanding -Wall $^ -o $@
47$(OUTPUT)/za-ptrace: za-ptrace.c
48$(OUTPUT)/za-test: za-test.S $(OUTPUT)/asm-utils.o
49	$(CC) -nostdlib $^ -o $@
50$(OUTPUT)/zt-ptrace: zt-ptrace.c
51$(OUTPUT)/zt-test: zt-test.S $(OUTPUT)/asm-utils.o
52	$(CC) -nostdlib $^ -o $@
53
54include ../../lib.mk
55