File tree Expand file tree Collapse file tree 5 files changed +20
-8
lines changed Expand file tree Collapse file tree 5 files changed +20
-8
lines changed Original file line number Diff line number Diff line change 2525 <NeedMxe Condition =" '$(HostOS)' == 'Darwin' " >true</NeedMxe >
2626 <MakeConcurrency Condition =" '$(MakeConcurrency)' == '' And '$(HostCpuCount)' != '' " >-j$(HostCpuCount)</MakeConcurrency >
2727 <ManagedRuntime Condition =" '$(ManagedRuntime)' == '' And '$(OS)' != 'Windows_NT' " >mono</ManagedRuntime >
28+ <MonoSgenBridgeVersion Condition =" '$(MonoSgenBridgeVersion)' == '' " >4</MonoSgenBridgeVersion >
2829 <TargetFrameworkRootPath >$(MSBuildThisFileDirectory)bin\$(Configuration)\lib\xbuild-frameworks</TargetFrameworkRootPath >
2930 <HOME Condition =" '$(HOME)' == '' " >$(HOMEDRIVE)$(HOMEPATH)</HOME >
3031 <AndroidApiLevel Condition =" '$(AndroidApiLevel)' == '' " >24</AndroidApiLevel >
Original file line number Diff line number Diff line change @@ -93,7 +93,12 @@ Overridable MSBuild properties include:
9393 ` external/Java.Interop ` directory, maintained by ` git submodule update ` .
9494* ` $(MakeConcurrency) ` : ** make** (1) parameters to use intended to influence
9595 the number of CPU cores used when ** make** (1) executes. By default this uses
96- `-jCOUNT`, where `COUNT` is obtained from `sysctl hw.ncpu`.
96+ ` -jCOUNT ` , where ` COUNT ` is obtained from ` sysctl hw.ncpu ` .
97+ * ` $(MonoSgenBridgeVersion) ` : The Mono SGEN Bridge version to support.
98+ Valid values include:
99+
100+ * ` 4 ` : Mono 4.6 support. This is the default.
101+ * ` 5 ` : Mono 4.8 support.
97102
98103# Build Requirements
99104
Original file line number Diff line number Diff line change 1111LOCAL_CFLAGS = $(COMMON_CFLAGS ) \
1212 -std=c99 \
1313 -DHAVE_LINUX_NETLINK_H=1 -DHAVE_LINUX_RTNETLINK_H=1 \
14+ -DSGEN_BRIDGE_VERSION=$(SGEN_BRIDGE_VERSION ) \
1415 -D_REENTRANT -DPLATFORM_ANDROID -DANDROID -DLINUX -Dlinux -D__linux_ \
1516 -DHAVE_CONFIG_H -DJI_DLL_EXPORT -DMONO_DLL_EXPORT \
1617 -I$(topdir ) /libmonodroid/zip -I$(BUILDDIR ) /include -I$(BUILDDIR ) /include/eglib \
Original file line number Diff line number Diff line change @@ -120,9 +120,13 @@ typedef uint8_t mono_byte;
120120#endif
121121#endif
122122
123- enum {
124- SGEN_BRIDGE_VERSION = 4
125- };
123+ #ifndef SGEN_BRIDGE_VERSION
124+ #error SGEN_BRIDGE_VERSION must be defined! (Use the `$(MonoSgenBridgeVersion)` MSBuild property)
125+ #endif /* ndef SGEN_BRIDGE_VERSION */
126+
127+ #if (SGEN_BRIDGE_VERSION < 4 ) || (SGEN_BRIDGE_VERSION >= 6 )
128+ #error Only SGEN_BRIDGE_VERSION/$(MonoSgenBridgeVersion) values of 4 or 5 are supported.
129+ #endif /* SGEN_BRIDGE_VERSION check */
126130
127131typedef enum {
128132 /* Instances of this class should be scanned when computing the transitive dependency among bridges. E.g. List<object>*/
Original file line number Diff line number Diff line change 1313 Outputs =" @(AndroidSupportedTargetJitAbi->'$(OutputPath)\%(Identity)\libmono-android.debug.so');@(AndroidSupportedTargetJitAbi->'$(OutputPath)\%(Identity)\libmono-android.release.so')" >
1414 <PropertyGroup >
1515 <_AppAbi >@(AndroidSupportedTargetJitAbi->'%(Identity)', ' ')</_AppAbi >
16+ <_NdkBuildArgs >CONFIGURATION=$(Configuration) SGEN_BRIDGE_VERSION=$(MonoSgenBridgeVersion)</_NdkBuildArgs >
1617 </PropertyGroup >
1718 <WriteLinesToFile
1819 File =" jni\Application.mk"
1920 Lines =" APP_ABI := $(_AppAbi)"
2021 Overwrite =" True"
2122 />
2223 <Exec
23- Command =" $(AndroidToolchainDirectory)\ndk\ndk-build CONFIGURATION=$(Configuration ) NDK_LIBS_OUT=./libs/Debug NDK_OUT=./obj/Debug V=1"
24+ Command =" $(AndroidToolchainDirectory)\ndk\ndk-build $(_NdkBuildArgs ) NDK_LIBS_OUT=./libs/Debug NDK_OUT=./obj/Debug V=1"
2425 />
2526 <Copy
2627 SourceFiles =" @(AndroidSupportedTargetJitAbi->'obj\Debug\local\%(Identity)\libmonodroid.so')"
3132 DestinationFiles =" @(AndroidSupportedTargetJitAbi->'$(OutputPath)\%(Identity)\libmono-android.debug.so')"
3233 />
3334 <Exec
34- Command =" $(AndroidToolchainDirectory)\ndk\ndk-build CONFIGURATION=$(Configuration ) NDK_LIBS_OUT=./libs/Release NDK_OUT=./obj/Release V=1"
35+ Command =" $(AndroidToolchainDirectory)\ndk\ndk-build $(_NdkBuildArgs ) NDK_LIBS_OUT=./libs/Release NDK_OUT=./obj/Release V=1"
3536 />
3637 <Copy
3738 SourceFiles =" @(AndroidSupportedTargetJitAbi->'obj\Release\local\%(Identity)\libmonodroid.so')"
4546 <Target Name =" _CleanRuntimes"
4647 AfterTargets =" Clean" >
4748 <Exec
48- Command =" $(AndroidToolchainDirectory)\ndk\ndk-build CONFIGURATION=$(Configuration ) NDK_LIBS_OUT=./libs/Debug NDK_OUT=./obj/Debug V=1 clean"
49+ Command =" $(AndroidToolchainDirectory)\ndk\ndk-build $(_NdkBuildArgs ) NDK_LIBS_OUT=./libs/Debug NDK_OUT=./obj/Debug V=1 clean"
4950 />
5051 <Exec
51- Command =" $(AndroidToolchainDirectory)\ndk\ndk-build CONFIGURATION=$(Configuration ) NDK_LIBS_OUT=./libs/Release NDK_OUT=./obj/Release V=1 clean"
52+ Command =" $(AndroidToolchainDirectory)\ndk\ndk-build $(_NdkBuildArgs ) NDK_LIBS_OUT=./libs/Release NDK_OUT=./obj/Release V=1 clean"
5253 />
5354 <RemoveDir Directories =" obj\local;libs" />
5455 <Delete Files =" jni\config.include;jni\machine.config.include;jni\Application.mk" />
You can’t perform that action at this time.
0 commit comments