Mercurial > vec
view test/Makefile @ 8:6e0eb3aa12ab
build: add files to build vec as an external library
this is most definitely a double-edged sword, but you can
do it now if you *really* want to
author | Paper <paper@tflc.us> |
---|---|
date | Wed, 23 Oct 2024 20:44:30 -0400 |
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