Mercurial > hg > batmud > maputils
changeset 95:0d2b25e342df
Also make PNG images from maps
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 17 Dec 2006 10:03:12 +0000 |
parents | 5908d10e63c3 |
children | 3d10542703a9 |
files | maps/Makefile |
diffstat | 1 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/maps/Makefile Sun Dec 17 08:03:02 2006 +0000 +++ b/maps/Makefile Sun Dec 17 10:03:12 2006 +0000 @@ -1,11 +1,9 @@ # # Settings # -TARGETS=laenor.html laenor.ansi \ - roth.ansi roth.html \ - luc.ansi luc.html \ - furn.html furn.ansi \ - deso.ansi deso.html +MAPLIST=laenor.map roth.map luc.map furn.map deso.map + +TARGETS=$(patsubst %.map,%.html,$(MAPLIST)) $(patsubst %.map,%.ansi,$(MAPLIST)) $(patsubst %.map,%.png,$(MAPLIST)) UPURL=mhamalai@students.oamk.fi:public_html/bat/maps/ @@ -18,6 +16,7 @@ # COLORMAP_BIN=$(BINPATH)colormap$(EXEEXT) MKLOC_BIN=$(BINPATH)mkloc$(EXEEXT) +MAP2PPM_BIN=$(BINPATH)map2ppm$(EXEEXT) # @@ -31,19 +30,22 @@ %.tmp: %.map %.loc $(MKLOC_BIN) -v -o $@ -m $< -l $(patsubst %.map,%.loc,$<) - scp $(patsubst %.map,%.loc,$<) $(UPURL) %.ansi: %.tmp %.desc $(COLORANSI_BIN) $(COLORMAP_BIN) -t "`cat $(patsubst %.tmp,%.desc,$<)`" -vaC -f ansi -o $@ $< - scp $@ $(UPURL) %.html: %.tmp %.desc $(COLORMAP_BIN) $(COLORMAP_BIN) -t "`cat $(patsubst %.tmp,%.desc,$<)`" -vaC -f xhtml -o $@ $< - scp $@ $(UPURL) + +%.png: %.map $(MAP2PPM_BIN) + $(MAP2PPM_BIN) -v $< | pnmscale 2 | pnmtopng -compression=9 > $@ # # Special targets # +upload: $(TARGETS) *.loc + scp $+ $(UPURL) + clean: $(RM) -f $(TARGETS) *.o