1 # SPDX-License-Identifier: GPL-2.0
3 # A proper top_srcdir is needed by KSFT(lib.mk)
4 top_srcdir
= $(realpath ..
/..
/..
/..
/..
/)
6 CFLAGS
+= $(KHDR_INCLUDES
)
11 sve-ptrace sve-probe-vls \
14 TEST_GEN_PROGS_EXTENDED
:= fp-pidbench fpsimd-test \
23 TEST_PROGS_EXTENDED
:= fpsimd-stress sve-stress ssve-stress za-stress
25 EXTRA_CLEAN
+= $(OUTPUT
)/asm-utils.o
$(OUTPUT
)/rdvl.o
$(OUTPUT
)/za-fork-asm.o
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
$@