1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
27bb0e7e3SCyril BurSIGNAL_CONTEXT_CHK_TESTS := tm-signal-context-chk-gpr tm-signal-context-chk-fpu \
3dd9bda47SCyril Bur	tm-signal-context-chk-vmx tm-signal-context-chk-vsx
4f10d4424SCyril Bur
588baa78dSbamvor.zhangjian@huawei.comTEST_GEN_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack \
6a08082f8SGustavo Romero	tm-vmxcopy tm-fork tm-tar tm-tmspr tm-vmx-unavail tm-unavailable tm-trap \
7a65329aaSBreno Leitao	$(SIGNAL_CONTEXT_CHK_TESTS) tm-sigreturn tm-signal-sigreturn-nt \
8915b7f6fSGustavo Luiz Duarte	tm-signal-context-force-tm tm-poison tm-signal-pagefault
996d01610SSam bobroff
10850507f3SPo-Hsu LinTEST_FILES := settings
11850507f3SPo-Hsu Lin
127e0cf1c9SMichael Ellermantop_srcdir = ../../../../..
1388baa78dSbamvor.zhangjian@huawei.cominclude ../../lib.mk
1496d01610SSam bobroff
1588baa78dSbamvor.zhangjian@huawei.com$(TEST_GEN_PROGS): ../harness.c ../utils.c
1696d01610SSam bobroff
17a431b946SCyril BurCFLAGS += -mhtm
18a431b946SCyril Bur
19a8ba798bSbamvor.zhangjian@huawei.com$(OUTPUT)/tm-syscall: tm-syscall-asm.S
20*4f11410bSMathieu Desnoyers$(OUTPUT)/tm-syscall: CFLAGS += $(KHDR_INCLUDES)
21a8ba798bSbamvor.zhangjian@huawei.com$(OUTPUT)/tm-tmspr: CFLAGS += -pthread
22cde97f84SMichael Neuling$(OUTPUT)/tm-vmx-unavail: CFLAGS += -pthread -m64
23b7abbd5aSMichael Ellerman$(OUTPUT)/tm-resched-dscr: ../pmu/lib.c
2477fad8bfSGustavo Romero$(OUTPUT)/tm-unavailable: CFLAGS += -O0 -pthread -m64 -Wno-error=uninitialized -mvsx
25a08082f8SGustavo Romero$(OUTPUT)/tm-trap: CFLAGS += -O0 -pthread -m64
26a65329aaSBreno Leitao$(OUTPUT)/tm-signal-context-force-tm: CFLAGS += -pthread -m64
27915b7f6fSGustavo Luiz Duarte$(OUTPUT)/tm-signal-pagefault: CFLAGS += -pthread -m64
286ba4a2d3SMichael Ellerman$(OUTPUT)/tm-poison: CFLAGS += -m64
297fe924d9SSam bobroff
3068bd42d9SMichael EllermanSIGNAL_CONTEXT_CHK_TESTS := $(patsubst %,$(OUTPUT)/%,$(SIGNAL_CONTEXT_CHK_TESTS))
31f10d4424SCyril Bur$(SIGNAL_CONTEXT_CHK_TESTS): tm-signal.S
32f10d4424SCyril Bur$(SIGNAL_CONTEXT_CHK_TESTS): CFLAGS += -mhtm -m64 -mvsx
33