18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ciSIGNAL_CONTEXT_CHK_TESTS := tm-signal-context-chk-gpr tm-signal-context-chk-fpu \
38c2ecf20Sopenharmony_ci	tm-signal-context-chk-vmx tm-signal-context-chk-vsx
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciTEST_GEN_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack \
68c2ecf20Sopenharmony_ci	tm-vmxcopy tm-fork tm-tar tm-tmspr tm-vmx-unavail tm-unavailable tm-trap \
78c2ecf20Sopenharmony_ci	$(SIGNAL_CONTEXT_CHK_TESTS) tm-sigreturn tm-signal-sigreturn-nt \
88c2ecf20Sopenharmony_ci	tm-signal-context-force-tm tm-poison tm-signal-pagefault
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciTEST_FILES := settings
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_citop_srcdir = ../../../../..
138c2ecf20Sopenharmony_ciinclude ../../lib.mk
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci$(TEST_GEN_PROGS): ../harness.c ../utils.c
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciCFLAGS += -mhtm
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci$(OUTPUT)/tm-syscall: tm-syscall-asm.S
208c2ecf20Sopenharmony_ci$(OUTPUT)/tm-syscall: CFLAGS += -I../../../../../usr/include
218c2ecf20Sopenharmony_ci$(OUTPUT)/tm-tmspr: CFLAGS += -pthread
228c2ecf20Sopenharmony_ci$(OUTPUT)/tm-vmx-unavail: CFLAGS += -pthread -m64
238c2ecf20Sopenharmony_ci$(OUTPUT)/tm-resched-dscr: ../pmu/lib.c
248c2ecf20Sopenharmony_ci$(OUTPUT)/tm-unavailable: CFLAGS += -O0 -pthread -m64 -Wno-error=uninitialized -mvsx
258c2ecf20Sopenharmony_ci$(OUTPUT)/tm-trap: CFLAGS += -O0 -pthread -m64
268c2ecf20Sopenharmony_ci$(OUTPUT)/tm-signal-context-force-tm: CFLAGS += -pthread -m64
278c2ecf20Sopenharmony_ci$(OUTPUT)/tm-signal-pagefault: CFLAGS += -pthread -m64
288c2ecf20Sopenharmony_ci$(OUTPUT)/tm-poison: CFLAGS += -m64
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ciSIGNAL_CONTEXT_CHK_TESTS := $(patsubst %,$(OUTPUT)/%,$(SIGNAL_CONTEXT_CHK_TESTS))
318c2ecf20Sopenharmony_ci$(SIGNAL_CONTEXT_CHK_TESTS): tm-signal.S
328c2ecf20Sopenharmony_ci$(SIGNAL_CONTEXT_CHK_TESTS): CFLAGS += -mhtm -m64 -mvsx
33