aboutsummaryrefslogtreecommitdiffstats
path: root/emulator
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@google.com>2014-06-11 23:33:44 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-06-11 23:11:06 +0000
commit63d8e84b0c5229841767dbd6974023a410a772d2 (patch)
tree51d03159513c735d75c6f8c27b8f22cb4b110485 /emulator
parent6592284f6cd66f15ebe5b60906d0a21e295e2199 (diff)
parent61d47da484c11ed08bcdf05a461499334e3225c6 (diff)
downloadsdk-63d8e84b0c5229841767dbd6974023a410a772d2.zip
sdk-63d8e84b0c5229841767dbd6974023a410a772d2.tar.gz
sdk-63d8e84b0c5229841767dbd6974023a410a772d2.tar.bz2
Merge "Win build for mksdcard." into idea133
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() {
+ []
+ }
+}