changeset 2316:2a920c6b58c8

Move few definitions and settings from Makefile.gen to config.mak
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 30 Jan 2021 13:13:48 +0200
parents 1bba63b2d78f
children f90303eec665
files Makefile.gen config.mak
diffstat 2 files changed, 24 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.gen	Sun Jan 17 21:57:53 2021 +0200
+++ b/Makefile.gen	Sat Jan 30 13:13:48 2021 +0200
@@ -2,19 +2,6 @@
 ### Include configuration
 ###
 include config.mak
-THLIBS = th-libs/
-CFLAGS += -I$(THLIBS) -I.
-CFLAGS += -DTH_PROG_AUTHOR="\"Written by Matti 'ccr' Hamalainen (C) Copyright 2006-2020 TNSP\""
-CFLAGS += -DTH_PROG_LICENSE="\"This software is licensed under GNU General Public License version 2\""
-MAP_PATH = misc/
-
-
-###
-### List of map targets
-###
-MAP_FILES=votk faerieforest lanzia rilynttar lorenchia \
-	esiris esiris2 arelium calythien tyr_farwyn \
-	dortlewall vendace_shore
 
 
 ###
@@ -41,7 +28,7 @@
 	$(MKLOC_BIN) $(COMBINE_BIN) $(MAPSTATS_BIN)
 
 ifneq ($(BUILD_MAPS),no)
-TARGETS += $(addprefix $(MAP_PATH),$(addsuffix .html,$(MAP_FILES)))
+TARGETS += $(addprefix $(MISC_MAPS_PATH),$(addsuffix .html,$(MISC_MAPS)))
 endif
 
 
@@ -92,8 +79,8 @@
 ###
 ### Map targets
 ###
-$(MAP_PATH)%.html: $(MAP_PATH)%.map $(MAP_PATH)%.loc $(MAP_PATH)%.desc $(MKCITYMAP_BIN) tooltip.js $(MAP_PATH)misc.html
-	$(MKCITYMAP_BIN) $(MKCITYMAP_OPTS) -h $(MAP_PATH)misc.html -t "`cat $(patsubst %.map,%.desc,$<)`" $< $(patsubst %.map,%.loc,$<) `cat $(patsubst %.map,%.opts,$<)` -o "$@"
+$(MISC_MAPS_PATH)%.html: $(MISC_MAPS_PATH)%.map $(MISC_MAPS_PATH)%.loc $(MISC_MAPS_PATH)%.desc $(MKCITYMAP_BIN) tooltip.js $(MISC_MAPS_PATH)misc.html
+	$(MKCITYMAP_BIN) $(MKCITYMAP_OPTS) -h $(MISC_MAPS_PATH)misc.html -t "`cat $(patsubst %.map,%.desc,$<)`" $< $(patsubst %.map,%.loc,$<) `cat $(patsubst %.map,%.opts,$<)` -o "$@"
 
 
 ###
@@ -103,9 +90,9 @@
 	@hg up
 	@hg2cl
 
-upload: tooltip.js util.js $(MAP_PATH)misc.css \
-	$(addprefix $(MAP_PATH),$(addsuffix .html,$(MAP_FILES))) \
-	$(addprefix $(MAP_PATH),$(addsuffix .map,$(MAP_FILES))) \
-	$(addprefix $(MAP_PATH),$(addsuffix .loc,$(MAP_FILES)))
+upload: tooltip.js util.js $(MISC_MAPS_PATH)misc.css \
+	$(addprefix $(MISC_MAPS_PATH),$(addsuffix .html,$(MISC_MAPS))) \
+	$(addprefix $(MISC_MAPS_PATH),$(addsuffix .map,$(MISC_MAPS))) \
+	$(addprefix $(MISC_MAPS_PATH),$(addsuffix .loc,$(MISC_MAPS)))
 	$(RSCP) $? $(UPLOAD_URL)
 	@touch $@
--- a/config.mak	Sun Jan 17 21:57:53 2021 +0200
+++ b/config.mak	Sat Jan 30 13:13:48 2021 +0200
@@ -1,6 +1,9 @@
 #
 # Global settings
 #
+THLIBS = th-libs/
+CFLAGS += -I$(THLIBS) -I.
+
 CFLAGS += -g -W -Wall -Wextra -DNDEBUG -D_XOPEN_SOURCE=500 -std=c99
 CFLAGS += -O2
 #CFLAGS += -pedantic
@@ -15,3 +18,17 @@
 
 RSCP = rsync -vptogz -e ssh
 
+
+CFLAGS += -DTH_PROG_AUTHOR="\"Written by Matti 'ccr' Hamalainen (C) Copyright 2006-2020 TNSP\""
+CFLAGS += -DTH_PROG_LICENSE="\"This software is licensed under GNU General Public License version 2\""
+
+
+###
+### List of miscellaneous map targets
+###
+MISC_MAPS_PATH = misc/
+MISC_MAPS=votk faerieforest lanzia rilynttar lorenchia \
+	esiris esiris2 arelium calythien tyr_farwyn \
+	dortlewall vendace_shore
+
+