Changeset - r20087:f95c02581a97
[Not reviewed]
master
0 1 0
rubidium - 12 years ago 2013-02-26 20:48:50
rubidium@openttd.org
(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
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
Makefile.grf.in
Show inline comments
 
@@ -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 @@ endif
 
$(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
0 comments (0 inline, 0 general)