Added source files dependencies to Makefiles

Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
This commit is contained in:
Maciej Kurc 2019-06-25 10:14:20 +02:00
parent 64a05b4fa2
commit 68c810ce3b
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,6 @@
PART = xc7a35tcsg324-1
BIT2FASM_ARGS = --part "$(XRAY_DIR)/database/artix7/$(PART)" --verbose
SOURCES = mem.init mem_1.init top.v VexRiscv_Linux.v
all: top.fasm top.bits segprint.log
@ -13,7 +14,7 @@ clean:
.PHONY: all clean
top.bit: $(VIVADO)
top.bit: $(VIVADO) $(SOURCES) top.xdc top.tcl
mkdir -p build
cd build && $(XRAY_VIVADO) -mode batch -source ../top.tcl -nojournal -tempDir build -log vivado.log -verbose
cp build/*.bit ./

View File

@ -1,6 +1,7 @@
YOSYS = $(XRAY_DIR)/third_party/yosys/yosys
PART = xc7a35tcsg324-1
BIT2FASM_ARGS = --part "$(XRAY_DIR)/database/artix7/$(PART)" --verbose
SOURCES = mem.init mem_1.init top.v VexRiscv_Linux.v
all: top.fasm top.bits segprint.log
@ -18,10 +19,10 @@ clean:
$(YOSYS):
cd $(XRAY_DIR)/third_party/yosys && make config-gcc && make -j$(shell nproc)
top.edif: $(YOSYS)
top.edif: $(YOSYS) synth.ys $(SOURCES)
$(YOSYS) -s synth.ys -l yosys.log
top.bit: $(VIVADO) top.edif
top.bit: $(VIVADO) top.edif top.xdc top.tcl
mkdir -p build
cd build && $(XRAY_VIVADO) -mode batch -source ../top.tcl -nojournal -tempDir build -log vivado.log -verbose
cp build/*.bit ./