chiark / gitweb /
wip a4
[pandemic-rising-tide.git] / Makefile
1
2 i=mv -f $@.tmp $@
3 o= >$@.tmp && $i
4
5 export PERL_HASH_SEED=1
6
7 # PLAG_DEBUG   ?= $(PLAG)     # effectively
8 # PLAG_RELEASE ?= $(PLAG)     # ie caller may set these
9 PLAG_DIR     ?= ../plag-mangle
10
11 USE_PLAG_DEBUG   := $(shell ./find-plag \
12  debug:release "$(PLAG_DIR)" "$(PLAG_DEBUG)" "$(PLAG_RELEASE)" "$(PLAG)")
13 USE_PLAG_RELEASE := $(shell ./find-plag \
14  release:debug "$(PLAG_DIR)" "$(PLAG_RELEASE)" "$(PLAG_DEBUG)" "$(PLAG)")
15
16 # works with plag-mangle 16446a44d3f1f467765879492fa85a01222f8052
17
18 export PERL_HASH_SEED=1
19 export PERL_PERTURB_KEYS=0
20
21 default: all
22
23 BOARDFILES=                                             \
24         $(addprefix maxprintable-,      a3)             \
25         $(addprefix minprintable-,      a3)             \
26         $(addprefix boundings-,         a3 a4)          \
27         $(addprefix board-,             b mt)           \
28         layout-test                                     \
29         $(addprefix a4-test-,           b m t)          \
30         $(addprefix layout-test-,       b m t)
31
32
33 all: $(addsuffix .ps, $(BOARDFILES))
34
35 cmyk.pdf: cmyk.ps Makefile
36         ps2pdf -dAutoRotatePages=/None cmyk.ps $@.tmp && $i
37
38 map.plag: generate-plag input-graph Parse.pm 
39         ./$< input-graph $o
40
41 # create opt.plag.reuse to shortcut this
42 opt.plag: maybe-rerun-optim map.plag $(USE_PLAG_RELEASE) Makefile
43         ./$(filter-out Makefile, $^) $@ .opt.plag.sums \
44                 R                                       \
45                 DUAL                                    \
46                 OUTER-F2V OUTER-SPLIT                   \
47                 B T OUTER-F2V OUTER-F12VA               \
48                 PCO CP RAE                              \
49                 D 0 NLOPT                               \
50                 W $@.tmp
51
52 faces.plag: opt.plag $(USE_PLAG_DEBUG) Makefile
53         $(USE_PLAG_DEBUG) RF $< W-FACES $@.tmp && $i
54
55 maxprintable-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
56         ./generate-board -Xp$* faces.plag input-graph $o
57
58 minprintable-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
59         ./generate-board -Xp$*,bPrintableAll faces.plag input-graph $o
60
61 boundings-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
62         ./generate-board -XBp$* faces.plag input-graph $o
63
64 board-b.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
65         ./generate-board -Xpa3,bPageB faces.plag input-graph $o
66
67 board-mt.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
68         ./generate-board -Xpa3,bPageMT faces.plag input-graph $o
69
70 layout-test.ps: maxprintable-a3.ps Makefile Parse.pm
71         ./generate-board -XW faces.plag input-graph $o
72
73 layout-test-%.ps: layout-test-prefix-%.ps layout-test.ps
74         cat $^ $o
75
76 a4-test-%.ps: layout-test-prefix-%.ps maxprintable-a3.ps
77         cat $^ $o
78
79 #map.ps: map.dot
80 #       neato -Tps $^ $o