1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2521adf53SAnton Blanchard# The loops are all 64-bit code 3521adf53SAnton BlanchardCFLAGS += -I$(CURDIR) 4521adf53SAnton Blanchard 5*1bb07b59SChristophe LeroyEXTRA_SOURCES := ../harness.c 6*1bb07b59SChristophe Leroy 7*1bb07b59SChristophe Leroybuild_32bit = $(shell if ($(CC) $(CFLAGS) -m32 -o /dev/null memcmp.c >/dev/null 2>&1) then echo "1"; fi) 8*1bb07b59SChristophe Leroy 9*1bb07b59SChristophe LeroyTEST_GEN_PROGS := memcmp_64 10*1bb07b59SChristophe Leroy 11*1bb07b59SChristophe Leroy$(OUTPUT)/memcmp_64: memcmp.c 12*1bb07b59SChristophe Leroy$(OUTPUT)/memcmp_64: CFLAGS += -m64 -maltivec 13*1bb07b59SChristophe Leroy 14*1bb07b59SChristophe Leroyifeq ($(build_32bit),1) 15*1bb07b59SChristophe Leroy$(OUTPUT)/memcmp_32: memcmp.c 16*1bb07b59SChristophe Leroy$(OUTPUT)/memcmp_32: CFLAGS += -m32 17*1bb07b59SChristophe Leroy 18*1bb07b59SChristophe LeroyTEST_GEN_PROGS += memcmp_32 19*1bb07b59SChristophe Leroyendif 20*1bb07b59SChristophe Leroy 21*1bb07b59SChristophe LeroyASFLAGS = $(CFLAGS) 22521adf53SAnton Blanchard 236faeeea4SMichael Ellermaninclude ../../lib.mk 24521adf53SAnton Blanchard 2588baa78dS[email protected]$(TEST_GEN_PROGS): $(EXTRA_SOURCES) 26