view test/Makefile @ 11:13575ba795d3

impl/gcc: add native 256-bit and 512-bit intrinsics these are simple to implement. At some point I'd like to refactor vec into using a union and being able to detect AVX512 and friends at compile time, so that the processors that *can* use it are enabled at runtime. This would mean adding a vec_init function, which isn't that big of a deal and can just be run at startup anyway and will grab the CPU flags we need.
author Paper <paper@tflc.us>
date Mon, 18 Nov 2024 16:12:24 -0500
parents 3c5545b1568f
children
line wrap: on
line source

CFLAGS += -std=c99 -I../include

# binary files
BINS = test-gcc test-generic test-host
OBJS = $(BINS:=.o)

.PHONY: all clean test

all: $(BINS)

# suppress the platform-dependent hardware stuff so we only have
# GCC vector extensions
test-gcc: CFLAGS += -DVEC_SUPPRESS_HW

# also suppress GCC extensions, leaving only the defaults
test-generic: CFLAGS += -DVEC_SUPPRESS_HW -DVEC_SUPPRESS_GCC

$(OBJS): main.c
	$(CC) $(CFLAGS) -o $@ -c $^

$(BINS): %: %.o
	$(CC) $(LDFLAGS) -o $@ $^

clean:
	$(RM) $(BINS) $(OBJS)

test: clean $(BINS)
	./test-gcc
	./test-generic
	./test-host