xref: /openbmc/linux/tools/testing/selftests/arm64/fp/Makefile (revision 7482c19173b7eb044d476b3444d7ee55bc669d03)
1e093256dSMark Brown# SPDX-License-Identifier: GPL-2.0
2e093256dSMark Brown
33a23a42dSMark Brown# A proper top_srcdir is needed by KSFT(lib.mk)
43a23a42dSMark Browntop_srcdir = $(realpath ../../../../../)
53a23a42dSMark Brown
6*7482c191SMathieu DesnoyersCFLAGS += $(KHDR_INCLUDES)
73a23a42dSMark Brown
8fd5c2c6fSMark BrownTEST_GEN_PROGS := fp-stress \
9fd5c2c6fSMark Brown	sve-ptrace sve-probe-vls \
10fd5c2c6fSMark Brown	vec-syscfg \
11fd5c2c6fSMark Brown	za-fork za-ptrace
12a59f7a7fSMark BrownTEST_GEN_PROGS_EXTENDED := fp-pidbench fpsimd-test \
13a0f2eb64SMark Brown	rdvl-sme rdvl-sve \
14a59f7a7fSMark Brown	sve-test \
15a59f7a7fSMark Brown	ssve-test \
16a59f7a7fSMark Brown	za-test \
1777108610SMark Brown	vlset
18a59f7a7fSMark BrownTEST_PROGS_EXTENDED := fpsimd-stress sve-stress ssve-stress za-stress
19e093256dSMark Brown
20399cf0a3SMark BrownEXTRA_CLEAN += $(OUTPUT)/asm-utils.o $(OUTPUT)/rdvl.o $(OUTPUT)/za-fork-asm.o
21399cf0a3SMark Brown
22212b0426SMark Brown# Build with nolibc to avoid effects due to libc's clone() support
23aca43ad5SMark Brown$(OUTPUT)/fp-pidbench: fp-pidbench.S $(OUTPUT)/asm-utils.o
242c94ebedSMark Brown	$(CC) -nostdlib $^ -o $@
25aca43ad5SMark Brown$(OUTPUT)/fpsimd-test: fpsimd-test.S $(OUTPUT)/asm-utils.o
26e093256dSMark Brown	$(CC) -nostdlib $^ -o $@
27aca43ad5SMark Brown$(OUTPUT)/rdvl-sve: rdvl-sve.c $(OUTPUT)/rdvl.o
28aca43ad5SMark Brown$(OUTPUT)/rdvl-sme: rdvl-sme.c $(OUTPUT)/rdvl.o
29aca43ad5SMark Brown$(OUTPUT)/sve-ptrace: sve-ptrace.c
30aca43ad5SMark Brown$(OUTPUT)/sve-probe-vls: sve-probe-vls.c $(OUTPUT)/rdvl.o
31aca43ad5SMark Brown$(OUTPUT)/sve-test: sve-test.S $(OUTPUT)/asm-utils.o
32e093256dSMark Brown	$(CC) -nostdlib $^ -o $@
33aca43ad5SMark Brown$(OUTPUT)/ssve-test: sve-test.S $(OUTPUT)/asm-utils.o
344126bde0SMark Brown	$(CC) -DSSVE -nostdlib $^ -o $@
35aca43ad5SMark Brown$(OUTPUT)/vec-syscfg: vec-syscfg.c $(OUTPUT)/rdvl.o
36aca43ad5SMark Brown$(OUTPUT)/vlset: vlset.c
37aca43ad5SMark Brown$(OUTPUT)/za-fork: za-fork.c $(OUTPUT)/za-fork-asm.o
38aca43ad5SMark Brown	$(CC) -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \
39212b0426SMark Brown		-include ../../../../include/nolibc/nolibc.h \
40aca43ad5SMark Brown		-static -ffreestanding -Wall $^ -o $@
41aca43ad5SMark Brown$(OUTPUT)/za-ptrace: za-ptrace.c
42aca43ad5SMark Brown$(OUTPUT)/za-test: za-test.S $(OUTPUT)/asm-utils.o
435aa45cc5SMark Brown	$(CC) -nostdlib $^ -o $@
44e093256dSMark Brown
45e093256dSMark Browninclude ../../lib.mk
46