aboutsummaryrefslogtreecommitdiffstats
path: root/emulator
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@google.com>2014-06-10 18:48:58 -0700
committerXavier Ducrohet <xav@google.com>2014-06-11 16:12:03 -0700
commit61d47da484c11ed08bcdf05a461499334e3225c6 (patch)
tree74b5e3cadc205992f2fe381c2dc155b2a11b5631 /emulator
parent4da1c1feb088bfd2754d02a4244530482a6dde3f (diff)
downloadsdk-61d47da484c11ed08bcdf05a461499334e3225c6.zip
sdk-61d47da484c11ed08bcdf05a461499334e3225c6.tar.gz
sdk-61d47da484c11ed08bcdf05a461499334e3225c6.tar.bz2
Win build for mksdcard.
Requires mingw32 in /usr/bin/i586-mingw32msvc-* Change-Id: Ic3028257d42cf1f15aea279da3ed03a4a4ebddc2
Diffstat (limited to 'emulator')
-rw-r--r--emulator/mksdcard/build.gradle64
1 files changed, 64 insertions, 0 deletions
diff --git a/emulator/mksdcard/build.gradle b/emulator/mksdcard/build.gradle
index e3b89fb..1ea266d 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/i586-mingw32msvc-4.8/bin"
+
+ addPlatformConfiguration(new MingwOnLinuxConfiguration(project))
+
+ getCCompiler().executable = 'i586-mingw32msvc-gcc'
+ getCppCompiler().executable = 'i586-mingw32msvc-g++'
+ getLinker().executable = 'i586-mingw32msvc-gcc'
+ getAssembler().executable = 'i586-mingw32msvc-as'
+ getStaticLibArchiver().executable = 'i586-mingw32msvc-ar'
+ }
}
}
@@ -42,6 +61,12 @@ sdk {
builtBy 'linuxMksdcardExecutable'
}
}
+ windows {
+ item( { getExeName("windows") } ) {
+ name 'mksdcard.exe'
+ builtBy 'windowsMksdcardExecutable'
+ }
+ }
}
def getExeName(String platform) {
@@ -51,3 +76,42 @@ def getExeName(String platform) {
return binaries.executableFile.get(0)
}
+class MingwOnLinuxConfiguration implements TargetPlatformConfiguration {
+
+ Project project
+
+ MingwOnLinuxConfiguration(Project project) {
+ this.project = project
+ }
+ 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']
+ }
+
+ List<String> getObjectiveCCompilerArgs() {
+ []
+ }
+
+ List<String> getObjectiveCppCompilerArgs() {
+ []
+ }
+
+ List<String> getAssemblerArgs() {
+ []
+ }
+
+ List<String> getLinkerArgs() {
+ ['-enable-stdcall-fixup']
+ }
+
+ List<String> getStaticLibraryArchiverArgs() {
+ []
+ }
+}