Mercurial > vec
annotate 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 | 
| rev | line source | 
|---|---|
| 37 
4b5a557aa64f
*: turns out extern is a practical joke. rewrite to be always inline again
 Paper <paper@tflc.us> parents: 
36diff
changeset | 1 CPPFLAGS += -O2 -I../include -Wall -Wpedantic -Werror=strict-aliasing | 
| 36 | 2 CFLAGS += $(CPPFLAGS) -std=c99 | 
| 3 CXXFLAGS += $(CPPFLAGS) -std=c++11 | |
| 4 | |
| 5 HEADERS = ../include/vec/vec.h \ | |
| 6 ../include/vec/impl/ppc/altivec.h \ | |
| 7 ../include/vec/impl/x86/avx2.h \ | |
| 8 ../include/vec/impl/x86/avx512f.h \ | |
| 9 ../include/vec/impl/x86/mmx.h \ | |
| 10 ../include/vec/impl/x86/sse2.h \ | |
| 11 ../include/vec/impl/x86/sse41.h \ | |
| 12 ../include/vec/impl/cpu.h \ | |
| 13 ../include/vec/impl/generic.h \ | |
| 14 test_align.h \ | |
| 15 test_arith.h \ | |
| 16 test_compare.h \ | |
| 37 
4b5a557aa64f
*: turns out extern is a practical joke. rewrite to be always inline again
 Paper <paper@tflc.us> parents: 
36diff
changeset | 17 test_shift.h \ | 
| 
4b5a557aa64f
*: turns out extern is a practical joke. rewrite to be always inline again
 Paper <paper@tflc.us> parents: 
36diff
changeset | 18 test_benchmark.h | 
| 36 | 19 BINS = test-generic test-host test-cxx | 
| 37 
4b5a557aa64f
*: turns out extern is a practical joke. rewrite to be always inline again
 Paper <paper@tflc.us> parents: 
36diff
changeset | 20 OBJS = test.o test-cxx.o test_benchmark_simple.o test_benchmark_vec.o | 
| 36 | 21 | 
| 22 .PHONY: all clean test | |
| 23 | |
| 24 all: $(BINS) | |
| 25 | |
| 37 
4b5a557aa64f
*: turns out extern is a practical joke. rewrite to be always inline again
 Paper <paper@tflc.us> parents: 
36diff
changeset | 26 test.o: test.c test_benchmark_simple.o test_benchmark_vec.o $(HEADERS) | 
| 36 | 27 $(CC) $(CFLAGS) -c -o $@ $< | 
| 28 | |
| 29 test-cxx.o: test.cc | |
| 30 $(CXX) $(CXXFLAGS) -c -o $@ $< | |
| 31 | |
| 37 
4b5a557aa64f
*: turns out extern is a practical joke. rewrite to be always inline again
 Paper <paper@tflc.us> parents: 
36diff
changeset | 32 test-generic: test.o test_benchmark_simple.o test_benchmark_vec.o | 
| 36 | 33 $(CC) $(LDFLAGS) -o $@ $^ | 
| 34 | |
| 37 
4b5a557aa64f
*: turns out extern is a practical joke. rewrite to be always inline again
 Paper <paper@tflc.us> parents: 
36diff
changeset | 35 test-host: test.o test_benchmark_simple.o test_benchmark_vec.o | 
| 36 | 36 $(CC) $(LDFLAGS) -o $@ $^ | 
| 37 | |
| 38 test-cxx: test-cxx.o $(HEADERS) | |
| 39 $(CXX) $(LDFLAGS) -o $@ $< | |
| 40 | |
| 41 clean: | |
| 42 $(RM) $(BINS) $(OBJS) | |
| 43 | |
| 44 test: clean $(BINS) | |
| 45 ./test-generic | |
| 46 ./test-host | |
| 47 ./test-cxx | 
