]> source.dussan.org Git - dcevm.git/commitdiff
Support for Mac OS X in native code compilation
authorIvan Dubrov <idubrov@guidewire.com>
Fri, 25 Apr 2014 23:21:17 +0000 (16:21 -0700)
committerIvan Dubrov <idubrov@guidewire.com>
Fri, 25 Apr 2014 23:24:56 +0000 (16:24 -0700)
build.gradle

index dae673eaf0bff95947bf0cdb55048411ca5131da..88e0673689c3a25fafdef1f29ac4acf429dc1ef4 100644 (file)
@@ -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'