From 112ea81c3236d4591cbbb44043bd8511024bf3b5 Mon Sep 17 00:00:00 2001 From: Ivan Dubrov Date: Fri, 25 Apr 2014 16:06:44 -0700 Subject: Fixing compilation under Windows --- build.gradle | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index f0d0944b..62692747 100644 --- a/build.gradle +++ b/build.gradle @@ -127,11 +127,29 @@ project('agent') { } } +project('native') { + task compile(type: Exec) { + if (root.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' + } else { + commandLine 'compile.cmd' + environment ARCH: root.arch == Arch.X86 ? 'x86' : 'x64' + environment JAVA_HOME: jre + } + } +} + project('dcevm') { dependencies { compile project(':agent') compile group: 'asm', name: 'asm-all', version: '3.3.+' - compile files(System.getProperty("java.home") + '/../lib/tools.jar') + compile files(jre + '/../lib/tools.jar') testCompile group: 'junit', name: 'junit', version: '4.11' } -- cgit v1.2.3