-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
41 lines (30 loc) · 793 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
# The source directory is configured in build.sbt
# The first two arguments are consumed by sbt, the rest is
# forwarded to the Scala/Chisel main
SBT ?= sbt
# package.Object (main)
MAIN = TestMain
RUN = run-main $(MAIN)
TARGET_DIR = generated
TARGET = --targetDir $(TARGET_DIR)
SW = --backend c
HW = --backend v
TEST = --compile --genHarness --test
.PHONY: clean all router units tiles verilog
all:
$(SBT) "$(RUN) $@ $(TARGET) $(SW) $(TEST)"
router:
$(SBT) "$(RUN) $@ $(TARGET) $(SW) $(TEST)"
units:
$(SBT) "$(RUN) $@ $(TARGET) $(SW) $(TEST)"
tiles:
$(SBT) "$(RUN) $@ $(TARGET) $(SW) $(TEST)"
shmac:
$(SBT) "$(RUN) $@ $(TARGET) $(SW) $(TEST)"
%.out:
$(SBT) "$(RUN) $(@:.out=) $(TARGET) $(SW) $(TEST)"
verilog:
$(SBT) "run $@ $(HW)"
clean:
$(SBT) clean
rm -rf $(TARGET_DIR)