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