selftests/powerpc: Fix Makefiles for headers_install change
[linux-2.6-block.git] / tools / testing / selftests / powerpc / copyloops / Makefile
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
22d651dc
ME
2# The loops are all 64-bit code
3CFLAGS += -m64
4CFLAGS += -I$(CURDIR)
5CFLAGS += -D SELFTEST
8edcee0e 6CFLAGS += -maltivec
98c45f51 7CFLAGS += -mcpu=power4
22d651dc 8
b6f534d1
ME
9# Use our CFLAGS for the implicit .S rule & set the asm machine type
10ASFLAGS = $(CFLAGS) -Wa,-mpower4
22d651dc 11
98c45f51
PM
12TEST_GEN_PROGS := copyuser_64_t0 copyuser_64_t1 copyuser_64_t2 \
13 copyuser_p7_t0 copyuser_p7_t1 \
14 memcpy_64_t0 memcpy_64_t1 memcpy_64_t2 \
2679f63f
ME
15 memcpy_p7_t0 memcpy_p7_t1 \
16 copyuser_64_exc_t0 copyuser_64_exc_t1 copyuser_64_exc_t2
98c45f51 17
2679f63f 18EXTRA_SOURCES := validate.c ../harness.c stubs.S
22d651dc 19
7e0cf1c9 20top_srcdir = ../../../../..
88baa78d 21include ../../lib.mk
22d651dc 22
98c45f51
PM
23$(OUTPUT)/copyuser_64_t%: copyuser_64.S $(EXTRA_SOURCES)
24 $(CC) $(CPPFLAGS) $(CFLAGS) \
25 -D COPY_LOOP=test___copy_tofrom_user_base \
26 -D SELFTEST_CASE=$(subst copyuser_64_t,,$(notdir $@)) \
27 -o $@ $^
28
29$(OUTPUT)/copyuser_p7_t%: copyuser_power7.S $(EXTRA_SOURCES)
30 $(CC) $(CPPFLAGS) $(CFLAGS) \
31 -D COPY_LOOP=test___copy_tofrom_user_power7 \
32 -D SELFTEST_CASE=$(subst copyuser_p7_t,,$(notdir $@)) \
33 -o $@ $^
34
35# Strictly speaking, we only need the memcpy_64 test cases for big-endian
36$(OUTPUT)/memcpy_64_t%: memcpy_64.S $(EXTRA_SOURCES)
37 $(CC) $(CPPFLAGS) $(CFLAGS) \
38 -D COPY_LOOP=test_memcpy \
39 -D SELFTEST_CASE=$(subst memcpy_64_t,,$(notdir $@)) \
40 -o $@ $^
22d651dc 41
98c45f51
PM
42$(OUTPUT)/memcpy_p7_t%: memcpy_power7.S $(EXTRA_SOURCES)
43 $(CC) $(CPPFLAGS) $(CFLAGS) \
44 -D COPY_LOOP=test_memcpy_power7 \
45 -D SELFTEST_CASE=$(subst memcpy_p7_t,,$(notdir $@)) \
46 -o $@ $^
2679f63f
ME
47
48$(OUTPUT)/copyuser_64_exc_t%: copyuser_64.S exc_validate.c ../harness.c \
49 copy_tofrom_user_reference.S stubs.S
50 $(CC) $(CPPFLAGS) $(CFLAGS) \
51 -D COPY_LOOP=test___copy_tofrom_user_base \
52 -D SELFTEST_CASE=$(subst copyuser_64_exc_t,,$(notdir $@)) \
53 -o $@ $^