mirror of https://github.com/OpenTTD/OpenTTD.git
(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
This commit is contained in:
parent
8bf949b956
commit
8808e9cfaa
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue