1 # Makefile - build system for new board layouts for
2 # for games very like Pandemic Rising Tide
4 # Copyright (C) 2019 Ian Jackson
6 # This program is dual licensed, GPv3+ or CC-BY-SA 4.0+.
7 # Only to the Pandemic Rising Tide folks, it is permissively licensed.
9 # This program is free software.
11 # You can redistribute it and/or modify it under the terms of the
12 # GNU General Public License as published by the Free Software
13 # Foundation, either version 3 of the License, or (at your option)
14 # any later version; or (at your option), under the terms of the
15 # Creative Commons Attribution-ShareAlike International License,
16 # version 4.0 of that License, or (at your option), any later
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 # General Public License Creative Commons Attribution-ShareAlike
23 # License or the for more details.
25 # You should have received a copy of these licenses along with this
26 # program. If not, see <https://www.gnu.org/licenses/> and
27 # <https://creativecommons.org/licenses/>.
29 # Pandemic and Pandemic Rising Tide are (I think) trademarks of Z-Man
30 # games and I use them without permission.
32 # For the avoidance of doubt, I do not consider this program to be a
33 # derivative work of the game Pandemic Rising Tide. However, it is
34 # not very useful without a pair of game description files and the
35 # only nontrivial game description files I know of are indeed such
42 export PERL_HASH_SEED=1
44 # PLAG_DEBUG ?= $(PLAG) # effectively
45 # PLAG_RELEASE ?= $(PLAG) # ie caller may set these
46 PLAG_DIR ?= ../plag-mangler
48 USE_PLAG_DEBUG := $(shell ./find-plag \
49 debug:release "$(PLAG_DIR)" "$(PLAG_DEBUG)" "$(PLAG_RELEASE)" "$(PLAG)")
50 USE_PLAG_RELEASE := $(shell ./find-plag \
51 release:debug "$(PLAG_DIR)" "$(PLAG_RELEASE)" "$(PLAG_DEBUG)" "$(PLAG)")
54 # plag-mangler 3a1eae4d6395f7d862cf66d0e4a1008d1bedc6e7
55 # rc-dlist-deque 3e19e16dde436fc1ac03534bf502588d17b3faeb
56 # c_vec 3394762a6221c44f8e22b222ce5547f6534129ea
57 # rust-nlopt d6781621e72bb7a78da56689ab5bb27befafec6a
58 # nlopt (hack) 3068d8b694a6047c4f374b7267a54fdb3fae1f69 2.3+252-g8b3cb5a-1
59 # crates from Debian buster:
63 # libboost-dev:amd64 1.67.0.1
64 # libboost1.67-dev:amd64 1.67.0-11
69 export PERL_HASH_SEED=1
70 export PERL_PERTURB_KEYS=0
74 # board-pMAXPAPER-bPAGE.pdf
75 # where MAXPAPER is a3 for one a4 and one a3 page, PAGEs are B, MT
76 # a4 for three a4 pages, PAGEs are B, M, T
77 # a1 for one a1 page (with much whitespace), page is P
78 # a1m like a1 but assumes pasting onto 4 x a4 boards
80 # boundings-* (one per MAXPAPER) shows various regions
81 # assuming 5.5mm unprintable border, see $max_printeredge
84 $(addprefix maxprintable-, a3) \
85 $(addprefix minprintable-, a3) \
86 $(addprefix boundings-, pa3 pa4 pa1-bPageP pa1m pa1m-bPageP ) \
87 $(addprefix board-, pa3-bPageB pa3-bPageMT \
88 pa4-bPageB pa4-bPageM pa4-bPageT \
89 pa1-bPageP pa1m-bPageP ) \
90 $(addprefix a4-test-, b m t a1m) \
92 $(addprefix layout-test-, b m t a1m)
97 PSS=$(addsuffix .ps, $(BOARDFILES))
98 PDFS=$(addsuffix .pdf, $(BOARDFILES))
104 $(PS2PDF) $(PS2PDF_FLAGS) $< $@.tmp && $i
106 cmyk.pdf: PS2PDF_FLAGS += -dAutoRotatePages=/None
108 map.plag: generate-plag input-graph Parse.pm
111 www=ianmdlvl@chiark:public-html/pandemic-rising-tide
113 html: $(PDFS) README map.plag
114 rm -rf $@ $@.tmp; mkdir $@.tmp
118 rsync -aH --delete html/. $(www)/.
120 # create opt.plag.reuse to shortcut this
121 opt.plag: maybe-rerun-optim map.plag $(USE_PLAG_RELEASE) Makefile
122 ./$(filter-out Makefile, $^) $@ .opt.plag.sums \
125 OUTER-F2V OUTER-SPLIT \
126 B T OUTER-F2V OUTER-F12VA \
131 faces.plag: opt.plag $(USE_PLAG_DEBUG) Makefile
132 $(USE_PLAG_DEBUG) RF $< W-FACES $@.tmp && $i
134 BOARDDEPS= generate-board faces.plag input-graph misc-data.pl Parse.pm
136 maxprintable-%.ps: $(BOARDDEPS)
137 ./generate-board -Xp$* faces.plag input-graph $o
139 minprintable-%.ps: $(BOARDDEPS)
140 ./generate-board -Xp$*,bPrintableAll faces.plag input-graph $o
142 boundings-%.ps: $(BOARDDEPS)
143 ./generate-board -XB$* faces.plag input-graph $o
145 board-%.ps: $(BOARDDEPS)
146 ./generate-board -X$* faces.plag input-graph $o
148 layout-test-a1m.ps: $(BOARDDEPS) layout-test-prefix-a1.ps
149 ./generate-board -XWB,pa1m-bPageP faces.plag input-graph >$@.tmp.1
150 cat layout-test-prefix-a1.ps $@.tmp.1 $o
152 a4-test-a1m.ps: $(BOARDDEPS) layout-test-prefix-a1.ps
153 ./generate-board -XB,pa1m-bPageP faces.plag input-graph >$@.tmp.1
154 cat layout-test-prefix-a1.ps $@.tmp.1 $o
156 layout-test-preview.ps: $(BOARDDEPS)
157 ./generate-board -XW faces.plag input-graph $o
159 layout-test-%.ps: layout-test-prefix-%.ps layout-test-preview.ps
162 a4-test-%.ps: layout-test-prefix-%.ps maxprintable-a3.ps