comparison test/Makefile.template @ 15:e05c257c6a23

*: huge refactor, add many new x86 intrinsics and the like ALSO!! now intrinsics are enabled at runtime, depending on what is detected. altivec *should* still work but I only tested compiling it. the major version has been updated to 2.0 for this...
author Paper <paper@tflc.us>
date Wed, 20 Nov 2024 04:10:37 -0500
parents
children 41dd962abdd1
comparison
equal deleted inserted replaced
14:981cf0bc7f3a 15:e05c257c6a23
1 CFLAGS += -g -O2 -std=c99 -I../include
2
3 HEADERS = ../include/vec/vec.h \
4 ../include/vec/impl/ppc/altivec.h \
5 ../include/vec/impl/x86/avx2.h \
6 ../include/vec/impl/x86/avx512f.h \
7 ../include/vec/impl/x86/mmx.h \
8 ../include/vec/impl/x86/sse2.h \
9 ../include/vec/impl/x86/sse41.h \
10 ../include/vec/impl/cpu.h \
11 ../include/vec/impl/fallback.h \
12 ../include/vec/impl/generic.h
13 BINS = test-generic test-host
14 OBJS = vec-generic.o vec-host.o test.o
15
16 .PHONY: all clean test
17
18 all: $(BINS)
19
20 vec-generic.o: ../src/vec.c
21 $(CC) $(CFLAGS) -DVEC_SUPPRESS_HW=1 -c -o $@ $<
22
23 vec-host.o: ../src/vec.c
24 $(CC) $(CFLAGS) -c -o $@ $<
25
26 test.o: test.c
27 $(CC) $(CFLAGS) -c -o $@ $<
28
29 test-generic: vec-generic.o test.o
30 $(CC) $(LDFLAGS) -o $@ $^
31
32 test-host: vec-host.o test.o
33 $(CC) $(LDFLAGS) -o $@ $^
34
35 clean:
36 $(RM) $(BINS) $(OBJS)
37
38 test: clean $(BINS)
39 ./test-generic
40 ./test-host