1 # SPDX-License-Identifier: GPL-2.0 2 EXTRA_SOURCES := ../harness.c 3 4 build_32bit = $(shell if ($(CC) $(CFLAGS) -m32 -o /dev/null memcmp.c >/dev/null 2>&1) then echo "1"; fi) 5 6 TEST_GEN_PROGS := memcmp_64 strlen 7 8 $(OUTPUT)/memcmp_64: memcmp.c ../utils.c 9 $(OUTPUT)/memcmp_64: CFLAGS += -m64 -maltivec 10 11 ifeq ($(build_32bit),1) 12 $(OUTPUT)/memcmp_32: memcmp.c 13 $(OUTPUT)/memcmp_32: CFLAGS += -m32 14 15 TEST_GEN_PROGS += memcmp_32 16 endif 17 18 $(OUTPUT)/strlen: strlen.c string.c 19 20 ifeq ($(build_32bit),1) 21 $(OUTPUT)/strlen_32: strlen.c 22 $(OUTPUT)/strlen_32: CFLAGS += -m32 23 24 TEST_GEN_PROGS += strlen_32 25 endif 26 27 top_srcdir = ../../../../.. 28 include ../../lib.mk 29 include ../flags.mk 30 31 # The loops are all 64-bit code 32 CFLAGS += -I$(CURDIR) 33 34 ASFLAGS = $(CFLAGS) 35 36 $(TEST_GEN_PROGS): $(EXTRA_SOURCES)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.