1# SPDX-License-Identifier: GPL-2.0
2SIGNAL_CONTEXT_CHK_TESTS := tm-signal-context-chk-gpr tm-signal-context-chk-fpu \
3	tm-signal-context-chk-vmx tm-signal-context-chk-vsx
4
5TEST_GEN_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack \
6	tm-vmxcopy tm-fork tm-tar tm-tmspr tm-vmx-unavail tm-unavailable tm-trap \
7	$(SIGNAL_CONTEXT_CHK_TESTS) tm-sigreturn tm-signal-sigreturn-nt \
8	tm-signal-context-force-tm tm-poison tm-signal-pagefault
9
10TEST_FILES := settings
11
12top_srcdir = ../../../../..
13include ../../lib.mk
14
15$(TEST_GEN_PROGS): ../harness.c ../utils.c
16
17CFLAGS += -mhtm
18
19$(OUTPUT)/tm-syscall: tm-syscall-asm.S
20$(OUTPUT)/tm-syscall: CFLAGS += $(KHDR_INCLUDES)
21$(OUTPUT)/tm-tmspr: CFLAGS += -pthread
22$(OUTPUT)/tm-vmx-unavail: CFLAGS += -pthread -m64
23$(OUTPUT)/tm-resched-dscr: ../pmu/lib.c
24$(OUTPUT)/tm-unavailable: CFLAGS += -O0 -pthread -m64 -Wno-error=uninitialized -mvsx
25$(OUTPUT)/tm-trap: CFLAGS += -O0 -pthread -m64
26$(OUTPUT)/tm-signal-context-force-tm: CFLAGS += -pthread -m64
27$(OUTPUT)/tm-signal-pagefault: CFLAGS += -pthread -m64
28$(OUTPUT)/tm-poison: CFLAGS += -m64
29
30SIGNAL_CONTEXT_CHK_TESTS := $(patsubst %,$(OUTPUT)/%,$(SIGNAL_CONTEXT_CHK_TESTS))
31$(SIGNAL_CONTEXT_CHK_TESTS): tm-signal.S
32$(SIGNAL_CONTEXT_CHK_TESTS): CFLAGS += -mhtm -m64 -mvsx
33