@@ 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