Home | History | Annotate | Download | only in mksdcard
      1 apply plugin: 'c'
      2 apply plugin: 'sdk-files'
      3 apply plugin: 'native-setup'
      4 
      5 executables {
      6     mksdcard {}
      7 }
      8 
      9 sources {
     10     mksdcard {
     11         c {
     12             source {
     13                 srcDir "src/source"
     14                 include "**/*.c"
     15             }
     16         }
     17     }
     18 }
     19 
     20 binaries.all {
     21     cCompiler.args "-D_FILE_OFFSET_BITS=64"
     22 }
     23 
     24 sdk {
     25     mac {
     26         item( { getExeName("darwin") } ) {
     27             executable true
     28             builtBy 'darwinMksdcardExecutable'
     29         }
     30     }
     31     linux {
     32         item( { getExeName("linux") } ) {
     33             executable true
     34             builtBy 'linuxMksdcardExecutable'
     35         }
     36     }
     37     windows {
     38         item( { getExeName("windows") } ) {
     39             name 'mksdcard.exe'
     40             builtBy 'windowsMksdcardExecutable'
     41         }
     42     }
     43 }
     44 
     45 def getExeName(String platform) {
     46     // binaries will return a set of binaries
     47     def binaries = executables.mksdcard.binaries.matching { it.name == "${platform}MksdcardExecutable" }
     48     // calling .exeFile on the set returns an array with the result from each item in the set...
     49     return binaries.executableFile.get(0)
     50 }
     51 
     52