WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / powerpc / stringloops / Makefile
blob9c39f55a58ff3d00569504a443f8b1642628c63a
1 # SPDX-License-Identifier: GPL-2.0
2 # The loops are all 64-bit code
3 CFLAGS += -I$(CURDIR)
5 EXTRA_SOURCES := ../harness.c
7 build_32bit = $(shell if ($(CC) $(CFLAGS) -m32 -o /dev/null memcmp.c >/dev/null 2>&1) then echo "1"; fi)
9 TEST_GEN_PROGS := memcmp_64 strlen
11 $(OUTPUT)/memcmp_64: memcmp.c ../utils.c
12 $(OUTPUT)/memcmp_64: CFLAGS += -m64 -maltivec
14 ifeq ($(build_32bit),1)
15 $(OUTPUT)/memcmp_32: memcmp.c
16 $(OUTPUT)/memcmp_32: CFLAGS += -m32
18 TEST_GEN_PROGS += memcmp_32
19 endif
21 $(OUTPUT)/strlen: strlen.c string.c
23 ifeq ($(build_32bit),1)
24 $(OUTPUT)/strlen_32: strlen.c
25 $(OUTPUT)/strlen_32: CFLAGS += -m32
27 TEST_GEN_PROGS += strlen_32
28 endif
30 ASFLAGS = $(CFLAGS)
32 top_srcdir = ../../../../..
33 include ../../lib.mk
35 $(TEST_GEN_PROGS): $(EXTRA_SOURCES)