Elastos Carrier is a decentralized peer to peer communication framework.
Execute following command to install all pre-requirements.
$ sudo apt-get update
$ sudo apt-get install build-essential autoconf automake autopoint libtool flex bison libncurses5-dev
$ curl -L -o /tmp/flatcc-0.5.0.tar.gz https://github.com/dvidelabs/flatcc/archive/v0.5.0.tar.gz
$ cd /tmp && tar xzvf flatcc-0.5.0.tar.gz
$ mkdir -p /tmp/flatcc-0.5.0/build/install
$ cd /tmp/flatcc-0.5.0/build/install && cmake ../.. -DFLATCC_INSTALL=on
$ cd /tmp/flatcc-0.5.0/build/install && sudo make installChange to $(SRC_ROOT)/build directory, and run:
$ ./linux_build.shFor more build options, run build script with "help" option.
$ ./linux_build.sh helpYou need to install the following packages on your Mac to build from the source:
autoconf automake libtool shtool pkg-config gettextYou can use brew or build the packages from the source code.
Change to $(SRC_ROOT)/build directory, and run:
$ ./darwin_build.shFor more build options, run build script with "help" option.
$ ./darwin_build.sh helpChange to $(SRC_ROOT)/docker directory, and run:
$ docker build .After the Docker image build finish, then tag the new image:
$ docker tag THE-NEW-GENERATED-IMAGE-ID elastos-devThen you can start the Docker image:
$ docker run -tiv $(SRC_ROOT):/home/elastos/Projects --tmpfs=/tmp elastos-dev /bin/bash$ cd ~/Projects/build
$ ./linux_build.shYou need to get android NDK packages to build carrier NDKs for several targets, and of which will be built into Android Java carrier SDK.
Download android NDK package for Linux (r13b or higher), and unzip it to $YOUR-PATH/TO.
Add the following command to ${HOME}/.bashrc to setup $ANDROID_NDK_HOME environment.
export ANDROID_NDK_HOME=YOUR-PATH/TO/android-ndk-r13bThen run the command to make effect.
source ${HOME}/.bashrcRun the build script with wanted target name under ${SRC_ROOT}/build. For example, the following command is to build Carrier NDK for armv7 target.
./android_build.sh armCurrently, you can 'cross-'build Carrier NDKs for arm, arm64, x86 and x86_64 targets.
For more build options, run build script with "help" option.
./android_build.sh helpYou also can build android Carrier NDKs on MacOS with the same steps on Linux except for using android NDKs packages for Darwin.
You shold build iOS Carrier NDKs on MacOS with xCode supported.
Run the following command to build Carrier NDK for arm64:
./ios_build.sh arm64
or, use following command:
./ios_build.sh x86_64
to build Carrier NDK for x86_64 target.
For more build options, run build script with "help" option.
./ios_build.sh help
The cross-compilation for RaspberryPi should be done on Linux platform. You need to download raspberry toolchains from https://github.com/raspberrypi/tools to
export RASPBERRY_TOOLCHAIN_HOME=YOUR-PATH/TO/arm-bcm2708Then run the command to make effect.
source ${HOME}/.bashrcRun the build script with 'armv7l' option to build Carrier NDK for raspberry target.
./linux_build.sh armv7lFor more build options, run build script with "help" option.
./linux_build.sh armv7l helpAfter success finished build from the source code, change directory to $(SRC_ROOT)/apps/shell.
This demo application is an interactive shell for Elastos Carrier. Run following command to start
the shell.
$ ./elashell.shThe documentation can only build on the Linux host. The python on the MacOS has a critical bug will cause the build process failed.
$ sudo apt-get update
$ sudo apt-get install doxygen python-sphinx graphviz
$ curl -L -o /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py
$ sudo python /tmp/get-pip.py
$ sudo pip install breatheChange to $(SRC_ROOT)/docs directory, run:
$ make html