Commit b46992f6 authored by Mark Olesen's avatar Mark Olesen Committed by Andrew Heather
Browse files

COMP: compile wmake toolchain for host when cross-compiling

parent 137130e4
......@@ -7,6 +7,16 @@ then
export WM_DIR
fi
make # Compile tools for wmake
# Compile wmake toolchain
make
case "$WM_COMPILER" in
Mingw*)
# Host wmake toolchain with system gcc (when cross-compiling)
make \
WM_COMPILER=Gcc WM_COMPILER_TYPE=system \
WMAKE_BIN="${WM_DIR}/platforms/${WM_ARCH}${WM_COMPILER}"
;;
esac
#------------------------------------------------------------------------------
......@@ -54,19 +54,27 @@ WM_COMPILE_OPTION = Opt
GENERAL_RULES = $(WM_DIR)/rules/General
include $(GENERAL_RULES)/general
archHost := $(WM_ARCH)$(WM_COMPILER)
archTarget := $(shell basename $(WMAKE_BIN))
#------------------------------------------------------------------------------
# Targets
#------------------------------------------------------------------------------
.PHONY: all clean
.PHONY: all clean message
all: $(WMAKE_BIN)/wmkdepend$(EXT_EXE) message
all: \
$(WMAKE_BIN)/wmkdepend$(EXT_EXE)
@echo "built wmake-bin for $(WM_ARCH)$(WM_COMPILER)"
message:
ifneq ($(archHost),$(archTarget))
@echo "built wmake-bin ($(archTarget)) for $(archHost) host"
else
@echo "built wmake-bin ($(archTarget))"
endif
clean:
@echo "clean wmake-bin for $(WM_ARCH)$(WM_COMPILER)"
@echo "clean wmake-bin ($(archTarget))"
@rm -rf $(WMAKE_BIN) 2>/dev/null
@rmdir $(shell dirname $(WMAKE_BIN)) 2>/dev/null || true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment