mirror of
https://github.com/garrettsworkshop/MacIIROMSIMM.git
synced 2024-10-31 22:06:00 +00:00
Create Makefile
This commit is contained in:
parent
d4b62852dd
commit
72402c981c
43
Makefile
Normal file
43
Makefile
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
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 = $@/../MacIIROMSIMM.kicad_pcb
|
||||||
|
F_SCH = $@/../MacIIROMSIMM.kicad_sch
|
||||||
|
F_POS = $@/MacIIROMSIMM-top-pos.csv
|
||||||
|
F_ZIP = $@/MacIIROMSIMM.4402C-gerber.zip
|
||||||
|
F_SCHPDF = $@/MacIIROMSIMM.4402C-Schematic.pdf
|
||||||
|
F_PCBPDF = $@/MacIIROMSIMM.4402C-Placement.pdf
|
||||||
|
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: all clean gerber Documentation
|
||||||
|
all: gerber Documentation
|
||||||
|
clean:
|
||||||
|
rm -fr gerber/
|
||||||
|
rm -f Documentation/MacIIROMSIMM.4402C-Schematic.pdf
|
||||||
|
rm -f Documentation/MacIIROMSIMM.4402C-Placement.pdf
|
||||||
|
|
||||||
|
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)
|
||||||
|
zip -r $(F_ZIP) $@/
|
||||||
|
Documentation:
|
||||||
|
mkdir -p $@
|
||||||
|
$(KICAD) $(CMD_SCHPDF)
|
||||||
|
$(KICAD) $(CMD_PCBPDF)
|
Loading…
Reference in New Issue
Block a user