aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emulator/mksdcard/build.gradle59
1 files changed, 59 insertions, 0 deletions
diff --git a/emulator/mksdcard/build.gradle b/emulator/mksdcard/build.gradle
index e3b89fb..53872a3 100644
--- a/emulator/mksdcard/build.gradle
+++ b/emulator/mksdcard/build.gradle
@@ -26,6 +26,25 @@ model {
architecture "i386"
operatingSystem "osx"
}
+ windows {
+ architecture "i386"
+ operatingSystem "windows"
+ }
+ }
+
+ toolChains {
+ host(Clang)
+ mingw(Gcc) {
+ path "$project.rootDir/../prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/bin"
+
+ addPlatformConfiguration(new MingwOnLinuxConfiguration())
+
+ getCCompiler().executable = 'x86_64-w64-mingw32-gcc'
+ getCppCompiler().executable = 'x86_64-w64-mingw32-g++'
+ getLinker().executable = 'x86_64-w64-mingw32-gcc'
+ getAssembler().executable = 'x86_64-w64-mingw32-as'
+ getStaticLibArchiver().executable = 'x86_64-w64-mingw32-ar'
+ }
}
}
@@ -42,6 +61,12 @@ sdk {
builtBy 'linuxMksdcardExecutable'
}
}
+ windows {
+ item( { getExeName("windows") } ) {
+ name 'mksdcard.exe'
+ builtBy 'windowsMksdcardExecutable'
+ }
+ }
}
def getExeName(String platform) {
@@ -51,3 +76,37 @@ def getExeName(String platform) {
return binaries.executableFile.get(0)
}
+class MingwOnLinuxConfiguration implements TargetPlatformConfiguration {
+
+ boolean supportsPlatform(Platform element) {
+ return element.getOperatingSystem().name == "windows"
+ }
+
+ List<String> getCppCompilerArgs() {
+ []
+ }
+
+ List<String> getCCompilerArgs() {
+ ['-DUSE_MINGW', '-D__STDC_FORMAT_MACROS', '-D__STDC_CONSTANT_MACROS', '-D__USE_MINGW_ANSI_STDIO', '-m32']
+ }
+
+ List<String> getObjectiveCCompilerArgs() {
+ []
+ }
+
+ List<String> getObjectiveCppCompilerArgs() {
+ []
+ }
+
+ List<String> getAssemblerArgs() {
+ []
+ }
+
+ List<String> getLinkerArgs() {
+ ['-m32']
+ }
+
+ List<String> getStaticLibraryArchiverArgs() {
+ []
+ }
+}