#!/bin/sh
#
# Builds the JNI plugin for OS X
#
g++ -O0 -DLINUX -bundle -framework JavaVM -I. -I$JAVA_HOME/include ProfilerDLL.cpp -o libProfilerDLL.jnilib
sudo cp libProfilerDLL.jnilib /System/Library/Frameworks/JavaVM.framework/Libraries
# this shouldn't be required but the plugin checks for it for some reason
sudo cp ../ProfilerDLL.dll $JAVA_HOME/jre/bin