2 ANDROID_URI?
=https
://dl.google.com
/android
/repository
/
3 ANT_URI?
=https
://archive.apache.org
/dist/ant
/binaries
/
5 ANDROID_SDK_PREFIX?
=$(ANDROID_TOOLCHAIN_DIR
)/sdk
6 ANDROID_TOOLCHAIN_PREFIX?
=$(ANDROID_TOOLCHAIN_DIR
)/toolchains
7 ANDROID_NEW_NDK
=$(shell if
test `grep 'Pkg\.Revision' $(ANDROID_TOOLCHAIN_DIR)/ndk/source.properties | cut -d '=' -f 2 | tr -d ' ' | cut -d '.' -f 1` -ge
18; then echo yes
; else echo no
; fi
)
9 android_SOURCES_DIR
= $(TOP
)/sdks
/out
/android-sources
11 ifneq ($(UNAME
),Windows
)
12 android_ARCHIVE
+= android-sources
13 ADDITIONAL_PACKAGE_DEPS
+= $(android_SOURCES_DIR
)
20 # $(3): subdir (optional)
21 # $(4): stamp (optional, default to $(1))
22 define AndroidProvisioningTemplate
24 $$(ANDROID_TOOLCHAIN_CACHE_DIR
)/$(1).zip
:
26 wget
--no-verbose
-O
$$@
$$(ANDROID_URI
)$(1).zip
28 $$(ANDROID_TOOLCHAIN_DIR
)/$(2)/.stamp-
$$(or
$(4),$(1)): $$(ANDROID_TOOLCHAIN_CACHE_DIR
)/$(1).zip
30 rm -rf
$$(ANDROID_TOOLCHAIN_DIR
)/$(2)$$(if
$(3),/$(3))
31 .
/unzip-android-archive.sh
"$$<" "$$(ANDROID_TOOLCHAIN_DIR)/$(2)$$(if $(3),/$(3))"
34 .PHONY
: provision-android
35 provision-android
: $$(ANDROID_TOOLCHAIN_DIR
)/$(2)/.stamp-
$$(or
$(4),$(1))
43 # $(3): subdir (optional)
44 # $(4): stamp (optional, default to $(1))
45 define AndroidProvisioningTemplateStub
47 .PHONY
: provision-android-
$(1)
48 provision-android-
$(1):
49 @echo
"TODO: provision $(2)/.stamp-$$(or $(4),$(1)) for $$(UNAME)"
51 .PHONY
: provision-android
52 provision-android
: provision-android-
$(1)
56 ifeq ($(UNAME
),Darwin
)
57 $(eval
$(call AndroidProvisioningTemplate
,android-ndk-
$(ANDROID_NDK_VERSION
)-darwin-x86_64
,ndk
,,ndk
))
58 $(eval
$(call AndroidProvisioningTemplate
,platform-tools_r
$(ANDROID_PLATFORM_TOOLS_VERSION
)-darwin
,sdk
,platform-tools
))
59 $(eval
$(call AndroidProvisioningTemplate
,sdk-tools-darwin-
$(ANDROID_SDKTOOLS_VERSION
),sdk
,tools
))
60 $(eval
$(call AndroidProvisioningTemplate
,cmake-
$(ANDROID_CMAKE_VERSION
)-darwin-x86_64
,sdk
,cmake
/$(ANDROID_CMAKE_VERSION
)))
61 else ifeq ($(UNAME
),Linux
)
62 $(eval
$(call AndroidProvisioningTemplate
,android-ndk-
$(ANDROID_NDK_VERSION
)-linux-x86_64
,ndk
,,ndk
))
63 $(eval
$(call AndroidProvisioningTemplate
,platform-tools_r
$(ANDROID_PLATFORM_TOOLS_VERSION
)-linux
,sdk
,platform-tools
))
64 $(eval
$(call AndroidProvisioningTemplate
,sdk-tools-linux-
$(ANDROID_SDKTOOLS_VERSION
),sdk
,tools
))
65 $(eval
$(call AndroidProvisioningTemplate
,cmake-
$(ANDROID_CMAKE_VERSION
)-linux-x86_64
,sdk
,cmake
/$(ANDROID_CMAKE_VERSION
)))
66 else ifeq ($(UNAME
),Windows
)
67 $(eval
$(call AndroidProvisioningTemplateStub
,android-ndk-
$(ANDROID_NDK_VERSION
)-win32-x86_64
,ndk
,,ndk
))
68 $(eval
$(call AndroidProvisioningTemplateStub
,platform-tools_r
$(ANDROID_PLATFORM_TOOLS_VERSION
)-win32
,sdk
,platform-tools
))
69 $(eval
$(call AndroidProvisioningTemplateStub
,sdk-tools-win32-
$(ANDROID_SDKTOOLS_VERSION
),sdk
,tools
))
70 $(eval
$(call AndroidProvisioningTemplateStub
,cmake-
$(ANDROID_CMAKE_VERSION
)-win32-x86_64
,sdk
,cmake
/$(ANDROID_CMAKE_VERSION
)))
82 # android-$(1)_CXXFLAGS
83 # android-$(1)_LDFLAGS
84 define AndroidTargetTemplate
86 _android-
$(1)_AR
=$$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/bin
/$(3)-ar
87 _android-
$(1)_AS
=$$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/bin
/$(3)-as
88 _android-
$(1)_CC
=$$(CCACHE
) $$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/bin
/$(3)-clang
89 _android-
$(1)_CXX
=$$(CCACHE
) $$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/bin
/$(3)-clang
++
90 _android-
$(1)_CPP
=$$(CCACHE
) $$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/bin
/$(3)-$$(if
$(wildcard $$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/bin
/$(3)-cpp),cpp,clang
-E
)
91 _android-
$(1)_CXXCPP
=$$(CCACHE
) $$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/bin
/$(3)-$$(if
$(wildcard $$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/bin
/$(3)-cpp),cpp,clang
++ -E
)
92 _android-
$(1)_DLLTOOL
=
93 _android-
$(1)_LD
=$$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/bin
/$(3)-ld
94 _android-
$(1)_OBJDUMP
="$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-objdump"
95 _android-
$(1)_RANLIB
=$$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/bin
/$(3)-ranlib
96 _android-
$(1)_CMAKE
=$$(ANDROID_SDK_PREFIX
)/cmake
/$(ANDROID_CMAKE_VERSION
)/bin
/cmake
97 _android-
$(1)_STRIP
=$$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/bin
/$(3)-strip
99 _android-
$(1)_AC_VARS
= \
101 ac_cv_func_sched_getaffinity
=no \
102 ac_cv_func_sched_setaffinity
=no \
103 ac_cv_func_shm_open_working_with_mmap
=no
105 _android-
$(1)_CFLAGS
= \
107 -DMONODROID
=1 $$(if
$$(filter $$(ANDROID_NEW_NDK
),yes
),-D__ANDROID_API__
=$$(ANDROID_SDK_VERSION_
$(1)))
109 _android-
$(1)_CXXFLAGS
= \
111 -DMONODROID
=1 $$(if
$$(filter $$(ANDROID_NEW_NDK
),yes
),-D__ANDROID_API__
=$$(ANDROID_SDK_VERSION_
$(1)))
114 _android-
$(1)_CPPFLAGS
= \
115 -I
$$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/sysroot
/usr
/include
117 _android-
$(1)_CXXCPPFLAGS
= \
118 -I
$$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
/sysroot
/usr
/include
120 _android-
$(1)_LDFLAGS
= \
121 -z now
-z relro
-z noexecstack \
122 -ldl
-lm
-llog
-lc
-lgcc \
123 -Wl
,-rpath-link
=$$(ANDROID_TOOLCHAIN_DIR
)/ndk
/platforms
/android-
$$(ANDROID_SDK_VERSION_
$(1))/arch-
$(2)/usr
/lib
,-dynamic-linker
=/system
/bin
/linker \
124 -L
$$(ANDROID_TOOLCHAIN_DIR
)/ndk
/platforms
/android-
$$(ANDROID_SDK_VERSION_
$(1))/arch-
$(2)/usr
/lib
126 _android-
$(1)_CONFIGURE_FLAGS
= \
128 --disable-executables \
130 --disable-mcs-build \
132 --enable-dynamic-btls \
133 --enable-maintainer-mode \
134 --enable-minimal
=ssa
,portability
,attach
,verifier
,full_messages
,sgen_remset
,sgen_marksweep_par
,sgen_marksweep_fixed
,sgen_marksweep_fixed_par
,sgen_copying
,logging
,security
,shared_handles
,interpreter \
136 --with-btls-android-ndk
=$$(ANDROID_TOOLCHAIN_DIR
)/ndk \
137 --with-btls-android-api
=$$(ANDROID_SDK_VERSION_
$(1)) \
138 $$(if
$$(filter $$(ANDROID_NEW_NDK
),yes
),--with-btls-android-ndk-asm-workaround
) \
139 --with-btls-android-cmake-toolchain
=$$(ANDROID_TOOLCHAIN_DIR
)/ndk
/build
/cmake
/android.toolchain.cmake \
140 --with-sigaltstack
=yes \
142 --without-ikvm-native \
143 --disable-cooperative-suspend \
144 --disable-hybrid-suspend \
145 --disable-crash-reporting
147 .stamp-android-
$(1)-toolchain
: |
$$(if
$$(IGNORE_PROVISION_ANDROID
),,provision-android
)
148 python
"$$(ANDROID_TOOLCHAIN_DIR)/ndk/build/tools/make_standalone_toolchain.py" --verbose
--force --api
=$$(ANDROID_SDK_VERSION_
$(1)) --arch
=$(2) --install-dir
=$$(ANDROID_TOOLCHAIN_PREFIX
)/$(1)-clang
151 $$(eval
$$(call RuntimeTemplate
,android
,$(1),$(4)))
163 # android-$(1)_CFLAGS
164 # android-$(1)_CXXFLAGS
165 # android-$(1)_LDFLAGS
166 define AndroidTargetTemplateStub
168 .stamp-android-
$(1)-toolchain
: |
$$(if
$$(IGNORE_PROVISION_ANDROID
),,provision-android
)
171 $$(eval
$$(call RuntimeTemplateStub
,android
,$(1),$(4)))
175 ## android-armeabi-v7a
176 android-armeabi-v7a_CFLAGS
=-D__POSIX_VISIBLE
=201002 -DSK_RELEASE
-DNDEBUG
-UDEBUG
-fpic
-march
=armv7-a
-mtune
=cortex-a8
-mfpu
=vfp
-mfloat-abi
=softfp
177 android-armeabi-v7a_CXXFLAGS
=-D__POSIX_VISIBLE
=201002 -DSK_RELEASE
-DNDEBUG
-UDEBUG
-fpic
-march
=armv7-a
-mtune
=cortex-a8
-mfpu
=vfp
-mfloat-abi
=softfp
178 android-armeabi-v7a_LDFLAGS
=-Wl
,--fix-cortex-a8
179 ifeq ($(UNAME
),Windows
)
180 $(eval
$(call AndroidTargetTemplateStub
,armeabi-v7a
,arm
,arm-linux-androideabi
,armv5-linux-androideabi
))
182 $(eval
$(call AndroidTargetTemplate
,armeabi-v7a
,arm
,arm-linux-androideabi
,armv5-linux-androideabi
))
186 android-arm64-v8a_CFLAGS
=-D__POSIX_VISIBLE
=201002 -DSK_RELEASE
-DNDEBUG
-UDEBUG
-fpic
-DL_cuserid
=9 -DANDROID64
187 android-arm64-v8a_CXXFLAGS
=-D__POSIX_VISIBLE
=201002 -DSK_RELEASE
-DNDEBUG
-UDEBUG
-fpic
-DL_cuserid
=9 -DANDROID64
188 ifeq ($(UNAME
),Windows
)
189 $(eval
$(call AndroidTargetTemplateStub
,arm64-v8a
,arm64
,aarch64-linux-android
,aarch64-linux-android
))
191 $(eval
$(call AndroidTargetTemplate
,arm64-v8a
,arm64
,aarch64-linux-android
,aarch64-linux-android
))
195 ifeq ($(UNAME
),Windows
)
196 $(eval
$(call AndroidTargetTemplateStub
,x86
,x86
,i686-linux-android
,i686-linux-android
))
198 $(eval
$(call AndroidTargetTemplate
,x86
,x86
,i686-linux-android
,i686-linux-android
))
202 android-x86_64_CFLAGS
=-DL_cuserid
=9
203 android-x86_64_CXXFLAGS
=-DL_cuserid
=9
204 ifeq ($(UNAME
),Windows
)
205 $(eval
$(call AndroidTargetTemplateStub
,x86_64
,x86_64
,x86_64-linux-android
,x86_64-linux-android
))
207 $(eval
$(call AndroidTargetTemplate
,x86_64
,x86_64
,x86_64-linux-android
,x86_64-linux-android
))
215 # android-$(1)_CFLAGS
216 # android-$(1)_CXXFLAGS
217 define AndroidHostTemplate
222 _android-
$(1)_CXX
=c
++
223 _android-
$(1)_CXXCPP
=cpp
225 _android-
$(1)_RANLIB
=ranlib
226 _android-
$(1)_STRIP
=strip
228 _android-
$(1)_CFLAGS
= \
229 $$(if
$$(filter $$(UNAME
),Darwin
),-mmacosx-version-min
=10.9)
231 _android-
$(1)_CONFIGURE_FLAGS
= \
234 --disable-mono-debugger \
236 --disable-mcs-build \
237 --enable-dynamic-btls \
238 --enable-maintainer-mode \
241 --without-ikvm-native \
242 --disable-crash-reporting
244 .stamp-android-
$(1)-toolchain
:
247 $$(eval
$$(call RuntimeTemplate
,android
,$(1)))
251 # on Windows, we use the AndroidHostMxeTemplate, instead
252 ifneq ($(UNAME
),Windows
)
253 $(eval
$(call AndroidHostTemplate
,host-
$(UNAME
)))
260 define AndroidHostMxeTemplate
262 _android-
$(1)_PATH
=$$(MXE_PREFIX
)/bin
264 _android-
$(1)_AR
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-ar
265 _android-
$(1)_AS
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-as
266 _android-
$(1)_CC
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-gcc
267 _android-
$(1)_CXX
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-g
++
268 _android-
$(1)_DLLTOOL
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-dlltool
269 _android-
$(1)_LD
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-ld
270 _android-
$(1)_OBJDUMP
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-objdump
271 _android-
$(1)_RANLIB
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-ranlib
272 _android-
$(1)_STRIP
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-strip
274 # On Cygwin, assume x86_64-mingw32-zlib and i686-mingw32-zlib are installed
275 # TODO: WSL packages will depend on the distro
276 _android-
$(1)_AC_VARS
= \
277 $$(if
$$(filter $$(UNAME
),Windows
),,ac_cv_header_zlib_h
=no
) \
278 ac_cv_search_dlopen
=no
280 _android-
$(1)_CFLAGS
= \
281 -DXAMARIN_PRODUCT_VERSION
=0 \
282 $$(if
$$(filter $$(UNAME
),Windows
),,-I
$$(MXE_PREFIX
)/opt
/mingw-zlib
/usr
/$(2)-w64-mingw32
/include)
284 _android-
$(1)_CXXFLAGS
= \
285 -DXAMARIN_PRODUCT_VERSION
=0 \
286 $$(if
$$(filter $$(UNAME
),Windows
),,-I
$$(MXE_PREFIX
)/opt
/mingw-zlib
/usr
/$(2)-w64-mingw32
/include)
288 _android-
$(1)_CONFIGURE_FLAGS
= \
291 --disable-mcs-build \
293 --enable-static-gcc-libs \
294 --enable-maintainer-mode \
297 --disable-crash-reporting
299 ifeq ($(UNAME
),Darwin
)
300 _android-
$(1)_LDFLAGS
= \
301 $$(MXE_PREFIX
)/opt
/mingw-zlib
/usr
/$(2)-w64-mingw32
/lib
/libz.a
304 .stamp-android-
$(1)-toolchain
:
307 .stamp-android-
$(1)-$$(CONFIGURATION
)-configure
: |
$(if
$(IGNORE_PROVISION_MXE
),,provision-mxe
)
309 $$(eval
$$(call RuntimeTemplate
,android
,$(1),$(2)-w64-mingw32
))
313 ifneq ($(UNAME
),Windows
)
314 $(eval
$(call AndroidHostMxeTemplate
,host-mxe-Win32
,i686
))
315 $(eval
$(call AndroidHostMxeTemplate
,host-mxe-Win64
,x86_64
))
317 # on Windows the MinGW-built Mono is the host Mono. But we have to use the cross template
318 # because 'gcc' is the cygwin or WSL compiler, while the x86_64-w64-mingw32-gcc is the windows native compiler.
319 # TODO: build $(eval $(call AndroidHostMxeTemplate,host-mxe-Win64,x86_64))
320 # TODO: also build $(eval $(call AndroidHostMxeTemplate,host-mxe-Win32,i686))
328 # $(4): device target (armeabi-v7a, arm64-v8a, x86 or x86_64)
329 # $(5): llvm (llvm32, llvm64, llvmwin32 or llvmwin64)
330 # $(6): offsets dumper abi
331 define AndroidCrossTemplate
333 _android-
$(1)_OFFSETS_DUMPER_ARGS
=--gen-android
--android-ndk
="$$(ANDROID_TOOLCHAIN_DIR)/ndk"
337 _android-
$(1)_CC
=$$(or
$$(android-
$(1)_CC
),cc)
338 _android-
$(1)_CXX
=$$(or
$$(android-
$(1)_CXX
),c
++)
339 _android-
$(1)_CXXCPP
=cpp
341 _android-
$(1)_RANLIB
=ranlib
342 _android-
$(1)_STRIP
=strip
344 _android-
$(1)_CFLAGS
= \
345 $$(if
$$(RELEASE
),,-DDEBUG_CROSS
) \
346 $$(if
$$(filter $$(UNAME
),Darwin
),-mmacosx-version-min
=10.9) \
347 -DXAMARIN_PRODUCT_VERSION
=0
349 _android-
$(1)_CXXFLAGS
= \
350 $$(if
$$(RELEASE
),,-DDEBUG_CROSS
) \
351 $$(if
$$(filter $$(UNAME
),Darwin
),-mmacosx-version-min
=10.9 -stdlib
=libc
++) \
352 -DXAMARIN_PRODUCT_VERSION
=0
354 _android-
$(1)_CONFIGURE_FLAGS
= \
356 --disable-mcs-build \
358 --enable-maintainer-mode \
361 $$(eval
$$(call CrossRuntimeTemplate
,android
,$(1),$$(if
$$(filter $$(UNAME
),Darwin
),$(2)-apple-darwin10
,$$(if
$$(filter $$(UNAME
),Linux
),$(2)-linux-gnu
)),$(3)-linux-android
,$(4),$(5),$(6)))
370 # $(4): device target (armeabi-v7a, arm64-v8a, x86 or x86_64)
371 # $(5): llvm (llvm32, llvm64, llvmwin32 or llvmwin64)
372 # $(6): offsets dumper abi
373 define AndroidCrossTemplateStub
375 $$(eval
$$(call CrossRuntimeTemplateStub
,android
,$(1),$$(if
$$(filter $$(UNAME
),Darwin
),$(2)-apple-darwin10
,$$(if
$$(filter $$(UNAME
),Linux
),$(2)-linux-gnu
)),$(3)-linux-android
,$(4),$(5),$(6)))
379 ifeq ($(UNAME
),Windows
)
380 $(eval
$(call AndroidCrossTemplateStub
,cross-arm
,i686
,armv7
,armeabi-v7a
,llvm-llvm32
,armv7-none-linux-androideabi
))
381 $(eval
$(call AndroidCrossTemplateStub
,cross-arm64
,x86_64
,aarch64-v8a
,arm64-v8a
,llvm-llvm64
,aarch64-v8a-linux-android
))
382 $(eval
$(call AndroidCrossTemplateStub
,cross-x86
,i686
,i686
,x86
,llvm-llvm32
,i686-none-linux-android
))
383 $(eval
$(call AndroidCrossTemplateStub
,cross-x86_64
,x86_64
,x86_64
,x86_64
,llvm-llvm64
,x86_64-none-linux-android
))
385 $(eval
$(call AndroidCrossTemplate
,cross-arm
,i686
,armv7
,armeabi-v7a
,llvm-llvm32
,armv7-none-linux-androideabi
))
386 $(eval
$(call AndroidCrossTemplate
,cross-arm64
,x86_64
,aarch64-v8a
,arm64-v8a
,llvm-llvm64
,aarch64-v8a-linux-android
))
387 $(eval
$(call AndroidCrossTemplate
,cross-x86
,i686
,i686
,x86
,llvm-llvm32
,i686-none-linux-android
))
388 $(eval
$(call AndroidCrossTemplate
,cross-x86_64
,x86_64
,x86_64
,x86_64
,llvm-llvm64
,x86_64-none-linux-android
))
396 # $(4): device target
398 # $(6): offsets dumper abi
399 define AndroidCrossMXETemplate
401 _android-
$(1)_OFFSETS_DUMPER_ARGS
=--gen-android
--android-ndk
="$$(ANDROID_TOOLCHAIN_DIR)/ndk"
403 _android-
$(1)_PATH
=$$(MXE_PREFIX
)/bin
405 _android-
$(1)_AR
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-ar
406 _android-
$(1)_AS
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-as
407 _android-
$(1)_CC
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-gcc
408 _android-
$(1)_CXX
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-g
++
409 _android-
$(1)_DLLTOOL
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-dlltool
410 _android-
$(1)_LD
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-ld
411 _android-
$(1)_OBJDUMP
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-objdump
412 _android-
$(1)_RANLIB
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-ranlib
413 _android-
$(1)_STRIP
=$$(MXE_PREFIX
)/bin
/$(2)-w64-mingw32-strip
415 _android-
$(1)_CFLAGS
= \
416 $$(if
$$(RELEASE
),,-DDEBUG_CROSS
) \
417 -DXAMARIN_PRODUCT_VERSION
=0 \
418 -I
$$(MXE_PREFIX
)/opt
/mingw-zlib
/usr
/$(2)-w64-mingw32
/include
420 _android-
$(1)_CXXFLAGS
= \
421 $$(if
$$(RELEASE
),,-DDEBUG_CROSS
) \
422 -DXAMARIN_PRODUCT_VERSION
=0 \
423 -I
$$(MXE_PREFIX
)/opt
/mingw-zlib
/usr
/$(2)-w64-mingw32
/include
425 _android-
$(1)_LDFLAGS
=
428 _android-
$(1)_CONFIGURE_FLAGS
= \
430 --disable-mcs-build \
432 --enable-static-gcc-libs \
433 --enable-maintainer-mode \
436 ifeq ($(UNAME
),Darwin
)
437 _android-
$(1)_CONFIGURE_FLAGS
+= \
438 --with-static-zlib
=$$(MXE_PREFIX
)/opt
/mingw-zlib
/usr
/$(2)-w64-mingw32
/lib
/libz.a
441 .stamp-android-
$(1)-$$(CONFIGURATION
)-configure
: |
$(if
$(IGNORE_PROVISION_MXE
),,provision-mxe
)
443 $$(eval
$$(call CrossRuntimeTemplate
,android
,$(1),$(2)-w64-mingw32
,$(3)-linux-android
,$(4),$(5),$(6)))
452 # $(4): device target
454 # $(6): offsets dumper abi
455 define AndroidCrossMXETemplateStub
457 $$(eval
$$(call CrossRuntimeTemplateStub
,android
,$(1),$(2)-w64-mingw32
,$(3)-linux-android
,$(4),$(5),$(6)))
461 ifneq ($(UNAME
),Windows
)
462 $(eval
$(call AndroidCrossMXETemplate
,cross-arm-win
,i686
,armv7
,armeabi-v7a
,llvm-llvmwin32
,armv7-none-linux-androideabi
))
463 $(eval
$(call AndroidCrossMXETemplate
,cross-arm64-win
,x86_64
,aarch64-v8a
,arm64-v8a
,llvm-llvmwin64
,aarch64-v8a-linux-android
))
464 $(eval
$(call AndroidCrossMXETemplate
,cross-x86-win
,i686
,i686
,x86
,llvm-llvmwin32
,i686-none-linux-android
))
465 $(eval
$(call AndroidCrossMXETemplate
,cross-x86_64-win
,x86_64
,x86_64
,x86_64
,llvm-llvmwin64
,x86_64-none-linux-android
))
467 $(eval
$(call AndroidCrossMXETemplateStub
,cross-arm-win
,i686
,armv7
,armeabi-v7a
,llvm-llvmwin32
,armv7-none-linux-androideabi
))
468 $(eval
$(call AndroidCrossMXETemplateStub
,cross-arm64-win
,x86_64
,aarch64-v8a
,arm64-v8a
,llvm-llvmwin64
,aarch64-v8a-linux-android
))
469 $(eval
$(call AndroidCrossMXETemplateStub
,cross-x86-win
,i686
,i686
,x86
,llvm-llvmwin32
,i686-none-linux-android
))
470 $(eval
$(call AndroidCrossMXETemplateStub
,cross-x86_64-win
,x86_64
,x86_64
,x86_64
,llvm-llvmwin64
,x86_64-none-linux-android
))
473 ifeq ($(UNAME
),Windows
)
474 _bcl_android_BUILD_FLAGS
+= \
475 PROFILE_PLATFORM
=win32
478 $(eval
$(call BclTemplate
,android
,monodroid monodroid_tools
,monodroid monodroid_tools
))
480 $(android_SOURCES_DIR
)/external
/linker
/README.md
: # we use this as a sentinel file to avoid rsyncing everything on each build (slows down iterating)
481 mkdir
-p
$(android_SOURCES_DIR
)/external
/linker
482 cd
$(TOP
) && rsync
-r
--include='*.cs' --include="README.md" --include="*/" --exclude
="*" external
/linker
$(android_SOURCES_DIR
)/external
484 $(android_SOURCES_DIR
): $(android_SOURCES_DIR
)/external
/linker
/README.md