1# SPDX-License-Identifier: GPL-2.0 2# The loops are all 64-bit code 3CFLAGS += -I$(CURDIR) 4 5EXTRA_SOURCES := ../harness.c 6 7build_32bit = $(shell if ($(CC) $(CFLAGS) -m32 -o /dev/null memcmp.c >/dev/null 2>&1) then echo "1"; fi) 8 9TEST_GEN_PROGS := memcmp_64 strlen 10 11$(OUTPUT)/memcmp_64: memcmp.c 12$(OUTPUT)/memcmp_64: CFLAGS += -m64 -maltivec 13 14ifeq ($(build_32bit),1) 15$(OUTPUT)/memcmp_32: memcmp.c 16$(OUTPUT)/memcmp_32: CFLAGS += -m32 17 18TEST_GEN_PROGS += memcmp_32 19endif 20 21$(OUTPUT)/strlen: strlen.c string.c 22 23ASFLAGS = $(CFLAGS) 24 25include ../../lib.mk 26 27$(TEST_GEN_PROGS): $(EXTRA_SOURCES) 28