xref: /openbmc/linux/tools/testing/selftests/powerpc/stringloops/Makefile (revision 4b4193256c8d3bc3a5397b5cd9494c2ad386317d)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
2521adf53SAnton Blanchard# The loops are all 64-bit code
3521adf53SAnton BlanchardCFLAGS += -I$(CURDIR)
4521adf53SAnton Blanchard
51bb07b59SChristophe LeroyEXTRA_SOURCES := ../harness.c
61bb07b59SChristophe Leroy
71bb07b59SChristophe Leroybuild_32bit = $(shell if ($(CC) $(CFLAGS) -m32 -o /dev/null memcmp.c >/dev/null 2>&1) then echo "1"; fi)
81bb07b59SChristophe Leroy
9f0abbfd8SChristophe LeroyTEST_GEN_PROGS := memcmp_64 strlen
101bb07b59SChristophe Leroy
11*872d11bcSMichael Ellerman$(OUTPUT)/memcmp_64: memcmp.c ../utils.c
121bb07b59SChristophe Leroy$(OUTPUT)/memcmp_64: CFLAGS += -m64 -maltivec
131bb07b59SChristophe Leroy
141bb07b59SChristophe Leroyifeq ($(build_32bit),1)
151bb07b59SChristophe Leroy$(OUTPUT)/memcmp_32: memcmp.c
161bb07b59SChristophe Leroy$(OUTPUT)/memcmp_32: CFLAGS += -m32
171bb07b59SChristophe Leroy
181bb07b59SChristophe LeroyTEST_GEN_PROGS += memcmp_32
191bb07b59SChristophe Leroyendif
201bb07b59SChristophe Leroy
21f0abbfd8SChristophe Leroy$(OUTPUT)/strlen: strlen.c string.c
22f0abbfd8SChristophe Leroy
23396ab6abSChristophe Leroyifeq ($(build_32bit),1)
24396ab6abSChristophe Leroy$(OUTPUT)/strlen_32: strlen.c
25396ab6abSChristophe Leroy$(OUTPUT)/strlen_32: CFLAGS += -m32
26396ab6abSChristophe Leroy
27396ab6abSChristophe LeroyTEST_GEN_PROGS += strlen_32
28396ab6abSChristophe Leroyendif
29396ab6abSChristophe Leroy
301bb07b59SChristophe LeroyASFLAGS = $(CFLAGS)
31521adf53SAnton Blanchard
327e0cf1c9SMichael Ellermantop_srcdir = ../../../../..
336faeeea4SMichael Ellermaninclude ../../lib.mk
34521adf53SAnton Blanchard
3588baa78dSbamvor.zhangjian@huawei.com$(TEST_GEN_PROGS): $(EXTRA_SOURCES)
36