RAM128/Makefile

44 lines
1.3 KiB
Makefile
Raw Normal View History

2023-11-03 08:37:35 +00:00
KICAD = /Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli
LAYERS = F.Cu,In1.Cu,In2.Cu,B.Cu,F.Paste,F.SilkS,B.SilkS,F.Mask,B.Mask,Edge.Cuts
F_PCB = $@/../RAM128.kicad_pcb
F_SCH = $@/../RAM128.kicad_sch
F_POS = $@/RAM128-top-pos.csv
2023-11-07 20:35:45 +00:00
F_ZIP = $@/RAM128.4208B-gerber.zip
F_SCHPDF = $@/RAM128.4208B-Schematic.pdf
F_PCBPDF = $@/RAM128.4208B-Placement.pdf
2023-11-03 08:37:35 +00:00
OPT_GERBER = -l $(LAYERS) --subtract-soldermask --no-netlist --no-x2
CMD_GERBER = pcb export gerbers $(OPT_GERBER) -o $@/ $(F_PCB)
CMD_DRILL = pcb export drill -o $@/ $(F_PCB)
OPT_POS = --smd-only --units mm --side front --format csv
CMD_POS = pcb export pos $(OPT_POS) -o $(F_POS) $(F_PCB)
2023-11-07 20:35:45 +00:00
CMD_SCHPDF = sch export pdf --black-and-white --no-background-color -o $(F_SCHPDF) $(F_SCH)
CMD_PCBPDF = pcb export pdf --black-and-white -l F.Fab,Edge.Cuts -o $(F_PCBPDF) $(F_PCB)
2023-11-03 08:37:35 +00:00
.PHONY: all clean gerber Documentation
all: gerber Documentation
clean:
rm -fr gerber/
2023-11-07 20:35:45 +00:00
rm -f Documentation/RAM128.4208B-Schematic.pdf
rm -f Documentation/RAM128.4208B-Placement.pdf
2023-11-03 08:37:35 +00:00
gerber:
mkdir -p $@
$(KICAD) $(CMD_GERBER)
$(KICAD) $(CMD_DRILL)
$(KICAD) $(CMD_POS)
sed -i '' 's/PosX/MidX/g' $(F_POS)
sed -i '' 's/PosY/MidY/g' $(F_POS)
sed -i '' 's/Rot/Rotation/g' $(F_POS)
2023-11-07 20:35:45 +00:00
zip -r $(F_ZIP) $@/
2023-11-03 08:37:35 +00:00
Documentation:
mkdir -p $@
$(KICAD) $(CMD_SCHPDF)
$(KICAD) $(CMD_PCBPDF)