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 9*f0abbfd8SChristophe LeroyTEST_GEN_PROGS := memcmp_64 strlen 101bb07b59SChristophe Leroy 111bb07b59SChristophe Leroy$(OUTPUT)/memcmp_64: memcmp.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 21*f0abbfd8SChristophe Leroy$(OUTPUT)/strlen: strlen.c string.c 22*f0abbfd8SChristophe Leroy 231bb07b59SChristophe LeroyASFLAGS = $(CFLAGS) 24521adf53SAnton Blanchard 256faeeea4SMichael Ellermaninclude ../../lib.mk 26521adf53SAnton Blanchard 2788baa78dS[email protected]$(TEST_GEN_PROGS): $(EXTRA_SOURCES) 28