chiark / gitweb /
build cmyk.pdf
[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 default: all
19
20 all: maxprintable.ps minprintable.ps boundings.ps \
21         board-b.ps board-mt.ps \
22         layout-test.ps \
23         $(addprefix a4-test-,$(addsuffix .ps, b m t)) \
24         $(addprefix layout-test-,$(addsuffix .ps, b m t))
25
26 cmyk.pdf: cmyk.ps Makefile
27         ps2pdf -dAutoRotatePages=/None cmyk.ps $@.tmp && $i
28
29 map.plag: generate-plag input-graph Parse.pm 
30         ./$< input-graph $o
31
32 # create opt.plag.reuse to shortcut this
33 opt.plag: maybe-rerun-optim map.plag $(USE_PLAG_RELEASE) Makefile
34         ./$(filter-out Makefile, $^) $@ .opt.plag.sums \
35                 R                                       \
36                 DUAL                                    \
37                 OUTER-F2V OUTER-SPLIT                   \
38                 B T OUTER-F2V OUTER-F12VA               \
39                 PCO CP RAE                              \
40                 D 0 NLOPT                               \
41                 W $@.tmp
42
43 faces.plag: opt.plag $(USE_PLAG_DEBUG) Makefile
44         $(USE_PLAG_DEBUG) RF $< W-FACES $@.tmp && $i
45
46 maxprintable.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
47         ./generate-board faces.plag input-graph $o
48
49 minprintable.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
50         ./generate-board -XbPrintableAll faces.plag input-graph $o
51
52 boundings.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
53         ./generate-board -XB faces.plag input-graph $o
54
55 board-b.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
56         ./generate-board -XbPageB faces.plag input-graph $o
57
58 board-mt.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
59         ./generate-board -XbPageMT faces.plag input-graph $o
60
61 layout-test.ps: maxprintable.ps Makefile Parse.pm
62         ./generate-board -XW faces.plag input-graph $o
63
64 layout-test-%.ps: layout-test-prefix-%.ps layout-test.ps
65         cat $^ $o
66
67 a4-test-%.ps: layout-test-prefix-%.ps maxprintable.ps
68         cat $^ $o
69
70 #map.ps: map.dot
71 #       neato -Tps $^ $o