Mercurial > hg > batmud > maputils
annotate maps/Makefile @ 95:0d2b25e342df
Also make PNG images from maps
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 17 Dec 2006 10:03:12 +0000 |
parents | 15408e829029 |
children | 140dda7f853d |
rev | line source |
---|---|
39 | 1 # |
2 # Settings | |
3 # | |
95
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
4 MAPLIST=laenor.map roth.map luc.map furn.map deso.map |
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
5 |
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
6 TARGETS=$(patsubst %.map,%.html,$(MAPLIST)) $(patsubst %.map,%.ansi,$(MAPLIST)) $(patsubst %.map,%.png,$(MAPLIST)) |
67 | 7 |
8 UPURL=mhamalai@students.oamk.fi:public_html/bat/maps/ | |
9 | |
39 | 10 BINPATH=../ |
11 EXEEXT= | |
12 | |
13 | |
14 # | |
15 # Utils | |
16 # | |
17 COLORMAP_BIN=$(BINPATH)colormap$(EXEEXT) | |
18 MKLOC_BIN=$(BINPATH)mkloc$(EXEEXT) | |
95
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
19 MAP2PPM_BIN=$(BINPATH)map2ppm$(EXEEXT) |
39 | 20 |
21 | |
22 # | |
23 # Target rules | |
24 # | |
25 all: $(TARGETS) | |
26 | |
80 | 27 %.nloc: %.loc |
28 grep -v UNK $< > $@ | |
29 $(MKLOC_BIN) -v -g -l $@ -m $(patsubst %.loc,%.map,$<) -o $@ | |
30 | |
67 | 31 %.tmp: %.map %.loc |
32 $(MKLOC_BIN) -v -o $@ -m $< -l $(patsubst %.map,%.loc,$<) | |
39 | 33 |
67 | 34 %.ansi: %.tmp %.desc $(COLORANSI_BIN) |
88 | 35 $(COLORMAP_BIN) -t "`cat $(patsubst %.tmp,%.desc,$<)`" -vaC -f ansi -o $@ $< |
39 | 36 |
67 | 37 %.html: %.tmp %.desc $(COLORMAP_BIN) |
90 | 38 $(COLORMAP_BIN) -t "`cat $(patsubst %.tmp,%.desc,$<)`" -vaC -f xhtml -o $@ $< |
95
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
39 |
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
40 %.png: %.map $(MAP2PPM_BIN) |
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
41 $(MAP2PPM_BIN) -v $< | pnmscale 2 | pnmtopng -compression=9 > $@ |
39 | 42 |
43 # | |
44 # Special targets | |
45 # | |
95
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
46 upload: $(TARGETS) *.loc |
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
47 scp $+ $(UPURL) |
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
48 |
39 | 49 clean: |
50 $(RM) -f $(TARGETS) *.o | |
51 | |
52 srcclean: clean | |
53 $(RM) -f *~ | |
54 |