-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (34 loc) · 1.06 KB
/
Makefile
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
OBJS:=bin/b10.o bin/b32_util.o bin/b32_add.o bin/b32_multiply.o bin/b32_subtract.o bin/b32_divide.o
SRCS:=src/b10.cpp src/b32_util.cpp src/b32_add.cpp src/b32_multiply.cpp src/b32_subtract.cpp src/b32_divide.cpp
INCL:=incl/b10.h incl/b32.h incl/types.h
TEST_BINS:=tests/conv_drv tests/operator_drv
TEST_SRC=:=tests/conv_drv.cpp tests/operator_drv.cpp
CC=g++ -c -Iincl -mavx512f
CC2=g++ -Iincl
debug: CC += -ggdb
debug: CC2 += -ggdb
debug: all
release: CC += -Os
release: CC2 += -Os
release: all
fast: CC += -Ofast
fast: CC2 += -Ofast
fast: all
all:binX bin/b32.a tests
bin/%.o:src/%.cpp
$(CC) $^ -o $@
binX:
mkdir -p bin
bin/b32.a:$(OBJS)
ar r bin/b32.a $(OBJS)
tests: tests/gen_num tests/conv_drv tests/operator_drv tests/file_ops bin/b32.a
tests/gen_num:tests/gen_num.cpp
$(CC2) $^ -o $@
tests/operator_drv:tests/operator_drv.cpp bin/b32.a
$(CC2) $^ -o $@
tests/conv_drv:tests/conv_drv.cpp bin/b32.a
$(CC2) $^ -o $@
tests/file_ops:tests/file_ops.cpp bin/b32.a
$(CC2) $^ -o $@
clean:
rm -rf bin tests/operator_drv tests/gen_num tests/conv_drv tests/file_ops