From 8808e9cfaae5e23cb4dbe9822f214bf32ece872f Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 26 Feb 2013 20:48:50 +0000 Subject: [PATCH] (svn r25050) -Fix: use the CC_BUILD compiler for preprocessing the extra GRF's source instead of a hardcoded gcc -Fix: do not let gcc include files from the "standard C" include directories; newer gcc/libc seem to otherwise automatically include some header files at the top of the preprocessed nfo files which causes NFOrenum/GRFcodec to make invalid assumptions about the NFO version --- Makefile.grf.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.grf.in b/Makefile.grf.in index 45fb919f51..de9024d8ae 100644 --- a/Makefile.grf.in +++ b/Makefile.grf.in @@ -36,6 +36,7 @@ endif GRFCODEC := !!GRFCODEC!! NFORENUM := !!NFORENUM!! +CC_BUILD := !!CC_BUILD!! MD5SUM := $(shell [ "$(OS)" = "OSX" ] && echo "md5 -r" || echo "md5sum") # Some "should not be changed" settings. @@ -63,7 +64,7 @@ $(BIN_DIR)/openttd.grf: $(OBJS_DIR)/openttd.grf $(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) $(CC_BUILD) -nostdinc -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