diff options
Diffstat (limited to 'examples/icestick')
-rw-r--r-- | examples/icestick/Makefile | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/examples/icestick/Makefile b/examples/icestick/Makefile index 295642a..4c56295 100644 --- a/examples/icestick/Makefile +++ b/examples/icestick/Makefile @@ -1,18 +1,22 @@ -all: example.bin +PROJ = example +PIN_DEF = icestick.pcf +DEVICE = 1k -example.blif: example.v - yosys -p 'synth_ice40 -top top -blif example.blif' example.v +all: $(PROJ).bin -example.txt: example.blif icestick.pcf - arachne-pnr -d 1k -o example.txt -p icestick.pcf example.blif +%.blif: %.v + yosys -p 'synth_ice40 -top top -blif $@' $< -example.bin: example.txt - icepack example.txt example.bin +%.txt: $(PIN_DEF) %.blif + arachne-pnr -d $(DEVICE) -o $@ -p $^ + +%.bin: %.txt + icepack $< $@ prog: - iceprog example.bin + iceprog $(PROJ).bin clean: - rm -f example.blif example.txt example.bin + rm -f *.blif *.txt *.bin .PHONY: all prog clean |