4 all: default layers panel3.pcb
6 o=>$@.new && mv -f $@.new $@
8 netlists: reversers.net detectors.net \
9 reversers.hole-rep detectors.hole-rep \
10 both.hole-rep panel3.hole-rep
12 # print from pcb(1) as follows:
13 # File / Print Layout / ...
14 # select media and offsets: A4
17 # (If `... exists, use anyway?', Sequence OK)
20 # make {reversers,detectors}.oprints{-l,-lpr}
21 # for f in *.oprint-*.ps; do gv -scale -1 -media A4 $f; done
24 OPRINTS= %.oprint-copper.ps \
26 %.pcb.output_frontsilk.ps \
29 %.hole-rep: %.pcb hole-report.pl
30 ./hole-report.pl <$< $o
32 include reversers.layers.dep
33 include detectors.layers.dep
34 include panel3.layers.dep
36 %.zip: layers.txt.tmpl Makefile
37 rm -rf $@.d; mkdir -p $@.d
38 set -e; exec <$<; cd $@.d; perl -pe ' \
39 m/^(\S+)\s+(\w+)\s+(\w+)\s+(\S.*)$$/ or die; \
40 system "cp ../$*.pcb.output_$$1.$$3 $$2.$$3"; \
42 $$_= sprintf "%-20s %s\n", "$$2.$$3", $$4; \
48 PANEL3_PCBS= reversers.pcb detectors.pcb detectors.pcb
50 panel3.pcb: pcb-panelise $(PANEL3_PCBS) Makefile
51 ./$< -g100 $(PANEL3_PCBS) $o
53 $*.zip: $*.pcb.output_$$1.$$2/ or die' \
56 GZIP=-9v tar zvcf $@.gz $*.pcb.output_*.ps
58 %.layers.dep: layers.txt.tmpl Makefile
60 's/^(\S+)\s+\w+\s+(\w+)\s.*/$*.zip: $*.pcb.output_$$1.$$2/ or die' \
63 both.hole-rep: hole-report.pl reversers.pcb detectors.pcb
69 %.oprints-l: $(OPRINTS) %.oprints Makefile
72 pcboprints: reversers.oprints-l detectors.oprints-l
74 %.oprints-lpr: %.oprints-l
75 set -ex; for f in `cat $^`; do lpr $$f; done
80 %.oprint-copper.ps: %.pcb.output_back.distilled.ps \
81 %.pcb.output_front.distilled.ps
84 pstops '2:0(-50mm,0mm)+1(50mm,0mm)' <$@-2.tmp $o
86 %.oprint-copper.ps: Makefile
88 %.oprint-assembly.ps: %.pcb.output_assembly.ps Makefile
89 pstops -pa4 '0@2(-109mm,-290mm)' <$< $o
92 sed -e '/^\#/d' <$< $o
94 %.net-info: %.net-spec netlist-expand
95 ./netlist-expand $< $o
97 %.net-spec: generate-netspec.pl
102 -rm -f reversers.net reversers.net-info
104 .PRECIOUS: %.net-info %.net-spec
105 .PRECIOUS: $(OPRINTS)