-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (34 loc) · 852 Bytes
/
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
48
49
50
51
52
53
# Makefile for Digit_reg of Rosetta benchmarks
#
# Author: Yuanlong Xiao ([email protected])
#
# Targets:
# all - Builds hardware and software in SDSoC.
OPERATORS_OBJ=$(addsuffix .o, $(notdir $(basename $(wildcard operators/*.cpp))))
# HOST_OBJ=$(addsuffix .o, $(notdir $(basename $(wildcard host/*.cpp))))
HOST_OBJ=main.o top.o
INCLUDE=-I /opt/Xilinx/Vivado/2021.1/include
OPT_LEVEL=-O3
CFLAGS=$(INCLUDE) $(OPT_LEVEL)
CXX=g++
VPATH=src
all: main
./main
main:$(OPERATORS_OBJ) $(HOST_OBJ)
$(CXX) $(CFLAGS) -o main $^
$(HOST_OBJ):%.o:./host/%.cpp
$(CXX) $(CFLAGS) -o $@ -c $^
$(OPERATORS_OBJ):%.o:./operators/%.cpp
$(CXX) $(CFLAGS) -o $@ -c $^
run: main
./main > out.log
install:
echo hello
print:
ls ./src
tar:
tar -czvf ./src.tar.gz ./src/
try:
echo $(notdir $(wildcard ./src))
clean:
rm -rf ./*.o main *.log