Yuta HIGUCHI | a7ec073 | 2014-03-10 16:01:06 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Yuta HIGUCHI | 1c2c0db | 2014-03-13 16:20:35 -0700 | [diff] [blame] | 2 | |
Yuta HIGUCHI | a7ec073 | 2014-03-10 16:01:06 -0700 | [diff] [blame] | 3 | JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-oracle} |
| 4 | ONOS_HOME=${ONOS_HOME:-~/ONOS} |
| 5 | RAMCLOUD_HOME=${RAMCLOUD_HOME:-~/ramcloud} |
| 6 | RAMCLOUD_BRANCH=${RAMCLOUD_BRANCH:-master} |
| 7 | |
Yuta HIGUCHI | 1c2c0db | 2014-03-13 16:20:35 -0700 | [diff] [blame] | 8 | mvn -f ${ONOS_HOME}/pom.xml compile -T 1C |
Yuta HIGUCHI | a7ec073 | 2014-03-10 16:01:06 -0700 | [diff] [blame] | 9 | |
| 10 | javah -cp ${ONOS_HOME}/target/classes -o ${ONOS_HOME}/src/main/cpp/edu_stanford_ramcloud_JRamCloud.h edu.stanford.ramcloud.JRamCloud |
| 11 | |
| 12 | g++ -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 |
| 13 | |
| 14 | #ln -sf `pwd`/libedu_stanford_ramcloud_JRamCloud.so ${RAMCLOUD_HOME}/obj.${RAMCLOUD_BRANCH} |
| 15 | |