diff options
| author | Xavier Ducrohet <xav@google.com> | 2014-05-15 17:57:32 +0000 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2014-05-15 17:57:32 +0000 |
| commit | 985356d669038f83f41e6b7225a454c5470f3bbc (patch) | |
| tree | 9e19f6260d113e430d8856095713c9d3d4ad9691 /emulator/mksdcard/build.gradle | |
| parent | af61219ead61343570703f063498e05f1855d85b (diff) | |
| parent | 180a34c165f2497cae1018701278df7398186bb0 (diff) | |
| download | sdk-985356d669038f83f41e6b7225a454c5470f3bbc.zip sdk-985356d669038f83f41e6b7225a454c5470f3bbc.tar.gz sdk-985356d669038f83f41e6b7225a454c5470f3bbc.tar.bz2 | |
Merge "Build mksdcard for mac/linux with Gradle." into idea133
Auto-merge: 180a34c
* commit '180a34c165f2497cae1018701278df7398186bb0':
Build mksdcard for mac/linux with Gradle.
Diffstat (limited to 'emulator/mksdcard/build.gradle')
| -rw-r--r-- | emulator/mksdcard/build.gradle | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/emulator/mksdcard/build.gradle b/emulator/mksdcard/build.gradle new file mode 100644 index 0000000..6dd0aa0 --- /dev/null +++ b/emulator/mksdcard/build.gradle @@ -0,0 +1,62 @@ +apply plugin: 'c' +apply plugin: 'sdk-files' + +executables { + mksdcard {} +} + +sources { + mksdcard { + c { + source { + srcDir "src/source" + include "**/*.c" + } + } + } +} + +model { + platforms { + linux { + architecture "i386" + operatingSystem "linux" + } + darwin { + architecture "i386" + operatingSystem "osx" + } + } +} + +binaries.all { + // Define toolchain-specific compiler and linker options + + if (toolChain in Gcc) { + cCompiler.args "-O2" + linker.args "-S" + } +} + +sdk { + mac { + item( { getExeName("darwin") } ) { + executable true + builtBy 'darwinMksdcardExecutable' + } + } + linux { + item( { getExeName("linux") } ) { + executable true + builtBy 'linuxMksdcardExecutable' + } + } +} + +def getExeName(String platform) { + // binaries will return a set of binaries + def binaries = executables.mksdcard.binaries.matching { it.name == "${platform}MksdcardExecutable" } + // calling .exeFile on the set returns an array with the result from each item in the set... + return binaries.executableFile.get(0) +} + |
