aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/mksdcard/build.gradle
blob: e3b89fb348681c968e70d60caeb804e6e8076dbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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"
        }
    }
}

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)
}