Files
@ r20075:2bda14adc373
Branch filter:
Location: cpp/openttd-patchpack/source/Makefile.grf.in - annotation
r20075:2bda14adc373
2.7 KiB
text/plain
(svn r25038) -Fix [FS#5479]: minimise gaps feature caused removal to only happen at the signal build interval instead of the implicit interval of 1
r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r18374:ea9fdd784480 r15805:83ef427d044d r15859:1a0e19e54e67 r15892:c047b238dbdf r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r18581:273e8f67cd69 r18581:273e8f67cd69 r15859:1a0e19e54e67 r15805:83ef427d044d r15805:83ef427d044d r17947:429fbf8ea627 r17947:429fbf8ea627 r15805:83ef427d044d r15805:83ef427d044d r18581:273e8f67cd69 r15805:83ef427d044d r18581:273e8f67cd69 r18581:273e8f67cd69 r18581:273e8f67cd69 r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r18581:273e8f67cd69 r18581:273e8f67cd69 r18581:273e8f67cd69 r18581:273e8f67cd69 r15805:83ef427d044d r15859:1a0e19e54e67 r16308:51c3b474f96d r15892:c047b238dbdf r16308:51c3b474f96d r15805:83ef427d044d r18581:273e8f67cd69 r15892:c047b238dbdf r19110:4b2cb8e165ae r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r16049:533aca9c3542 r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d r15805:83ef427d044d | # $Id$
# This file is part of OpenTTD.
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
#
# Building requires GRFCodec and NFORenum. Older versions of GRFCodec are
# known to miscompile the graphics.
#
# Recent nightlies (including sources) of both can be found at:
# http://www.openttd.org/download-grfcodec
# http://www.openttd.org/download-nforenum
#
# The mercurial repository of both can be found at:
# http://hg.openttdcoop.org/grfcodec
# http://hg.openttdcoop.org/nforenum
#
ROOT_DIR = !!ROOT_DIR!!
GRF_DIR = $(ROOT_DIR)/media/extra_grf
BIN_DIR = !!BIN_DIR!!/baseset
OBJS_DIR = !!GRF_OBJS_DIR!!
OS = !!OS!!
STAGE = !!STAGE!!
# Check if we want to show what we are doing
ifdef VERBOSE
Q =
E = @true
else
Q = @
E = @echo
endif
GRFCODEC := !!GRFCODEC!!
NFORENUM := !!NFORENUM!!
MD5SUM := $(shell [ "$(OS)" = "OSX" ] && echo "md5 -r" || echo "md5sum")
# Some "should not be changed" settings.
NFO_FILES := $(GRF_DIR)/*.nfo $(GRF_DIR)/rivers/*.nfo
PNG_FILES := $(GRF_DIR)/*.png $(GRF_DIR)/rivers/*.png
# Build the GRF.
ifdef GRFCODEC
all: $(BIN_DIR)/openttd.grf
else
all:
endif
# Make sure the sprites directory exists.
$(OBJS_DIR)/sprites:
$(Q)-mkdir "$@"
# Generic
$(BIN_DIR)/openttd.grf: $(OBJS_DIR)/openttd.grf
$(Q)cp $(OBJS_DIR)/openttd.grf $(BIN_DIR)/openttd.grf
$(E) '$(STAGE) Updating base graphics sets'
$(Q) for grf in $(BIN_DIR)/orig*.obg; do sed 's/^OPENTTD.GRF = [0-9a-f]*$$/OPENTTD.GRF = '`$(MD5SUM) $(BIN_DIR)/openttd.grf | sed 's@ .*@@'`'/' $$grf > $$grf.tmp && mv $$grf.tmp $$grf; done
# Yeah, we'd like to use -i in the sed, but Mac OS X's sed and GNU sed just can't agree on the usage of -i. In any case either one of them fails.
$(OBJS_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites
$(E) '$(STAGE) Assembling openttd.nfo'
$(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null
$(Q) gcc -I$(GRF_DIR) -C -E - < "$(GRF_DIR)/openttd.nfo" | sed -e '/^#/d' -e '/^$$/d' > $(OBJS_DIR)/sprites/openttd.nfo
$(Q) $(NFORENUM) -s $(OBJS_DIR)/sprites/openttd.nfo
$(E) '$(STAGE) Compiling openttd.grf'
$(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/openttd.grf
# Clean up temporary files.
clean:
$(Q)rm -f *.bak *.grf
# Clean up temporary files
mrproper: clean
$(Q)rm -fr sprites
.PHONY: all mrproper depend clean
|