xref: /linux/tools/testing/selftests/powerpc/tm/Makefile (revision ff2632d7d08edc11e8bd0629e9fcfebab25c78b4)
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
14include ../flags.mk
15
16$(TEST_GEN_PROGS): ../harness.c ../utils.c
17
18CFLAGS += -mhtm
19
20$(OUTPUT)/tm-syscall: tm-syscall-asm.S
21$(OUTPUT)/tm-syscall: CFLAGS += $(KHDR_INCLUDES)
22$(OUTPUT)/tm-tmspr: CFLAGS += -pthread
23$(OUTPUT)/tm-vmx-unavail: CFLAGS += -pthread -m64
24$(OUTPUT)/tm-resched-dscr: ../pmu/lib.c
25$(OUTPUT)/tm-unavailable: CFLAGS += -O0 -pthread -m64 -Wno-error=uninitialized -mvsx
26$(OUTPUT)/tm-trap: CFLAGS += -O0 -pthread -m64
27$(OUTPUT)/tm-signal-context-force-tm: CFLAGS += -pthread -m64
28$(OUTPUT)/tm-signal-pagefault: CFLAGS += -pthread -m64
29$(OUTPUT)/tm-poison: CFLAGS += -m64
30
31SIGNAL_CONTEXT_CHK_TESTS := $(patsubst %,$(OUTPUT)/%,$(SIGNAL_CONTEXT_CHK_TESTS))
32$(SIGNAL_CONTEXT_CHK_TESTS): tm-signal.S
33$(SIGNAL_CONTEXT_CHK_TESTS): CFLAGS += -mhtm -m64 -mvsx
34