M4INCS= parts.i4 E_TRACK= ArsCLMNo LAYOUTOPTS_ALL= -ep=*Cm LAYOUTOPTS= -E=*$(E_TRACK) $(LAYOUTOPTS_ALL) LAYOUTOPTS_PHYS= -S1.0 $(LAYOUTOPTS) '-e*A' XLAYOUTOPTS_LAYER= -e'=5AN' -E'*~=5rsm' -e'p~=5r' -e'*~=9C' -e'*=*l' LAYERS_LS= 0 10 20 LAYERS_PS= $(addsuffix .ps, $(LAYERS_LS)) LAYERS_L= $(addprefix ours-l, $(LAYERS_PS)) LAYERS_E= $(addprefix ours-e, $(LAYERS_PS)) LAYERS= $(LAYERS_L) $(LAYERS_E) LPAGES= $(foreach x, 0 1 2 3 4 5 6, $(foreach y, 1 2 3 4 5, ours-p0-$xx$y.ps)) default: netlists picprogs layers: $(LAYERS) lpages: $(LPAGES) all: default layers bulkres.bom divider-tables \ picprogs netlists panel3.pcb o=>$@.new && mv -f $@.new $@ CIRCUITPARTS= control.partlist circuit.partlist BULKRESPARTS= bulkres-select.partlist bulkres-items.partlist picprogs: flasher.hex netlists: reversers.net detectors.net \ reversers.hole-rep detectors.hole-rep \ both.hole-rep panel3.hole-rep # print from pcb(1) as follows: # File / Print Layout / ... # select media and offsets: A4 # rotate # ok # (If `... exists, use anyway?', Sequence OK) # # then # make {reversers,detectors}.oprints{-l,-lpr} # for f in *.oprint-*.ps; do gv -scale -1 -media A4 $f; done # etc. OPRINTS= %.oprint-copper.ps \ %.pcb.output_fab.ps \ %.pcb.output_frontsilk.ps \ %.oprint-assembly.ps %.hole-rep: %.pcb hole-report.pl ./hole-report.pl <$< $o include reversers.layers.dep include detectors.layers.dep include panel3.layers.dep %.zip: layers.txt.tmpl Makefile rm -rf $@.d; mkdir -p $@.d set -e; exec <$<; cd $@.d; perl -pe ' \ m/^(\S+)\s+(\w+)\s+(\w+)\s+(\S.*)$$/ or die; \ system "cp ../$*.pcb.output_$$1.$$3 $$2.$$3"; \ die $$? if $$?; \ $$_= sprintf "%-20s %s\n", "$$2.$$3", $$4; \ ' >readme.txt; \ zip -l ../$@.new * mv -f $@.new $@ unzip -v $@ PANEL3_PCBS= reversers.pcb detectors.pcb detectors.pcb panel3.pcb: pcb-panelise $(PANEL3_PCBS) Makefile ./$< -g100 $(PANEL3_PCBS) $o $*.zip: $*.pcb.output_$$1.$$2/ or die' \ %.out-ps.tar: GZIP=-9v tar zvcf $@.gz $*.pcb.output_*.ps %.layers.dep: layers.txt.tmpl Makefile perl -pe \ 's/^(\S+)\s+\w+\s+(\w+)\s.*/$*.zip: $*.pcb.output_$$1.$$2/ or die' \ <$< $o both.hole-rep: hole-report.pl reversers.pcb detectors.pcb ./$^ $o %.oprints: $(OPRINTS) echo $^ >$@-l-tmp %.oprints-l: $(OPRINTS) %.oprints Makefile cp $@-tmp $@ pcboprints: reversers.oprints-l detectors.oprints-l %.oprints-lpr: %.oprints-l set -ex; for f in `cat $^`; do lpr $$f; done %.distilled.ps: %.ps ps2ps $< $@ %.oprint-copper.ps: %.pcb.output_back.distilled.ps \ %.pcb.output_front.distilled.ps cat $^ >$@.tmp ps2ps $@.tmp $@-2.tmp pstops '2:0(-50mm,0mm)+1(50mm,0mm)' <$@-2.tmp $o %.oprint-copper.ps: Makefile %.oprint-assembly.ps: %.pcb.output_assembly.ps Makefile pstops -pa4 '0@2(-109mm,-290mm)' <$< $o %.net: %.net-info sed -e '/^\#/d' <$< $o %.net-info: %.net-spec netlist-expand ./netlist-expand $< $o %.net-spec: generate-netspec.pl ./$< $@ $o %.hex: %.asm gpasm -p 18f458 $< circuit.bom: farnell-find $(CIRCUITPARTS) ./farnell-find bom $(CIRCUITPARTS) $o bulkres.bom: farnell-find $(BULKRESPARTS) ./farnell-find bom $(BULKRESPARTS) $o bulkres-select.partlist: bulkres-select-gen.pl ./$^ $o bulkres-items.suggest: cat bulkres-searchout*[0-9] | ./farnell-resistor-convert.pl $o bulkres-items.descs: bulkres-items.suggest xargs ./farnell-find describe <$< $o bulkres-items.partlist: ./farnell-resistor-convert.pl