yoshi | 94c2e56 | 2014-01-22 15:18:57 -0800 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | set -x |
| 4 | |
| 5 | ONOS_HOME=~/ONOS |
| 6 | RAMCLOUD_HOME=~/ramcloud |
| 7 | |
Yuta HIGUCHI | 30e31de | 2014-02-04 12:02:43 -0800 | [diff] [blame] | 8 | if [ -d ${RAMCLOUD_HOME} ]; then |
| 9 | echo "${RAMCLOUD_HOME} already exist, please rename or remove them." |
| 10 | exit 1 |
| 11 | fi |
| 12 | |
yoshi | 94c2e56 | 2014-01-22 15:18:57 -0800 | [diff] [blame] | 13 | # clone ramcloud |
Yuta HIGUCHI | c45a1d1 | 2014-02-10 14:01:54 -0800 | [diff] [blame] | 14 | git clone git://github.com/y-higuchi/ramcloud.git ${RAMCLOUD_HOME} |
yoshi | 94c2e56 | 2014-01-22 15:18:57 -0800 | [diff] [blame] | 15 | cd ${RAMCLOUD_HOME} |
Yuta HIGUCHI | 30e31de | 2014-02-04 12:02:43 -0800 | [diff] [blame] | 16 | git checkout custom |
yoshi | 94c2e56 | 2014-01-22 15:18:57 -0800 | [diff] [blame] | 17 | |
| 18 | # install some app |
yoshi | 99b7dbf | 2014-01-22 16:30:49 -0800 | [diff] [blame] | 19 | sudo 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 |
yoshi | 94c2e56 | 2014-01-22 15:18:57 -0800 | [diff] [blame] | 20 | |
| 21 | # compile ramcloud |
| 22 | git submodule update --init --recursive |
yoshi | 99b7dbf | 2014-01-22 16:30:49 -0800 | [diff] [blame] | 23 | patch ${RAMCLOUD_HOME}/logcabin/Core/Time.h < ${ONOS_HOME}/logcabin.patch |
yoshi | 94c2e56 | 2014-01-22 15:18:57 -0800 | [diff] [blame] | 24 | make logcabin |
Yuta HIGUCHI | 30e31de | 2014-02-04 12:02:43 -0800 | [diff] [blame] | 25 | make DEBUG=no $* |
yoshi | 94c2e56 | 2014-01-22 15:18:57 -0800 | [diff] [blame] | 26 | |
Yuta HIGUCHI | 30e31de | 2014-02-04 12:02:43 -0800 | [diff] [blame] | 27 | ln -s ${RAMCLOUD_HOME}/obj.custom obj.blueprint-java |
yoshi | 94c2e56 | 2014-01-22 15:18:57 -0800 | [diff] [blame] | 28 | |
| 29 | # crate ramcloud lib |
Yuta HIGUCHI | 30e31de | 2014-02-04 12:02:43 -0800 | [diff] [blame] | 30 | cp -p ${ONOS_HOME}/src/main/java/edu/stanford/ramcloud/JRamCloud.java ${HOME}/ramcloud/bindings/java/edu/stanford/ramcloud/ |
| 31 | cp -p ${ONOS_HOME}/src/main/cpp/edu_stanford_ramcloud_JRamCloud.cc ${HOME}/ramcloud/bindings/java/edu/stanford/ramcloud/ |
yoshi | 94c2e56 | 2014-01-22 15:18:57 -0800 | [diff] [blame] | 32 | cd ${HOME}/ramcloud/bindings/java/edu/stanford/ramcloud/ |
| 33 | javac JRamCloud.java |
| 34 | ./build_so.sh |
| 35 | jar cvf ${RAMCLOUD_HOME}/bindings/java/RamCloud.jar ${RAMCLOUD_HOME}/bindings/java/edu/stanford/ramcloud/*.class |
Yuta HIGUCHI | 30e31de | 2014-02-04 12:02:43 -0800 | [diff] [blame] | 36 | |