chiark / gitweb /
no tick marks in subseg encoding
[trains.git] / layout / Makefile
1
2 M4INCS=         parts.i4
3
4 E_TRACK=        ArsCLMNo
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'
9
10 LAYOUTOPTS_SEGS= '-e*=*rm' '-e=5G'
11
12 LAYERS_LS=      0 10 20
13 LAYERS_PS=      $(addsuffix .ps, $(LAYERS_LS))
14 LAYERS_L=       $(addprefix ours-l, $(LAYERS_PS))
15 LAYERS_E=       $(addprefix ours-e, $(LAYERS_PS))
16 LAYERS=         $(LAYERS_L) $(LAYERS_E)
17
18 LPAGES=  $(foreach x, 0 1 2 3 4 5 6, $(foreach y, 1 2 3 4 5, ours-p0-$xx$y.ps))
19
20 default:        layers
21 all:            default lpages
22
23 layers:         $(LAYERS)
24 lpages:         $(LPAGES)
25
26 o=>$@.new && mv -f $@.new $@
27
28 %.d4:           %.m4 $(M4INCS) Makefile
29                 m4 -s <$< $o
30
31 %-a.ps:         %.d4 layout
32                 ./layout <$< $(LAYOUTOPTS) '-E*l' $o
33
34 %-al.ps:        %.d4 layout
35                 ./layout <$< $(LAYOUTOPTS) '-e*C' '-ep=rm' $o
36
37 %-ap.ps:        %.d4 layout
38                 ./layout -S1.0 <$< $(LAYOUTOPTS) '-e*A' '-ep=rm' $o
39
40 ours-g%.ps:     ours.d4 ours-g%.segcmap layout
41                 ./layout <$< -l$* $(LAYOUTOPTS_SEGS) -GLours-g$*.segcmap $o
42
43 ours-g%.segcmap: ours-g%.segcmapreq segcmapassign
44                 ./segcmapassign <$< $o
45
46 ours-g%.segcmapreq: ours.d4 layout
47                 ./layout <$< -l$* $(LAYOUTOPTS_SEGS) -GR $o
48
49 ours-l%.ps:     ours.d4 layout
50                 ./layout <$< -l$* $(LAYOUTOPTS) $(XLAYOUTOPTS_LAYER) $o
51
52 ours-e%.ps:     ours.d4 layout
53                 ./layout <$< -l$* -E'=*aRsclMno' \
54                         -e'p=*rm' -e'=5RN' -E'*~=5rsm' -e'p~=5r' -e'*=*l' $o
55
56 ours-p%.ps:     ours.d4 layout
57                 ./layout <$< -l$$(printf %s "$*" | sed -e 's/-/ -P/') \
58                         $(LAYOUTOPTS_PHYS) $(XLAYOUTOPTS_LAYER) $o
59
60 parts.ps:       showlib.d4 layout
61                 ./layout <$< $(LAYOUTOPTS_ALL) $o
62
63 clean:
64                 -rm -f -- *.d4 *~ *.new
65                 -rm -f ours-*.ps parts.ps
66                 -rm -f *.oprint-*.ps
67
68 .PRECIOUS:      $(OPRINTS)