blob: 7ed99e1bff1eb4c6a63badeb005ea23dddb0b39b [file] [log] [blame]
yoshi94c2e562014-01-22 15:18:57 -08001#!/bin/sh
2
3set -x
4
Yuta HIGUCHI247a23c2014-02-21 09:21:14 -08005ONOS_HOME=${ONOS_HOME:-~/ONOS}
6RAMCLOUD_HOME=${RAMCLOUD_HOME:-~/ramcloud}
yoshi94c2e562014-01-22 15:18:57 -08007
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
Yuta HIGUCHI247a23c2014-02-21 09:21:14 -080029# create ramcloud lib
30cp -pvf ${ONOS_HOME}/src/main/java/edu/stanford/ramcloud/JRamCloud.java ${RAMCLOUD_HOME}/bindings/java/edu/stanford/ramcloud/
31cp -pvf ${ONOS_HOME}/src/main/cpp/edu_stanford_ramcloud_JRamCloud.cc ${RAMCLOUD_HOME}/bindings/java/edu/stanford/ramcloud/
32cd ${RAMCLOUD_HOME}/bindings/java/edu/stanford/ramcloud/
yoshi94c2e562014-01-22 15:18:57 -080033javac 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