annotate maps/Makefile @ 346:721bfe123726

Minor refactoring of the build files.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 11 Jul 2007 22:07:35 +0000
parents 5df69bb02c9e
children 56db61a254d4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
346
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
1 include ../config.mak
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
2 include config.mak
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
3
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
4
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
5 #
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
6 # Mangles
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
7 #
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
8 MAPLISTOFFS= \
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
9 laenor.map:1313:1486 \
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
10 furn.map:2458:2615 \
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
11 roth.map:2786:15 \
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
12 luc.map:644:3811 \
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
13 deso.map:54:2285 \
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
14 renardy.map:3549:380
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
15
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
16
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
17 MAPLIST=laenor.map roth.map luc.map furn.map deso.map renardy.map
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
18
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
19
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
20 COLORMAP_BIN=$(BINPATH)colormap$(EXEEXT)
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
21 MKLOC_BIN=$(BINPATH)mkloc$(EXEEXT)
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
22 MKSPECIAL_BIN=$(BINPATH)mkspecial$(EXEEXT)
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
23 MAP2PPM_BIN=$(BINPATH)map2ppm$(EXEEXT)
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
24 COMBINE_BIN=$(BINPATH)combine$(EXEEXT)
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
25 MAP3D_BIN=$(BINPATH)map3d$(EXEEXT)
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
26 TARGETS=$(patsubst %.map,%.html,$(MAPLIST)) \
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
27 $(patsubst %.map,%.htm,$(MAPLIST)) \
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
28 $(patsubst %.map,%.ansi,$(MAPLIST)) \
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
29 $(patsubst %.map,%.png,$(MAPLIST))
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
30
39
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 #
99
140dda7f853d Updates
Matti Hamalainen <ccr@tnsp.org>
parents: 95
diff changeset
33 # Target rules
39
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 #
103
58a07f7c50b7 Updated locations; Makefile improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 99
diff changeset
35 all: $(patsubst %.map,%.ppm,$(MAPLIST)) $(TARGETS)
39
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36
346
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
37
307
a3180d60d2a2 Fixes and tweakings.
Matti Hamalainen <ccr@tnsp.org>
parents: 303
diff changeset
38 #laenor.map:
a3180d60d2a2 Fixes and tweakings.
Matti Hamalainen <ccr@tnsp.org>
parents: 303
diff changeset
39 # cat ~/mapping.log | grep -v "^$$" > tmp
a3180d60d2a2 Fixes and tweakings.
Matti Hamalainen <ccr@tnsp.org>
parents: 303
diff changeset
40 # $(MKSPECIAL_BIN) -v -o $@ -r 100 -R 65 -m 40 tmp -a -d -I $(patsubst %.map,%.initial,$@)
215
Matti Hamalainen <ccr@tnsp.org>
parents: 155
diff changeset
41
346
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
42 include Makefile.inc
99
140dda7f853d Updates
Matti Hamalainen <ccr@tnsp.org>
parents: 95
diff changeset
43
140dda7f853d Updates
Matti Hamalainen <ccr@tnsp.org>
parents: 95
diff changeset
44 world.map: $(MAPLIST) $(COMBINE_BIN)
140dda7f853d Updates
Matti Hamalainen <ccr@tnsp.org>
parents: 95
diff changeset
45 $(COMBINE_BIN) -v -f "~" $(MAPLISTOFFS) -o $@
140dda7f853d Updates
Matti Hamalainen <ccr@tnsp.org>
parents: 95
diff changeset
46
140dda7f853d Updates
Matti Hamalainen <ccr@tnsp.org>
parents: 95
diff changeset
47 world.loc: $(patsubst %.map,%.loc,$(MAPLIST))
140dda7f853d Updates
Matti Hamalainen <ccr@tnsp.org>
parents: 95
diff changeset
48 for i in $(MAPLISTOFFS); do $(MKLOC_BIN) -v -L -l `echo "$$i"|sed "s/^\([^\.]*\).map:.*/\1.loc/"` -m `echo "$$i"|sed "s/^\([^:]*\):\([0-9]*\):\([0-9]*\)/\1 -x \2 -y \3/"`; done > $@
140dda7f853d Updates
Matti Hamalainen <ccr@tnsp.org>
parents: 95
diff changeset
49
103
58a07f7c50b7 Updated locations; Makefile improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 99
diff changeset
50 world.ppm: world.map $(MAP2PPM_BIN)
58a07f7c50b7 Updated locations; Makefile improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 99
diff changeset
51 $(MAP2PPM_BIN) -v $< | pnmscale $(WORLDMAPSCALE) -verbose > $@
99
140dda7f853d Updates
Matti Hamalainen <ccr@tnsp.org>
parents: 95
diff changeset
52
103
58a07f7c50b7 Updated locations; Makefile improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 99
diff changeset
53 world.script: world.map world.loc $(MKLOC_BIN)
338
5df69bb02c9e Updates.
Matti Hamalainen <ccr@tnsp.org>
parents: 331
diff changeset
54 $(MKLOC_BIN) -vnS -m $< -l $(patsubst %.map,%.loc,$<) -u $(WORLDUNITSIZE) -s $(WORLDMAPSCALE) | \
255
be481e1dca9e Updated and improved generation of image-format maps.
Matti Hamalainen <ccr@tnsp.org>
parents: 237
diff changeset
55 sed -e "s/@OPTS_START@/-font Bandal.ttf -pointsize 10 -type TruecolorMatte/g" \
338
5df69bb02c9e Updates.
Matti Hamalainen <ccr@tnsp.org>
parents: 331
diff changeset
56 -e "s/@OPTS_END@/\t-geometry +220+15 title.png -composite -compose screen \\\\\n\t-pointsize 30 -fill white -box none -draw \"text 10,30 \'\n@PAF@\n\n/g" | \
255
be481e1dca9e Updated and improved generation of image-format maps.
Matti Hamalainen <ccr@tnsp.org>
parents: 237
diff changeset
57 sed -e "/@PAF@/r $(patsubst %.map,%.desc,$<)" -e "s/@PAF@//g" > $@
39
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
58
346
721bfe123726 Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents: 338
diff changeset
59
39
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 #
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61 # Special targets
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62 #
317
7b3b2eb09036 Coder information updates.
Matti Hamalainen <ccr@tnsp.org>
parents: 315
diff changeset
63 upload: $(TARGETS) *.loc world.jpg util.js
103
58a07f7c50b7 Updated locations; Makefile improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 99
diff changeset
64 scp $? $(UPURL)
107
3665b9b345fc Updated locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
65 scp $? $(UPURL2)
141
Matti Hamalainen <ccr@tnsp.org>
parents: 136
diff changeset
66 touch $@
95
0d2b25e342df Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents: 90
diff changeset
67
317
7b3b2eb09036 Coder information updates.
Matti Hamalainen <ccr@tnsp.org>
parents: 315
diff changeset
68 uploc: *.loc
291
b78d089a0cf4 Upload target for location files only.
Matti Hamalainen <ccr@tnsp.org>
parents: 255
diff changeset
69 scp $+ $(UPURL)
b78d089a0cf4 Upload target for location files only.
Matti Hamalainen <ccr@tnsp.org>
parents: 255
diff changeset
70 scp $+ $(UPURL2)
b78d089a0cf4 Upload target for location files only.
Matti Hamalainen <ccr@tnsp.org>
parents: 255
diff changeset
71
39
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72 clean:
299
ed5dfa77511f Removed '-f' option.
Matti Hamalainen <ccr@tnsp.org>
parents: 297
diff changeset
73 $(RM) $(TARGETS) *.o
39
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
75 srcclean: clean
299
ed5dfa77511f Removed '-f' option.
Matti Hamalainen <ccr@tnsp.org>
parents: 297
diff changeset
76 $(RM) *~
39
fa68caaf3c94 New maps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
77
297
5482736f3913 ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents: 291
diff changeset
78 update:
5482736f3913 ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents: 291
diff changeset
79 @echo "* Updating from SVN ..."
5482736f3913 ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents: 291
diff changeset
80 @svn update
5482736f3913 ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents: 291
diff changeset
81
5482736f3913 ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents: 291
diff changeset
82 .changelog: update
5482736f3913 ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents: 291
diff changeset
83 @echo "* Making ChangeLog ..."
5482736f3913 ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents: 291
diff changeset
84 @svn2cl --strip-prefix "maputils/trunk/maps/" --group-by-day --include-rev
5482736f3913 ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents: 291
diff changeset
85 @touch $@
5482736f3913 ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents: 291
diff changeset
86
5482736f3913 ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents: 291
diff changeset
87 ChangeLog: .changelog
5482736f3913 ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents: 291
diff changeset
88