-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathMakefile.in
71 lines (62 loc) · 2.12 KB
/
Makefile.in
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
prefix := @prefix@
abs_top_srcdir := @abs_top_srcdir@
XLEN := @XLEN@
RISCVTOOLS := @RISCVTOOLS@
ROCC = examples
RUNNER := "spike --extension=gemmini "
.PHONY: all bareMetalC clean imagenet transformers mlps
all: bareMetalC imagenet transformers mlps
vars = \
abs_top_srcdir=$(abs_top_srcdir) \
XLEN=$(XLEN) \
PREFIX=$(ROCC)-$@ \
src_dir=$(abs_top_srcdir)/$@ \
RISCVTOOLS=$(RISCVTOOLS)
bareMetalC:
mkdir -p $@
$(MAKE) -C $@ -f $(abs_top_srcdir)/$@/Makefile $(vars)
imagenet:
mkdir -p $@
$(MAKE) -C $@ -f $(abs_top_srcdir)/$@/Makefile $(vars)
transformers:
mkdir -p $@
$(MAKE) -C $@ -f $(abs_top_srcdir)/$@/Makefile $(vars)
mlps:
mkdir -p $@
$(MAKE) -C $@ -f $(abs_top_srcdir)/$@/Makefile $(vars)
clean:
$(MAKE) -C bareMetalC -f $(abs_top_srcdir)/bareMetalC/Makefile abs_top_srcdir=$(abs_top_srcdir) PREFIX=$(ROCC)-bareMetalC clean
$(MAKE) -C imagenet -f $(abs_top_srcdir)/imagenet/Makefile abs_top_srcdir=$(abs_top_srcdir) PREFIX=$(ROCC)-imagenet clean
$(MAKE) -C mlps -f $(abs_top_srcdir)/mlps/Makefile abs_top_srcdir=$(abs_top_srcdir) PREFIX=$(ROCC)-mlps clean
test-baremetal-bareMetalC:
make -C bareMetalC \
-f $(abs_top_srcdir)/bareMetalC/Makefile \
TARGET_MAKEFILE=$(abs_top_srcdir)/bareMetalC/Makefile \
abs_top_srcdir=$(abs_top_srcdir) \
src_dir=$(abs_top_srcdir)/bareMetalC \
XLEN=$(XLEN) \
PREFIX=$(ROCC)-bareMetalC \
RISCVTOOLS=$(RISCVTOOLS) \
RUNNER=$(RUNNER) \
run-baremetal
test-baremetal: test-baremetal-bareMetalC
make -C mlps \
-f $(abs_top_srcdir)/mlps/Makefile \
TARGET_MAKEFILE=$(abs_top_srcdir)/mlps/Makefile \
abs_top_srcdir=$(abs_top_srcdir) \
src_dir=$(abs_top_srcdir)/mlps \
XLEN=$(XLEN) \
PREFIX=$(ROCC)-mlps \
RISCVTOOLS=$(RISCVTOOLS) \
RUNNER=$(RUNNER) \
run-baremetal
make -C imagenet \
-f $(abs_top_srcdir)/imagenet/Makefile \
TARGET_MAKEFILE=$(abs_top_srcdir)/imagenet/Makefile \
abs_top_srcdir=$(abs_top_srcdir) \
src_dir=$(abs_top_srcdir)/imagenet \
XLEN=$(XLEN) \
PREFIX=$(ROCC)-imagenet \
RISCVTOOLS=$(RISCVTOOLS) \
RUNNER=$(RUNNER) \
run-baremetal