fd6c696a2dc876789d07c7fa6126eeb76f768a85
Stefan Schuermans gerber data V 1.0

Stefan Schuermans authored 5 years ago

electrics/Makefile  1) NAMES := Chaosknoten
Stefan Schuermans initial checkin of Chaosknoten

Stefan Schuermans authored 5 years ago

Makefile            2) 
Stefan Schuermans gerber data V 1.0

Stefan Schuermans authored 5 years ago

electrics/Makefile  3) GNETLIST := gnetlist
electrics/Makefile  4) GSCHEM := gschem
electrics/Makefile  5) PCB := pcb
electrics/Makefile  6) PS2PDF := ps2pdf
Stefan Schuermans initial checkin of Chaosknoten

Stefan Schuermans authored 5 years ago

Makefile            7) 
Stefan Schuermans gerber data V 1.0

Stefan Schuermans authored 5 years ago

electrics/Makefile  8) SUFFIXES :=
electrics/Makefile  9) 
electrics/Makefile 10) .PHONY: all nets pdfs gbrs tidy clean
Stefan Schuermans initial checkin of Chaosknoten

Stefan Schuermans authored 5 years ago

Makefile           11) .SUFFIXES:
Stefan Schuermans gerber data V 1.0

Stefan Schuermans authored 5 years ago

electrics/Makefile 12) .SECONDARY:
Stefan Schuermans initial checkin of Chaosknoten

Stefan Schuermans authored 5 years ago

Makefile           13) 
Stefan Schuermans gerber data V 1.0

Stefan Schuermans authored 5 years ago

electrics/Makefile 14) all: nets pdfs gbrs tidy
Stefan Schuermans initial checkin of Chaosknoten

Stefan Schuermans authored 5 years ago

Makefile           15) 
Makefile           16) nets: $(addsuffix .net,$(NAMES))
Makefile           17) 
Makefile           18) pdfs: $(addsuffix .sch.pdf,$(NAMES)) $(addsuffix .pcb.pdf,$(NAMES))
Makefile           19) 
Stefan Schuermans gerber data V 1.0

Stefan Schuermans authored 5 years ago

electrics/Makefile 20) gbrs: $(addsuffix .gerber.zip,$(NAMES))
electrics/Makefile 21) 
Stefan Schuermans initial checkin of Chaosknoten

Stefan Schuermans authored 5 years ago

Makefile           22) %.net: %.sch
Makefile           23) 	$(GNETLIST) -q -g PCB -o $@ $<
Makefile           24) 
Stefan Schuermans gerber data V 1.0

Stefan Schuermans authored 5 years ago

electrics/Makefile 25) %.sch.ps: %.sch gschem-print.scm
Stefan Schuermans initial checkin of Chaosknoten

Stefan Schuermans authored 5 years ago

Makefile           26) 	$(GSCHEM) -p -s gschem-print.scm -o $@ $<
Makefile           27) 
Makefile           28) %.pcb.ps: %.pcb
Makefile           29) 	$(PCB) -x ps --psfile $@ --media A4 --ps-color --fill-page $<
Makefile           30) 
Makefile           31) %.pdf: %.ps
Makefile           32) 	$(PS2PDF) $< $@
Makefile           33) 
Stefan Schuermans gerber data V 1.0

Stefan Schuermans authored 5 years ago

electrics/Makefile 34) %.gerber.zip: %.pcb
electrics/Makefile 35) 	rm -rf $*.gerber $@
electrics/Makefile 36) 	mkdir -p $*.gerber/tmp
electrics/Makefile 37) 	$(PCB) -x gerber --gerberfile $*.gerber/$* $<
electrics/Makefile 38) 	{ head -n $$(grep -n Via $< | head -n 1 | cut -d ':' -f 1) $<; \
electrics/Makefile 39) 	  tail -n +$$(grep -n Layer $< | head -n 1 | cut -d ':' -f 1) $<; } \
electrics/Makefile 40) 	  | sed 's/ 6.00mil / 1.00mil /g' > $*.gerber/tmp/$<
electrics/Makefile 41) 	$(PCB) -x gerber --gerberfile $*.gerber/tmp/$* $*.gerber/tmp/$<
electrics/Makefile 42) 	mv $*.gerber/tmp/$*.group7.gbr $*.gerber/$*.milling.gbr
Stefan Schuermans keep paste data

Stefan Schuermans authored 5 years ago

electrics/Makefile 43) 	rm $(foreach X,group7,$*.gerber/$*.$X.gbr)
Stefan Schuermans gerber data V 1.0

Stefan Schuermans authored 5 years ago

electrics/Makefile 44) 	rm -rf $*.gerber/tmp
electrics/Makefile 45) 	zip -r $@ $*.gerber
electrics/Makefile 46) 
Stefan Schuermans initial checkin of Chaosknoten

Stefan Schuermans authored 5 years ago

Makefile           47) tidy:
Makefile           48) 	rm -f *~ *- *.log *.ps
Makefile           49) 
Makefile           50) clean: tidy
Stefan Schuermans gerber data V 1.0

Stefan Schuermans authored 5 years ago

electrics/Makefile 51) 	rm -rf *.net *.pdf *.gerber *.gerber.zip