ONNC Umbrella is the umbrella for all ONNC projects.
- git
- Autotools
- GNU Libtool
- pkg-config
- Protocol Buffer
- glog
- flex
- bison
- curl
apt install git automake libtool protobuf-compiler libprotoc-dev pkg-config python2.7 python2.7-dev python-pip libgoogle-glog-dev flex bison curl
pip install lit
xcode-select --install
brew install git autoconf automake libtool pkg-config protobuf coreutils
The simplest way to compile this package is:
Dance with build.sh
script.
-
Check out ONNC from the repository.
git clone --recursive https://github.com/ONNC/onnc-umbrella.git ${ONNC}
-
Type
cd ${ONNC}
to the directory containing the source code. -
Use
build.sh
to compile the package../build.sh [mode] [target folder]
The package is built at ./build-<mode>/
, and installed
to ./install-<mode>/
. It is a staged installation if the
third argument (target folder) is given. Check GNU automake's DESTDIR for
more information about a staged installation at the below
link.
For example, use ./build.sh dbg /opt/onnc
to build the latest
revision in debug mode for installation at /opt/onnc
.
It will build in build-dbg
, install to install-dbg
, and
generate a binary package named onnc-<branch name>.tar.gz
.
You can use the following instruction to install the binary package.
tar zxf onnc-master.tar.gz -C /opt
or
mkdir /opt/onnc
tar zxf onnc-master.tar.gz --strip-components 1 -C /opt/onnc
Recompile with the same arguments ./build.sh dbg /opt/onnc
, or
make with DESTDIR=./install-dbg
to ensure the binaries are installed
to the staged installation path instead of being installed directly to the
target folder /opt/onnc
.
cd ./build-dbg
make DESTDIR=$(pwd)/../install-dbg install
There are four building modes, regression mode, debugging mode, optimizing mode and normal mode. Select mode by changing the second argument.
mode | description |
---|---|
normal | (default) build with normal compilation flags |
dbg | build in debug mode (unittest enabled) |
rgn | build in debug mode (unittest enabled) with regression test |
opt | build in optimized mode |
The package is configured to be installed at the target folder (PREFIX).
- README - This document
- README.md - Same document in Markdown format
- build.sh - The building script
- src - The source directory of onnc project
- external - The external librarys
We also provide build.cmake.sh
for people love cmake. Currently, this script
is experimental. It only pass deployment test on ubuntu Linux environment.
-
Check out ONNC from the repository with
--recursive
flaggit clone --recursive https://github.com/ONNC/onnc-umbrella.git ${ONNC}
-
Type
cd ${ONNC}
to the directory containing the source code. -
Use
build.cmake.sh
to compile the package../build.cmake.sh [mode] [target folder]
The behavior of this script is as same as ./build.sh
, but driven with CMake instead of automake.