[mkbundle] Fix mapping length (#13061)
[mono-project.git] / sdks / builds / mxe.mk
blobd3e4c7910b2f1d725690a81e2fa59d5344129c6f
2 ifeq ($(UNAME),Linux)
3 LINUX_FLAVOR=$(shell ./determine-linux-flavor.sh)
4 endif
6 LINUX_WITH_MINGW=:Ubuntu:,:Debian:,:Debian GNU/Linux:
7 LINUX_HAS_MINGW=$(if $(findstring :$(LINUX_FLAVOR):,$(LINUX_WITH_MINGW)),yes)
9 ifeq ($(LINUX_HAS_MINGW),yes)
10 MXE_PREFIX=/usr
12 .PHONY: provision-mxe
13 provision-mxe:
14 @echo $(LINUX_FLAVOR) Linux does not require mxe provisioning. mingw from packages is used instead
15 else
16 MXE_SRC?=$(TOP)/sdks/builds/toolchains/mxe
17 MXE_PREFIX_DIR?=$(HOME)/android-toolchain
19 # This is not overridable
20 MXE_PREFIX:=$(MXE_PREFIX_DIR)/mxe-$(shell echo $(MXE_HASH) | head -c 7)
22 $(MXE_PREFIX)/.stamp:
23 rm -rf $(MXE_PREFIX) $(MXE_SRC)
24 git clone -b xamarin https://github.com/xamarin/mxe.git $(MXE_SRC) \
25 && git -C $(MXE_SRC) checkout $(MXE_HASH)
26 $(MAKE) -C $(MXE_SRC) gcc cmake zlib pthreads dlfcn-win32 mman-win32 \
27 PREFIX="$(MXE_PREFIX)" MXE_TARGETS="i686-w64-mingw32.static x86_64-w64-mingw32.static" \
28 OS_SHORT_NAME="disable-native-plugins" PATH="$$PATH:$(MXE_PREFIX)/bin:$(dir $(shell brew list gettext | grep bin/autopoint$))"
29 touch $@
31 .PHONY: provision-mxe
32 provision-mxe: $(MXE_PREFIX)/.stamp
33 endif
35 .PHONY: provision
36 provision: provision-mxe