chiark / gitweb /
segment labelling work-in-progress - yet to do are labels and graph colouring
[trains.git] / layout / Makefile
index f6e6b8739687d7b67d4a04f5106e38d219fd8643..e4d19afa81f34d3c61e437a2cec97121fabef5a1 100644 (file)
@@ -7,14 +7,16 @@ 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'
+LAYOUTOPTS_PS= -e'[sp]=*rm' -e'p=5C'
+XLAYOUTOPTS_LAYER= -e'=5AN' -E'*~=5rsm' -e'p~=5r' -e'*~=9C' -e'*=*l' \
+               $(LAYOUTOPTS_PS)
 
 LAYOUTOPTS_SEGS= '-e*=*rm'
 
-LAYERS_LS=     0 4 10 20
+LAYERS_LS=     0 4 10 26 30
 LAYERS_PS=     $(addsuffix .ps, $(LAYERS_LS))
 LAYERS_L=      $(addprefix ours-l, $(LAYERS_PS))
-LAYERS_E=      $(addprefix ours-e, $(LAYERS_PS))
+LAYERS_E=      $(addprefix ours-e, $(LAYERS_PS)) ours-e20.ps
 LAYERS_M=      $(addprefix ours-m, $(LAYERS_PS))
 LAYERS=                $(LAYERS_L) $(LAYERS_E) $(LAYERS_M)
 
@@ -38,9 +40,13 @@ extras:              ours-a.ps ours-al.ps dualjn-a.ps parts.ps
 include ours.dgram.m
 include segencolayers.m
 
-NETPBM =       -lnetpbm
+#NETPBM =      -lnetpbm
 ifeq (,$(shell test -f /usr/lib/libppm.so || echo no))
 NETPBM +=      -lppm
+else
+ifeq (,$(shell test -f /usr/lib/libnetpbm.so || echo no))
+NETPBM +=      -lnetpbm
+endif
 endif
 
 REDACT=                consistency movfeatsplitedges   \
@@ -67,6 +73,9 @@ compose-segenco: compose-segenco.o
 %.redacted.forsafety: %.redactgraph
                ./$< $(REDACT) consistency printforforsafety $o
 
+%.redacted.segjoins: %.redactgraph
+               ./$< $(REDACT) consistency printforlayoutsegjoins $o
+
 %.layout-data.c: data2safety %.wiring %.redacted.forsafety \
                        reversers.pin-info detectors.pin-info
                ./$(filter-out %.pin-info, $^) $o
@@ -117,13 +126,18 @@ ours.graph.c:     extractgraph ours.dgram-bot.p0.segenco.ps
 ours-l%.ps:    ours.d4 layout
                ./layout <$< -l$* $(LAYOUTOPTS) $(XLAYOUTOPTS_LAYER) $o
 
+ours-s%.ps:    layout ours.redacted.segjoins ours.d4
+               ./layout -l$* -e'*=*rldm' -E'=5Q' -e'segjoin=5M' \
+                       $(filter-out layout, $^) $o
+
 ours-m%.ps:    ours.d4 layout
                ./layout <$< -l$* -E'=*aRsclDmno' \
-                       -e'p=*rm' -E'=5RNLDA' -E'*~=5rCdsml' $o
+                       -E'=5RNLDA' -E'*~=5rCdsml' $(LAYOUTOPTS_PS) $o
 
 ours-e%.ps:    ours.d4 layout
                ./layout <$< -l$* -E'=*aRsclMno' \
-                       -e'p=*rm' -e'=5RN' -E'*~=5rsm' -e'p~=5r' -e'*=*l' $o
+                       -e'=5RN' -E'*~=5rsm' -e'p~=5r' -e'*=*l' \
+                       -e'[sp]=*rm' $o
 
 ours-p%.ps:    ours.d4 layout
                ./layout <$< -l$$(printf %s "$*" | sed -e 's/-/ -P/') \
@@ -148,7 +162,7 @@ ui-plan-%.ppm:      ours.dgram-%.pa.segenco.ppm Makefile
 subseg2display.o compose-segenco.o: segcmap.h
 
 clean:
-               -rm -f -- *.d4 *~ t.* *.m *.new core
+               -rm -f -- *.d4 *~ t.* *.m *.new core *.d
                -rm -f ours.*.ps ours-*.ps parts.ps *.neato.ps ours.*.neato
                -rm -f dualjn-*.ps
                -rm -f *.pin-info *+pindata.asm
@@ -157,12 +171,12 @@ clean:
                -rm -f *.segcmap *.segcmapreq
                -rm -f *.dgram-*.p*.segenco.ps *.dgram-*.p*.segenco.ppm
                -rm -f *.dgram-*.plandata.c ours.graph.c ours.layout-data.c
-               -rm -f $(CPROGS) *.o *.d ours.redactgraph
+               -rm -f $(CPROGS) *.o *.d ours.redactgraph *.segjoins
                -rm -f tmp.* ui-plan-*.ppm
 
 .PRECIOUS:     $(OPRINTS)
 .PRECIOUS:     %.segcmap %.segcmapreq %.segenco.ppm %.d4 %.neato %.raw.neato
 .PRECIOUS:     %.redactgraph %.redacted.forsafety %.redacted.neato
-.PRECIOUS:     %.layout-data.c %.pin-info
+.PRECIOUS:     %.layout-data.c %.pin-info %.segjoins
 
 include $(wildcard *.d)