Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 3 additions & 142 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,15 @@ Elastos Carrier is a decentralized and encrypted peer-to-peer (P2P) communicatio

The authentication process of peer nodes utilizes the Elastos Decentralized ID (DID) sidechain. (TODO)

## Table of Contents

- [Elastos Carrier Native SDK](#elastos-carrier-native-sdk)
- [Introduction](#introduction)
- [Table of Contents](#table-of-contents)
- [Usage](#usage)
- [Build on Ubuntu / Debian / Linux Host](#build-on-ubuntu--debian--linux-host)
- [1. Brief introduction](#1-brief-introduction)
- [2. Install Pre-Requirements](#2-install-pre-requirements)
- [3. Build to run on host (Ubuntu / Debian / Linux)](#3-build-to-run-on-host-ubuntu--debian--linux)
- [4. Run Elashell or Elatests](#4-run-elashell-or-elatests)
- [5. Cross-compilation for Android Platform](#5-cross-compilation-for-android-platform)
- [6. Cross-compilation for Raspberry Pi](#6-cross-compilation-for-raspberry-pi)
- [Build on Raspberry Pi](#build-on-raspberry-pi)
- [1. Brief introduction](#1-brief-introduction-1)
- [2. Install Pre-Requirements](#2-install-pre-requirements-1)
- [3. Build to run on host](#3-build-to-run-on-host)
- [4. Run Elashell or Elatests](#4-run-elashell-or-elatests-1)
- [Build on MacOS Host](#build-on-macos-host)
- [1. Brief introduction](#1-brief-introduction-2)
- [2. Install Pre-Requirements](#2-install-pre-requirements-2)
- [3. Build to run on host](#3-build-to-run-on-host-1)
- [4. Run Elashell or Elatests](#4-run-elashell-or-elatests-2)
- [5. Cross-compilation for Android Platform](#5-cross-compilation-for-android-platform-1)
- [6. Cross-compilation for iOS Platform](#6-cross-compilation-for-ios-platform)
- [Build on Windows Host](#build-on-windows-host)
- [1. Brief introduction](#1-brief-introduction-3)
- [2. Set up Environment](#2-set-up-environment)
- [3. Build to run on host](#3-build-to-run-on-host-2)
- [4. Run Elashell or Elatests](#4-run-elashell-or-elatests-3)
- [Build API Documentation](#build-api-documentation)
- [Build on Ubuntu / Debian / Linux Host](#build-on-ubuntu--debian--linux-host-1)
- [1. Install Pre-Requirements](#1-install-pre-requirements)
- [2. Build](#2-build)
- [3. View](#3-view)
- [Contribution](#contribution)
- [Acknowledgments](#acknowledgments)
- [License](#license)

## Usage

**CMake** is used to build, test and package the Elastos Carrier project in an operating system as well as compiler-independent manner.

Certain knowledge of CMake is required.

At the time of this writing, The compilation of sources works on **macOS**, **Linux** (Ubuntu, Debian etc.) and **Windows**, and provides the option to cross-compile for target systems of **iOS**, **Android** and **RaspberryPi**.
At the time of this writing, The compilation of sources works on **macOS**, **Linux** (Ubuntu, Debian, Raspbian etc.) and **Windows**, and provides the option to cross-compile for target systems of **iOS**, **Android** and **RaspberryPi**.

## Build on Ubuntu / Debian / Linux Host
## Build on Ubuntu / Debian / Raspbian / Linux Host

### 1. Brief introduction

Expand All @@ -83,7 +44,7 @@ Download this repository using Git:
git clone https://github.com/elastos/Elastos.NET.Carrier.Native.SDK
```

### 3. Build to run on host (Ubuntu / Debian / Linux)
### 3. Build to run on host (Ubuntu / Debian / Raspbian Linux)

To compile the project from source code for the target to run on Ubuntu / Debian / Linux, carry out the following steps:

Expand Down Expand Up @@ -307,106 +268,6 @@ Create distribution package:
make dist
```

## Build on Raspberry Pi

### 1. Brief introduction

With CMake, Elastos Carrier can be cross-compiled to run only on Raspberry Pi as target platform, while compilation is carried out on a Raspberry Pi host.

### 2. Install Pre-Requirements

To generate Makefiles by using **configure** or **cmake** and manage dependencies of the Carrier project, certain packages must be installed on the host before compilation.

Run the following commands to install the prerequisite utilities:

```shell
sudo apt-get update
sudo apt-get install -f build-essential autoconf automake autopoint libtool flex bison libncurses5-dev cmake
```

Download this repository using Git:

```shell
git clone https://github.com/elastos/Elastos.NET.Carrier.Native.SDK
```

### 3. Build to run on host

To compile the project from source code for the target to run on Raspberry Pi, carry out the following steps:

Open a new terminal window.

Navigate to the previously downloaded folder that contains the source code of the Carrier project.

```shell
cd YOUR-PATH/Elastos.NET.Carrier.Native.SDK
```

Enter the 'build' folder.

```shell
cd build
```

Create a new folder with the target platform name, then change directory.

```shell
mkdir pi
cd pi
```

Generate the Makefile in the current directory:

*Note: Please see custom options below.*

```shell
cmake -DBUILD_ON_RPI=ON ../..
```

***

Optional (Generate the Makefile): To be able to build a distribution with a specific build type **Debug/Release**, as well as with customized install location of distributions, run the following commands:

```shell
cmake -DBUILD_ON_RPI=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=YOUR-INSTALL-PATH ../..
```

***

Create distribution package:

*Note: If "make dist" fails due to missing permissions, use "sudo make dist" instead.*

```shell
make dist
```

### 4. Run Elashell or Elatests

Elashell is a fully functional, lightweight shell program that processes commands and returns the output to the terminal. Through Elashell, users may connect to other carrier nodes and exchange messages.

Elatests is also a shell program, but with predefined commands, therefore no user interaction is necessary. The output for every command is displayed in the terminal for a simple evaluation of test results.

To run elashell or elatests, first extract the distribution package created previously and enter the extracted folder. Then, change directory to the 'bin' folder.

```shell
cd YOUR-DISTRIBUTION-PACKAGE-PATH/bin
```

Run Elashell:

```shell
./elashell
```

Available commands in the shell can be listed by using the command **help**. Specific command usage descriptions can be displayed by using **help [Command]** where [Command] must be replaced with the specific command name. For the entire command list please see the [COMMANDS.md](https://github.com/elastos/Elastos.NET.Carrier.Native.SDK/blob/master/COMMANDS.md) file.

Or run Elatests:

```shell
./elatests
```

## Build on MacOS Host

### 1. Brief introduction
Expand Down
4 changes: 0 additions & 4 deletions deps/pjsip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,6 @@ if(UNIX)
# only support for armv7l. (TODO: update)
# only support with Linux host.
set(PJLIB_SUFFIX "arm-unknown-linux-gnueabihf")
elseif(BUILD_ON_RPI)
# set library suffix name for raspberry PI target
# only support for compilation on raspberry PI platform.
set(PJLIB_SUFFIX "armv7l-unknown-linux-gnueabihf")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
# set library name for Linux target itself.
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
Expand Down