Mercurial > hg > batmud > maputils
changeset 346:721bfe123726
Minor refactoring of the build files.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 11 Jul 2007 22:07:35 +0000 |
parents | 4aea8305e46f |
children | 56db61a254d4 |
files | maps/Makefile maps/Makefile.inc maps/config.mak |
diffstat | 3 files changed, 77 insertions(+), 71 deletions(-) [+] |
line wrap: on
line diff
--- a/maps/Makefile Wed Jul 11 22:06:51 2007 +0000 +++ b/maps/Makefile Wed Jul 11 22:07:35 2007 +0000 @@ -1,49 +1,45 @@ -include ../Makefile.inc -include Makefile.inc +include ../config.mak +include config.mak + + +# +# Mangles +# +MAPLISTOFFS= \ + laenor.map:1313:1486 \ + furn.map:2458:2615 \ + roth.map:2786:15 \ + luc.map:644:3811 \ + deso.map:54:2285 \ + renardy.map:3549:380 + + +MAPLIST=laenor.map roth.map luc.map furn.map deso.map renardy.map + + +COLORMAP_BIN=$(BINPATH)colormap$(EXEEXT) +MKLOC_BIN=$(BINPATH)mkloc$(EXEEXT) +MKSPECIAL_BIN=$(BINPATH)mkspecial$(EXEEXT) +MAP2PPM_BIN=$(BINPATH)map2ppm$(EXEEXT) +COMBINE_BIN=$(BINPATH)combine$(EXEEXT) +MAP3D_BIN=$(BINPATH)map3d$(EXEEXT) +TARGETS=$(patsubst %.map,%.html,$(MAPLIST)) \ + $(patsubst %.map,%.htm,$(MAPLIST)) \ + $(patsubst %.map,%.ansi,$(MAPLIST)) \ + $(patsubst %.map,%.png,$(MAPLIST)) + # # Target rules # all: $(patsubst %.map,%.ppm,$(MAPLIST)) $(TARGETS) + #laenor.map: # cat ~/mapping.log | grep -v "^$$" > tmp # $(MKSPECIAL_BIN) -v -o $@ -r 100 -R 65 -m 40 tmp -a -d -I $(patsubst %.map,%.initial,$@) -%.tmp: %.map %.loc $(MKLOC_BIN) - $(MKLOC_BIN) -v -o $@ -m $< -l $(patsubst %.map,%.loc,$<) - -%.tmp2: %.map %.loc $(MKLOC_BIN) - $(MKLOC_BIN) -vN -o $@ -m $< -l $(patsubst %.map,%.loc,$<) - -%.kakka: %.loc $(MKLOC_BIN) - $(MKLOC_BIN) -vM -l $< -o $@ - -%.html: %.tmp %.desc $(COLORMAP_BIN) - $(COLORMAP_BIN) -t "`cat $(patsubst %.tmp,%.desc,$<)`" -vaC -f xhtml -o $@ $< - -%.htm: %.tmp2 %.desc %.kakka $(COLORMAP_BIN) - $(COLORMAP_BIN) -t "`cat $(patsubst %.tmp2,%.desc,$<)`" -vaCP -f xhtml $< | \ - sed -e "/@LOCATIONS@/r $(patsubst %.tmp2,%.kakka,$<)" -e "s/@LOCATIONS@//g" > $@ - - -%.ansi: %.tmp %.desc $(COLORMAP_BIN) - $(COLORMAP_BIN) -t "`cat $(patsubst %.tmp,%.desc,$<)`" -vaC -f ansi -o $@ $< - -%.script: %.map %.loc $(MKLOC_BIN) - $(MKLOC_BIN) -vS -m $< -l $(patsubst %.map,%.loc,$<) -f $(FONTSCALE) -u $(UNITSIZE) -s $(MAPSCALE) | \ - sed -e "s/@OPTS_START@/-font MonospaceBold.ttf -pointsize 14 -type TruecolorMatte/g" \ - -e "s/@OPTS_END@/\t-geometry +0+5 title.png -composite -compose screen \\\\\n\t-pointsize 20 -fill white -box none -draw \"text 10,35 \'@PAF@\n\n\n/g" | \ - sed -e "/@PAF@/r $(patsubst %.map,%.desc,$<)" -e "s/@PAF@//g" > $@ - -%.ppm: %.map $(MAP2PPM_BIN) - $(MAP2PPM_BIN) -v $< | pnmscale $(MAPSCALE) -nomix > $@ - -%.png: %.ppm %.script %.desc - /bin/sh $(patsubst %.ppm,%.script,$<) $< $@ - -%.jpg: %.ppm %.script %.desc - /bin/sh $(patsubst %.ppm,%.script,$<) $< $@ +include Makefile.inc world.map: $(MAPLIST) $(COMBINE_BIN) $(COMBINE_BIN) -v -f "~" $(MAPLISTOFFS) -o $@ @@ -60,6 +56,7 @@ -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" | \ sed -e "/@PAF@/r $(patsubst %.map,%.desc,$<)" -e "s/@PAF@//g" > $@ + # # Special targets #
--- a/maps/Makefile.inc Wed Jul 11 22:06:51 2007 +0000 +++ b/maps/Makefile.inc Wed Jul 11 22:07:35 2007 +0000 @@ -1,43 +1,36 @@ -# -# Settings -# -#FONT=/usr/share/fonts/arial.ttf -#FONT=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximb.ttf -FONT=MonospaceBold.ttf -FONTSCALE=8.0 -UNITSIZE=4.0 -MAPSCALE=4 + +%.tmp: %.map %.loc $(MKLOC_BIN) + $(MKLOC_BIN) -v -o $@ -m $< -l $(patsubst %.map,%.loc,$<) + +%.tmp2: %.map %.loc $(MKLOC_BIN) + $(MKLOC_BIN) -vN -o $@ -m $< -l $(patsubst %.map,%.loc,$<) -WORLDUNITSIZE=3.0 -WORLDMAPSCALE=0.5 +%.tmp3: %.loc $(MKLOC_BIN) + $(MKLOC_BIN) -vM -l $< -o $@ -UPURL=mhamalai@students.oamk.fi:public_html/bat/maps/ -UPURL2=tnsp@irc.saitti.net:public_html/maps/ +%.html: %.tmp %.desc $(COLORMAP_BIN) + $(COLORMAP_BIN) -t "`cat $(patsubst %.tmp,%.desc,$<)`" -vaC -f xhtml -o $@ $< + +%.htm: %.tmp2 %.desc %.tmp3 $(COLORMAP_BIN) + $(COLORMAP_BIN) -t "`cat $(patsubst %.tmp2,%.desc,$<)`" -vaCP -f xhtml $< | \ + sed -e "/@LOCATIONS@/r $(patsubst %.tmp2,%.tmp3,$<)" -e "s/@LOCATIONS@//g" > $@ -BINPATH=../ -EXEEXT= +%.ansi: %.tmp %.desc $(COLORMAP_BIN) + $(COLORMAP_BIN) -t "`cat $(patsubst %.tmp,%.desc,$<)`" -vaC -f ansi -o $@ $< -MAPLISTOFFS= \ - laenor.map:1313:1486 \ - furn.map:2458:2615 \ - roth.map:2786:15 \ - luc.map:644:3811 \ - deso.map:54:2285 \ - renardy.map:3549:380 - +%.script: %.map %.loc $(MKLOC_BIN) + $(MKLOC_BIN) -vS -m $< -l $(patsubst %.map,%.loc,$<) -f $(FONTSCALE) -u $(UNITSIZE) -s $(MAPSCALE) | \ + sed -e "s/@OPTS_START@/-font MonospaceBold.ttf -pointsize 14 -type TruecolorMatte/g" \ + -e "s/@OPTS_END@/\t-geometry +0+5 title.png -composite -compose screen \\\\\n\t-pointsize 20 -fill white -box none -draw \"text 10,35 \'@PAF@\n\n\n/g" | \ + sed -e "/@PAF@/r $(patsubst %.map,%.desc,$<)" -e "s/@PAF@//g" > $@ -MAPLIST=laenor.map roth.map luc.map furn.map deso.map renardy.map - +%.ppm: %.map $(MAP2PPM_BIN) + $(MAP2PPM_BIN) -v $< | pnmscale $(MAPSCALE) -nomix > $@ -COLORMAP_BIN=$(BINPATH)colormap$(EXEEXT) -MKLOC_BIN=$(BINPATH)mkloc$(EXEEXT) -MKSPECIAL_BIN=$(BINPATH)mkspecial$(EXEEXT) -MAP2PPM_BIN=$(BINPATH)map2ppm$(EXEEXT) -COMBINE_BIN=$(BINPATH)combine$(EXEEXT) -MAP3D_BIN=$(BINPATH)map3d$(EXEEXT) -TARGETS=$(patsubst %.map,%.html,$(MAPLIST)) \ - $(patsubst %.map,%.htm,$(MAPLIST)) \ - $(patsubst %.map,%.ansi,$(MAPLIST)) \ - $(patsubst %.map,%.png,$(MAPLIST)) +%.png: %.ppm %.script %.desc + /bin/sh $(patsubst %.ppm,%.script,$<) $< $@ +%.jpg: %.ppm %.script %.desc + /bin/sh $(patsubst %.ppm,%.script,$<) $< $@ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/maps/config.mak Wed Jul 11 22:07:35 2007 +0000 @@ -0,0 +1,16 @@ +# +# Settings +# +#FONT=/usr/share/fonts/arial.ttf +#FONT=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximb.ttf +FONT=MonospaceBold.ttf +FONTSCALE=8.0 +UNITSIZE=4.0 +MAPSCALE=4 + +WORLDUNITSIZE=3.0 +WORLDMAPSCALE=0.5 + +BINPATH=../ +EXEEXT= +