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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 # Settings
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
8c79775ac44f Updated Makefile
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
7
8c79775ac44f Updated Makefile
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
8 UPURL=mhamalai@students.oamk.fi:public_html/bat/maps/
8c79775ac44f Updated Makefile
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
9
39
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 BINPATH=../
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 EXEEXT=
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 #
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 # Utils
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 #
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 COLORMAP_BIN=$(BINPATH)colormap$(EXEEXT)
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 #
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 # Target rules
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 #
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 all: $(TARGETS)
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26
80
16e4674264c2 Updated locations
Matti Hamalainen <ccr@tnsp.org>
parents: 67
diff changeset
27 %.nloc: %.loc
16e4674264c2 Updated locations
Matti Hamalainen <ccr@tnsp.org>
parents: 67
diff changeset
28 grep -v UNK $< > $@
16e4674264c2 Updated locations
Matti Hamalainen <ccr@tnsp.org>
parents: 67
diff changeset
29 $(MKLOC_BIN) -v -g -l $@ -m $(patsubst %.loc,%.map,$<) -o $@
16e4674264c2 Updated locations
Matti Hamalainen <ccr@tnsp.org>
parents: 67
diff changeset
30
67
8c79775ac44f Updated Makefile
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
31 %.tmp: %.map %.loc
8c79775ac44f Updated Makefile
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
32 $(MKLOC_BIN) -v -o $@ -m $< -l $(patsubst %.map,%.loc,$<)
39
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33
67
8c79775ac44f Updated Makefile
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
34 %.ansi: %.tmp %.desc $(COLORANSI_BIN)
88
872a13e83a2d Utilize the new colormap
Matti Hamalainen <ccr@tnsp.org>
parents: 80
diff changeset
35 $(COLORMAP_BIN) -t "`cat $(patsubst %.tmp,%.desc,$<)`" -vaC -f ansi -o $@ $<
39
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36
67
8c79775ac44f Updated Makefile
Matti Hamalainen <ccr@tnsp.org>
parents: 52
diff changeset
37 %.html: %.tmp %.desc $(COLORMAP_BIN)
90
15408e829029 Fixed typo
Matti Hamalainen <ccr@tnsp.org>
parents: 88
diff changeset
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
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 #
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44 # Special targets
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49 clean:
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50 $(RM) -f $(TARGETS) *.o
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52 srcclean: clean
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53 $(RM) -f *~
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
54