~jaxter184/life-counter

246811e3a9ba5017bb322b81af99056c5247ae55 — jaxter184 4 months ago 08ee4ad
pcb: Add gerber recipe to Makefile
1 files changed, 16 insertions(+), 1 deletions(-)

M Makefile
M Makefile => Makefile +16 -1
@@ 16,10 16,25 @@ collate: $(footprint_dir)/$(NAME).kicad_mod
$(footprint_dir)/$(NAME).kicad_mod: $(addprefix $(footprint_dir)/, $(NAME)fsilk.kicad_mod $(NAME)fcu.kicad_mod $(NAME)fmask.kicad_mod)
	cd $(footprint_dir) && ./collate.py

BOARD_NAME := board

gerber: build/$(BOARD_NAME).zip

build/$(BOARD_NAME).zip: pcb/$(BOARD_NAME).kicad_pcb
	rm -r build/gerber
	mkdir build/gerber -p
	kicad-cli pcb export gerbers --output build/gerber/ --layers F.Cu,B.Cu,F.Silkscreen,B.Silkscreen,F.Mask,B.Mask,Edge.Cuts $^
	kicad-cli pcb export drill --output build/gerber/ $^
	cd build/gerber
	zip $@ -j build/gerber/*

clean:
	rm -r build

### Firmware

flash:
	cargo build --release
	avrdude -cusbasp -pt841 -b115200 -Uflash:w:target/avr-attiny841/release/mtg-counter.elf:e

.PHONY: svg-clean svg collate
.PHONY: svg-clean svg collate gerber