17cf6198cSAndy Chiu# SPDX-License-Identifier: GPL-2.0
27cf6198cSAndy Chiu# Copyright (C) 2021 ARM Limited
37cf6198cSAndy Chiu# Originally tools/testing/arm64/abi/Makefile
47cf6198cSAndy Chiu
5*5c93c4c7SAndy ChiuTEST_GEN_PROGS := vstate_prctl v_initval_nolibc
67cf6198cSAndy ChiuTEST_GEN_PROGS_EXTENDED := vstate_exec_nolibc
77cf6198cSAndy Chiu
87cf6198cSAndy Chiuinclude ../../lib.mk
97cf6198cSAndy Chiu
107cf6198cSAndy Chiu$(OUTPUT)/vstate_prctl: vstate_prctl.c ../hwprobe/sys_hwprobe.S
117cf6198cSAndy Chiu	$(CC) -static -o$@ $(CFLAGS) $(LDFLAGS) $^
127cf6198cSAndy Chiu
137cf6198cSAndy Chiu$(OUTPUT)/vstate_exec_nolibc: vstate_exec_nolibc.c
147cf6198cSAndy Chiu	$(CC) -nostdlib -static -include ../../../../include/nolibc/nolibc.h \
157cf6198cSAndy Chiu		-Wall $(CFLAGS) $(LDFLAGS) $^ -o $@ -lgcc
16*5c93c4c7SAndy Chiu
17*5c93c4c7SAndy Chiu$(OUTPUT)/v_initval_nolibc: v_initval_nolibc.c
18*5c93c4c7SAndy Chiu	$(CC) -nostdlib -static -include ../../../../include/nolibc/nolibc.h \
19*5c93c4c7SAndy Chiu		-Wall $(CFLAGS) $(LDFLAGS) $^ -o $@ -lgcc
20