Mercurial > hg > batmud > maputils
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 |
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 | 31 |
32 # | |
99 | 33 # Target rules |
39 | 34 # |
103
58a07f7c50b7
Updated locations; Makefile improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
99
diff
changeset
|
35 all: $(patsubst %.map,%.ppm,$(MAPLIST)) $(TARGETS) |
39 | 36 |
346
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
37 |
307 | 38 #laenor.map: |
39 # cat ~/mapping.log | grep -v "^$$" > tmp | |
40 # $(MKSPECIAL_BIN) -v -o $@ -r 100 -R 65 -m 40 tmp -a -d -I $(patsubst %.map,%.initial,$@) | |
215 | 41 |
346
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
42 include Makefile.inc |
99 | 43 |
44 world.map: $(MAPLIST) $(COMBINE_BIN) | |
45 $(COMBINE_BIN) -v -f "~" $(MAPLISTOFFS) -o $@ | |
46 | |
47 world.loc: $(patsubst %.map,%.loc,$(MAPLIST)) | |
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 > $@ | |
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 | 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 | 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 | 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 | 58 |
346
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
59 |
39 | 60 # |
61 # Special targets | |
62 # | |
317 | 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 | 65 scp $? $(UPURL2) |
141 | 66 touch $@ |
95
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
67 |
317 | 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 | 72 clean: |
299 | 73 $(RM) $(TARGETS) *.o |
39 | 74 |
75 srcclean: clean | |
299 | 76 $(RM) *~ |
39 | 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 |