Last active
August 29, 2015 14:06
-
-
Save freekh/ebd5c6477cf2b18d2d90 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main = asm.Executable | |
main { //could also not name the exec and use asm.Executable { ....? | |
x86.architecture = "i386" //x86 is a platform | |
binaries.all { | |
if (toolChain in VisualCop) { | |
source sources.i386_masm.asm | |
assembler.args "/Zi" | |
} else { | |
source sources.i386_gcc.asm | |
} | |
} | |
} | |
sources { | |
i386_masm { | |
asm(AssemblerSourceSet) { | |
source.srcDir "src/main/asm_i386_masm" | |
} | |
} | |
i386_gcc { | |
asm(AssemblerSourceSet) { | |
source.srcDir "src/main/asm_i386_gcc" | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello = c.Library | |
main = c.Executable | |
main.c.sources.lib = libraries.hello | |
binaries.all { | |
// Define toolchain-specific compiler and linker options | |
if (toolChain in Gcc) { | |
cCompiler.args "-O2" | |
linker.args "-Xlinker", "-S" | |
} | |
if (toolChain in VisualCpp) { | |
cCompiler.args "/Zi" | |
linker.args "/DEBUG" | |
} | |
} | |
// For any shared library binaries built with Visual C++, | |
// define the DLL_EXPORT macro | |
binaries.withType(SharedLibraryBinarySpec) { | |
if (toolChain in VisualCpp) { | |
cCompiler.args "/Zi" | |
cCompiler.define "DLL_EXPORT" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myLib = java.Library //myArtifact = java.Library and java.Application | |
myLib.java.sourceCompatibility = "1.6" //java is the platform | |
sources { | |
java | |
} | |
myLib.sources = sources.java ++ sources.resources //overrides with what is the default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment