blob: e549e6adfd65c064eab1030e9778d122ee22bdf3 [file] [log] [blame]
Yuta HIGUCHIa7ec0732014-03-10 16:01:06 -07001#!/bin/bash
Yuta HIGUCHI1c2c0db2014-03-13 16:20:35 -07002
Yuta HIGUCHI4d70a012014-03-26 17:56:40 -07003# fail on command error
4set -e
5
Yuta HIGUCHIa7ec0732014-03-10 16:01:06 -07006JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-oracle}
7ONOS_HOME=${ONOS_HOME:-~/ONOS}
8RAMCLOUD_HOME=${RAMCLOUD_HOME:-~/ramcloud}
9RAMCLOUD_BRANCH=${RAMCLOUD_BRANCH:-master}
10
Yuta HIGUCHI1c2c0db2014-03-13 16:20:35 -070011mvn -f ${ONOS_HOME}/pom.xml compile -T 1C
Yuta HIGUCHIa7ec0732014-03-10 16:01:06 -070012
13javah -cp ${ONOS_HOME}/target/classes -o ${ONOS_HOME}/src/main/cpp/edu_stanford_ramcloud_JRamCloud.h edu.stanford.ramcloud.JRamCloud
14
15g++ -g -Wall -O3 -shared -fPIC -std=c++0x -I${JAVA_HOME}/include/ -I${JAVA_HOME}/include/linux -I${RAMCLOUD_HOME}/src/ -I${RAMCLOUD_HOME}/obj.${RAMCLOUD_BRANCH}/ -I${RAMCLOUD_HOME}/logcabin/ -I${RAMCLOUD_HOME}/gtest/include/ -L${RAMCLOUD_HOME}/obj.${RAMCLOUD_BRANCH} -o ${ONOS_HOME}/lib/libedu_stanford_ramcloud_JRamCloud.so ${ONOS_HOME}/src/main/cpp/edu_stanford_ramcloud_JRamCloud.cc -lramcloud
16
Yuta HIGUCHIa7ec0732014-03-10 16:01:06 -070017