chiark / gitweb /
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-,     pa3-bPageB pa3-bPageMT                  \
28                                 pa4-bPageB pa4-bPageM pa4-bPageT )      \
29         $(addprefix board-,             b mt)           \
30         layout-test                                     \
31         $(addprefix a4-test-,           b m t)          \
32         $(addprefix layout-test-,       b m t)
33
34
35 all: $(addsuffix .ps, $(BOARDFILES))
36
37 cmyk.pdf: cmyk.ps Makefile
38         ps2pdf -dAutoRotatePages=/None cmyk.ps $@.tmp && $i
39
40 map.plag: generate-plag input-graph Parse.pm 
41         ./$< input-graph $o
42
43 # create opt.plag.reuse to shortcut this
44 opt.plag: maybe-rerun-optim map.plag $(USE_PLAG_RELEASE) Makefile
45         ./$(filter-out Makefile, $^) $@ .opt.plag.sums \
46                 R                                       \
47                 DUAL                                    \
48                 OUTER-F2V OUTER-SPLIT                   \
49                 B T OUTER-F2V OUTER-F12VA               \
50                 PCO CP RAE                              \
51                 D 0 NLOPT                               \
52                 W $@.tmp
53
54 faces.plag: opt.plag $(USE_PLAG_DEBUG) Makefile
55         $(USE_PLAG_DEBUG) RF $< W-FACES $@.tmp && $i
56
57 maxprintable-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
58         ./generate-board -Xp$* faces.plag input-graph $o
59
60 minprintable-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
61         ./generate-board -Xp$*,bPrintableAll faces.plag input-graph $o
62
63 boundings-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
64         ./generate-board -XBp$* faces.plag input-graph $o
65
66 board-%.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
67         ./generate-board -X$* faces.plag input-graph $o
68
69 layout-test.ps: maxprintable-a3.ps Makefile Parse.pm
70         ./generate-board -XW faces.plag input-graph $o
71
72 layout-test-%.ps: layout-test-prefix-%.ps layout-test.ps
73         cat $^ $o
74
75 a4-test-%.ps: layout-test-prefix-%.ps maxprintable-a3.ps
76         cat $^ $o
77
78 #map.ps: map.dot
79 #       neato -Tps $^ $o