blob: 1db2d1cce76b5ae20d6d0bd993eaf130da583819 [file] [log] [blame]
yoshi94c2e562014-01-22 15:18:57 -08001#!/bin/sh
2
3set -x
4
5ONOS_HOME=~/ONOS
6RAMCLOUD_HOME=~/ramcloud
7
Yuta HIGUCHI30e31de2014-02-04 12:02:43 -08008if [ -d ${RAMCLOUD_HOME} ]; then
9 echo "${RAMCLOUD_HOME} already exist, please rename or remove them."
10 exit 1
11fi
12
yoshi94c2e562014-01-22 15:18:57 -080013# clone ramcloud
Yuta HIGUCHIc45a1d12014-02-10 14:01:54 -080014git clone git://github.com/y-higuchi/ramcloud.git ${RAMCLOUD_HOME}
yoshi94c2e562014-01-22 15:18:57 -080015cd ${RAMCLOUD_HOME}
Yuta HIGUCHI30e31de2014-02-04 12:02:43 -080016git checkout custom
yoshi94c2e562014-01-22 15:18:57 -080017
18# install some app
yoshi99b7dbf2014-01-22 16:30:49 -080019sudo apt-get -y install build-essential git-core libcppunit-dev libcppunit-doc doxygen libboost-all-dev libpcre3-dev protobuf-compiler libprotobuf-dev libcrypto++-dev libevent-dev scons libssl-dev
yoshi94c2e562014-01-22 15:18:57 -080020
21# compile ramcloud
22git submodule update --init --recursive
yoshi99b7dbf2014-01-22 16:30:49 -080023patch ${RAMCLOUD_HOME}/logcabin/Core/Time.h < ${ONOS_HOME}/logcabin.patch
yoshi94c2e562014-01-22 15:18:57 -080024make logcabin
Yuta HIGUCHI30e31de2014-02-04 12:02:43 -080025make DEBUG=no $*
yoshi94c2e562014-01-22 15:18:57 -080026
Yuta HIGUCHI30e31de2014-02-04 12:02:43 -080027ln -s ${RAMCLOUD_HOME}/obj.custom obj.blueprint-java
yoshi94c2e562014-01-22 15:18:57 -080028
29# crate ramcloud lib
Yuta HIGUCHI30e31de2014-02-04 12:02:43 -080030cp -p ${ONOS_HOME}/src/main/java/edu/stanford/ramcloud/JRamCloud.java ${HOME}/ramcloud/bindings/java/edu/stanford/ramcloud/
31cp -p ${ONOS_HOME}/src/main/cpp/edu_stanford_ramcloud_JRamCloud.cc ${HOME}/ramcloud/bindings/java/edu/stanford/ramcloud/
yoshi94c2e562014-01-22 15:18:57 -080032cd ${HOME}/ramcloud/bindings/java/edu/stanford/ramcloud/
33javac JRamCloud.java
34./build_so.sh
35jar cvf ${RAMCLOUD_HOME}/bindings/java/RamCloud.jar ${RAMCLOUD_HOME}/bindings/java/edu/stanford/ramcloud/*.class
Yuta HIGUCHI30e31de2014-02-04 12:02:43 -080036