diff test/Makefile.template @ 37:4b5a557aa64f

*: turns out extern is a practical joke. rewrite to be always inline again the sample benchmark performs about 3x as well with optimizations disabled :)
author Paper <paper@tflc.us>
date Sat, 26 Apr 2025 01:04:35 -0400
parents 677c03c382b8
children f9ca85d2f14c
line wrap: on
line diff
--- a/test/Makefile.template	Fri Apr 25 17:40:55 2025 -0400
+++ b/test/Makefile.template	Sat Apr 26 01:04:35 2025 -0400
@@ -1,4 +1,4 @@
-CPPFLAGS += -g -O2 -I../include -Wall -Wpedantic -Werror=strict-aliasing
+CPPFLAGS += -O2 -I../include -Wall -Wpedantic -Werror=strict-aliasing
 CFLAGS += $(CPPFLAGS) -std=c99
 CXXFLAGS += $(CPPFLAGS) -std=c++11
 
@@ -10,35 +10,29 @@
 	../include/vec/impl/x86/sse2.h \
 	../include/vec/impl/x86/sse41.h \
 	../include/vec/impl/cpu.h \
-	../include/vec/impl/fallback.h \
 	../include/vec/impl/generic.h \
 	test_align.h \
 	test_arith.h \
 	test_compare.h \
-	test_shift.h
+	test_shift.h \
+	test_benchmark.h
 BINS = test-generic test-host test-cxx
-OBJS = vec-generic.o vec-host.o test.o test-cxx.o
+OBJS = test.o test-cxx.o test_benchmark_simple.o test_benchmark_vec.o
 
 .PHONY: all clean test
 
 all: $(BINS)
 
-vec-generic.o: ../src/vec.c $(HEADERS)
-	$(CC) $(CFLAGS) -DVEC_SUPPRESS_HW=1 -c -o $@ $<
-
-vec-host.o: ../src/vec.c $(HEADERS)
-	$(CC) $(CFLAGS) -c -o $@ $<
-
-test.o: test.c
+test.o: test.c test_benchmark_simple.o test_benchmark_vec.o $(HEADERS)
 	$(CC) $(CFLAGS) -c -o $@ $<
 
 test-cxx.o: test.cc
 	$(CXX) $(CXXFLAGS) -c -o $@ $<
 
-test-generic: vec-generic.o test.o
+test-generic: test.o test_benchmark_simple.o test_benchmark_vec.o
 	$(CC) $(LDFLAGS) -o $@ $^
 
-test-host: vec-host.o test.o
+test-host: test.o test_benchmark_simple.o test_benchmark_vec.o
 	$(CC) $(LDFLAGS) -o $@ $^
 
 test-cxx: test-cxx.o $(HEADERS)