5 LAYOUTOPTS_ALL= -ep=*Cm
6 LAYOUTOPTS= -E=*$(E_TRACK) $(LAYOUTOPTS_ALL)
7 LAYOUTOPTS_PHYS= -S1.0 $(LAYOUTOPTS) '-e*A'
8 XLAYOUTOPTS_LAYER= -e'=5AN' -E'*~=5rsm' -e'p~=5r' -e'*~=9C' -e'*=*l'
11 LAYERS_PS= $(addsuffix .ps, $(LAYERS_LS))
12 LAYERS_L= $(addprefix ours-l, $(LAYERS_PS))
13 LAYERS_E= $(addprefix ours-e, $(LAYERS_PS))
14 LAYERS= $(LAYERS_L) $(LAYERS_E)
16 LPAGES= $(foreach x, 0 1 2 3 4 5 6, $(foreach y, 1 2 3 4 5, ours-p0-$xx$y.ps))
18 default: ours-a.ps ours-al.ps parts.ps
22 all: default layers circuit.bom bulkres.bom divider-tables \
25 o=>$@.new && mv -f $@.new $@
27 CIRCUITPARTS= control.partlist circuit.partlist
28 BULKRESPARTS= bulkres-select.partlist bulkres-items.partlist
30 picprogs: flasher.hex flash-all.hex
32 netlists: reversers.net
34 long2splita4=pstops -pa3 -d '0(0,-1cm)+0(-9cm,-10cm)' <$< $o
36 %.oprint-back.ps: %.pcb.output_back.ps
39 %.oprint-front.ps: %.pcb.output_front.ps
42 %.oprint-assembly.ps: %.pcb.output_assembly.ps
43 pstops -pa3 '0@1.5(-12cm,-29cm)' <$< $o
45 # these outputs from pstops are really A4 and can be viewed nicely with
46 # for f in *.oprint-*.ps; do gv -scale -1 -media A4 $f; done
49 sed -e '/^\#/d' <$< $o
51 %.net-info: %.net-spec netlist-expand
52 ./netlist-expand $< $o
54 %.net-spec: generate-netspec.pl
60 circuit.bom: farnell-find $(CIRCUITPARTS)
61 ./farnell-find bom $(CIRCUITPARTS) $o
63 bulkres.bom: farnell-find $(BULKRESPARTS)
64 ./farnell-find bom $(BULKRESPARTS) $o
66 bulkres-select.partlist: bulkres-select-gen.pl
69 bulkres-items.suggest:
70 cat bulkres-searchout*[0-9] | ./farnell-resistor-convert.pl $o
72 bulkres-items.descs: bulkres-items.suggest
73 xargs ./farnell-find describe <$< $o
75 bulkres-items.partlist:
76 ./farnell-resistor-convert.pl <bulkres-items.descs MRS25 std $o
78 divider-table.txt: divider-table.pl
81 divider-tables: divider-table.ps divider-table.txt
83 divider-table.ps: divider-table.txt Makefile
84 a2ps -o- -R -1 --borders no -B -L"$$(wc -l <$<)" -l158 \
85 --center-title='E24 resistor ratios and logarithms' <$< $o
87 %.d4: %.m4 $(M4INCS) Makefile
91 ./layout <$< $(LAYOUTOPTS) '-E*l' $o
94 ./layout <$< $(LAYOUTOPTS) '-e*C' '-ep=rm' $o
97 ./layout -S1.0 <$< $(LAYOUTOPTS) '-e*A' '-ep=rm' $o
99 ours-l%.ps: ours.d4 layout
100 ./layout <$< -l$* $(LAYOUTOPTS) $(XLAYOUTOPTS_LAYER) $o
102 ours-e%.ps: ours.d4 layout
103 ./layout <$< -l$* -E'=*aRsclMno' \
104 -e'p=*rm' -e'=5RN' -E'*~=5rsm' -e'p~=5r' -e'*=*l' $o
106 ours-p%.ps: ours.d4 layout
107 ./layout <$< -l$$(printf %s "$*" | sed -e 's/-/ -P/') \
108 $(LAYOUTOPTS_PHYS) $(XLAYOUTOPTS_LAYER) $o
110 parts.ps: showlib.d4 layout
111 ./layout <$< $(LAYOUTOPTS_ALL) $o
114 -rm -f -- *.d4 *.ps farn.* *~ *.new
115 -rm -f bulkres-*.partlist bulkres-items.suggest *.bom
116 -rm -f t,*.gnuplot-data t,*.gnuplot-cmd t,gnuplot-fifo
117 -rm -f t,gnuplots.sh reversers.net reversers.net-info
118 -rm -f flasher.hex flasher.cod flasher.lst
120 .PRECIOUS: reversers.net-info