6 all: for-pic panel3.pcb \
7 points-pin-alloc.lout points-pin-alloc.ps
9 o=>$@.new && mv -f $@.new $@
11 netlists: reversers.net detectors.net \
12 reversers.hole-rep detectors.hole-rep \
13 both.hole-rep panel3.hole-rep
15 # print from pcb(1) as follows:
16 # File / Print Layout / ...
17 # select media and offsets: A4
20 # (If `... exists, use anyway?', Sequence OK)
23 # make {reversers,detectors}.oprints{-l,-lpr}
24 # for f in *.oprint-*.ps; do gv -scale -1 -media A4 $f; done
27 OPRINTS= %.oprint-copper.ps \
29 %.pcb.output_frontsilk.ps \
32 %.hole-rep: %.pcb hole-report.pl
33 ./hole-report.pl <$< $o
35 include reversers.layers.dep
36 include detectors.layers.dep
37 include panel3.layers.dep
39 %.zip: layers.txt.tmpl Makefile
40 rm -rf $@.d; mkdir -p $@.d
41 set -e; exec <$<; cd $@.d; perl -pe ' \
42 m/^(\S+)\s+(\w+)\s+(\w+)\s+(\S.*)$$/ or die; \
43 system "cp ../$*.pcb.output_$$1.$$3 $$2.$$3"; \
45 $$_= sprintf "%-20s %s\n", "$$2.$$3", $$4; \
51 PANEL3_PCBS= reversers.pcb detectors.pcb detectors.pcb
53 panel3.pcb: pcb-panelise $(PANEL3_PCBS) Makefile
54 ./$< -g100 $(PANEL3_PCBS) $o
56 $*.zip: $*.pcb.output_$$1.$$2/ or die' \
59 GZIP=-9v tar zvcf $@.gz $*.pcb.output_*.ps
61 %.layers.dep: layers.txt.tmpl Makefile
63 's/^(\S+)\s+\w+\s+(\w+)\s.*/$*.zip: $*.pcb.output_$$1.$$2/ or die' \
66 both.hole-rep: hole-report.pl reversers.pcb detectors.pcb
72 %.oprints-l: $(OPRINTS) %.oprints Makefile
75 pcboprints: reversers.oprints-l detectors.oprints-l
77 %.oprints-lpr: %.oprints-l
78 set -ex; for f in `cat $^`; do lpr $$f; done
83 %.oprint-copper.ps: %.pcb.output_back.distilled.ps \
84 %.pcb.output_front.distilled.ps
87 pstops '2:0(-50mm,0mm)+1(50mm,0mm)' <$@-2.tmp $o
89 %.oprint-copper.ps: Makefile
91 %.oprint-assembly.ps: %.pcb.output_assembly.ps Makefile
92 pstops -pa4 '0@2(-109mm,-290mm)' <$< $o
95 sed -e '/^\#/d' <$< $o
97 %.net-info: %.net-spec netlist-expand
98 ./netlist-expand $< $o
100 %.net-spec: generate-netspec.pl
103 points-pin-alloc.lout: points-pin-alloc-gen points-pin-alloc.setup \
104 Makefile detectors.net-info reversers.net-info
105 ./$< reversers:4 detectors:6 $o
113 -rm -f -- *~ .*~ *.tmp *.new *.layers.dep
114 -rm -f *.hole-rep *.net *.net-info *.net-spec
115 -rm -f *.layers.dep panel3.pcb
116 -rm -f points-pin-alloc.{lout,ps}
118 .PRECIOUS: %.net-info %.net-spec
119 .PRECIOUS: $(OPRINTS)