User Tools

Site Tools


build_for_your_system

How To Build IoTivity

IoTivity includes sources for a series of projects. You can find all these projects here:

The output of the build is in:

<top directory of the project>/out/<target_os>/<target_arch>/<build_type>/

e.g.

iotivity/out/android/armeabi-v7a/release/.

This document uses the 'iotivity' project as an example; the way to build other projects is almost the same.

IoTivity project build tool scons

Scons is a cross-platform build tool. Its usage is quite similar to GNU make. To build a project, run following command in the directory where a SConstruct file exists (SConstruct is the entrance of an scons build, it's equivalent to the Makefile of 'make') :

$ scons [options] [target]

In addition, usually the scons build script of a project provides useful help information (including build options). To see the help information:

 $ scons [options] -h

Note: If no value is specified for an option, the default value will be used.

Generally, it's required to specify the target OS and target ARCH, to tell Scons which OS and which ARCH you'd like build this project for. By default, the target OS and ARCH is the same as the host.

For help about how to set an option, please run:

 $ scons TARGET_OS=xxx TARGET_ARCH=yyy [XXX=zzz ...] -h

Prerequites

Scons

Please refer to the following page to install scons:

Java:

To build Java code, JDK is required.

(If the project doesn't include Java code or you don't want to build the Java code, this isn't required.)

(Note: for convenience, you can add the IDE/SDK path in the environment variable, so you don't need to add it in the command line each time. The build script will guide you to do that.)

External libraries

The IoTivity project depends on some external libraries, such as boost, expat …

While building, the existence of each external library will be checked. If it doesn't exist, the build script will either try to download, unpack, and build the library or notify the user to install it.

Build IoTivity project for Ubuntu Linux

Build IoTivity project for Android

Build IoTivity project for Arduino

Build Iotivity project for Tizen

Build IoTivity project on Windows

Build IoTivity project for Raspberry Pi (Raspbian Wheezy)

Build IoTivity project for Mac OSX

Build IoTivity project for IOS

Additional Resources

Check build, os, hardware pages for more hints and links

build_for_your_system.txt · Last modified: 2017/03/15 20:10 by Ben Lloyd Pearson