annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
1 CFLAGS += -std=c99 -I../include
2
f12b5dd4e18c *: many new operations and a real test suite
Paper <paper@tflc.us>
parents:
diff changeset
2
3
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
3 # binary files
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
4 BINS = test-gcc test-generic test-host
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
5 OBJS = $(BINS:=.o)
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
6
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
7 .PHONY: all clean test
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
8
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
9 all: $(BINS)
2
f12b5dd4e18c *: many new operations and a real test suite
Paper <paper@tflc.us>
parents:
diff changeset
10
3
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
11 # suppress the platform-dependent hardware stuff so we only have
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
12 # GCC vector extensions
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
13 test-gcc: CFLAGS += -DVEC_SUPPRESS_HW
2
f12b5dd4e18c *: many new operations and a real test suite
Paper <paper@tflc.us>
parents:
diff changeset
14
3
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
15 # also suppress GCC extensions, leaving only the defaults
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
16 test-generic: CFLAGS += -DVEC_SUPPRESS_HW -DVEC_SUPPRESS_GCC
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
17
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
18 $(OBJS): main.c
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
19 $(CC) $(CFLAGS) -o $@ -c $^
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
20
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
21 $(BINS): %: %.o
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
22 $(CC) $(LDFLAGS) -o $@ $^
2
f12b5dd4e18c *: many new operations and a real test suite
Paper <paper@tflc.us>
parents:
diff changeset
23
f12b5dd4e18c *: many new operations and a real test suite
Paper <paper@tflc.us>
parents:
diff changeset
24 clean:
3
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
25 $(RM) $(BINS) $(OBJS)
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
26
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
27 test: clean $(BINS)
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
28 ./test-gcc
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
29 ./test-generic
3c5545b1568f *: much better alignment support & tests
Paper <paper@tflc.us>
parents: 2
diff changeset
30 ./test-host