From a2a4b21d0f1addadb8e1d9845f7464e3603719ab Mon Sep 17 00:00:00 2001 From: Ivan Dubrov Date: Fri, 25 Apr 2014 16:21:17 -0700 Subject: [PATCH] Support for Mac OS X in native code compilation --- build.gradle | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index dae673ea..88e06736 100644 --- a/build.gradle +++ b/build.gradle @@ -136,11 +136,17 @@ project('native') { if (os != Os.WINDOWS) { commandLine 'gcc' args "-I${jre}/../include" - args "-I${jre}/../include/linux" args '-shared' args 'natives.c' - args '-o' - args 'build/libnatives.so' + if (os == Os.UNIX) { + args "-I${jre}/../include/linux" + args '-o' + args 'build/libnatives.so' + } else if (os == Os.MAC) { + args "-I${jre}/../include/darwin" + args '-o' + args 'build/libnatives.dylib' + } } else { commandLine 'cmd', '/c', 'compile.cmd' environment ARCH: arch == Arch.X86 ? 'x86' : 'x64' -- 2.39.5