/
Makefile
43 lines (32 loc) · 1.17 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
BENDER := ../bender script vivado
BENDER_FILES := ../bender ../Bender.yml ../Bender.lock
DEFINE_TCLS := \
vivado_ips/define_defines_includes.tcl \
vivado_ips/define_defines_includes_no_simset.tcl \
vivado_ips/define_sources.tcl
ifeq ($(VIVADO),)
VIVADO := vitis-2019.2 vivado
endif
VIVADO_OPT :=-mode batch
.PHONY: all
all: hero_exilzcu102
hero_exilzcu102: vivado_ips/pulp_txilzu9eg ${DEFINE_TCLS}
${VIVADO} ${VIVADO_OPT} -source hero_exilzcu102.tcl
vivado_ips/pulp_txilzu9eg: ${DEFINE_TCLS}
cd vivado_ips && ${VIVADO} ${VIVADO_OPT} -source pulp_txilzu9eg.tcl
vivado_ips/pulp_txilzu9eg.v: src/pulp.py src/pulp.template_v
cd src && ./pulp.py > ../$@
vivado_ips/define_defines_includes.tcl: $(BENDER_FILES)
${BENDER} --only-defines --only-includes > $@
vivado_ips/define_defines_includes_no_simset.tcl: $(BENDER_FILES)
${BENDER} --only-defines --only-includes --no-simset > $@
vivado_ips/define_sources.tcl: $(BENDER_FILES)
${BENDER} --only-sources > $@
../bender: ../Makefile
make -C .. bender
.PHONY: clean
clean:
rm -rf hero_exilzcu102
rm -f vivado_ips/{component.xml,define_*.tcl}
rm -rf vivado_ips/{pulp_txilzu9eg,xgui}
rm -f {,vivado_ips/}vivado*.{jou,log,str}