blob: b2e6da6449d051084c99e6c06fa423b18aa03f7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# Set TYPE="AVX2" manually for advanced vector instructions
CUBETYPE = CUBE_${TYPE}
CFLAGS = -std=c99 -pthread -pedantic -Wall -Wextra -Wno-unused-parameter -O3 -mavx2
DBGFLAGS = -DDEBUG -std=c99 -pthread -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -g3 -fsanitize=address -fsanitize=undefined -mavx2
CC = cc
all: cube.o debugcube.o
cube.o: clean
${CC} -D${CUBETYPE} ${CFLAGS} -c -o cube.o src/cube.c
debugcube.o: clean
${CC} -D${CUBETYPE} ${DBGFLAGS} -c -o debugcube.o src/cube.c
clean:
rm -rf *.o
test: debugcube.o
CUBETYPE=${CUBETYPE} ./test/test.sh
benchmark: cube.o
CUBETYPE=${CUBETYPE} ./benchmark/bench.sh
.PHONY: all clean test benchmark
|