chiark / gitweb /
max and minprintable
[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 layout-test.ps \
21         $(addprefix a4-test-,$(addsuffix .ps, b m t)) \
22         $(addprefix layout-test-,$(addsuffix .ps, b m t))
23
24 map.plag: generate-plag input-graph Parse.pm 
25         ./$< input-graph $o
26
27 # create opt.plag.reuse to shortcut this
28 opt.plag: maybe-rerun-optim map.plag $(USE_PLAG_RELEASE) Makefile
29         ./$(filter-out Makefile, $^) $@ .opt.plag.sums \
30                 R                                       \
31                 DUAL                                    \
32                 OUTER-F2V OUTER-SPLIT                   \
33                 B T OUTER-F2V OUTER-F12VA               \
34                 PCO CP RAE                              \
35                 D 0 NLOPT                               \
36                 W $@.tmp
37
38 faces.plag: opt.plag $(USE_PLAG_DEBUG) Makefile
39         $(USE_PLAG_DEBUG) RF $< W-FACES $@.tmp && $i
40
41 maxprintable.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
42         ./generate-board faces.plag input-graph $o
43
44 minprintable.ps: generate-board faces.plag input-graph misc-data.pl Parse.pm
45         ./generate-board -XM faces.plag input-graph $o
46
47 layout-test.ps: maxprintable.ps Makefile Parse.pm
48         ./generate-board -XW faces.plag input-graph $o
49
50 layout-test-%.ps: layout-test-prefix-%.ps layout-test.ps
51         cat $^ $o
52
53 a4-test-%.ps: layout-test-prefix-%.ps maxprintable.ps
54         cat $^ $o
55
56 #map.ps: map.dot
57 #       neato -Tps $^ $o