diff 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
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
 #