Site Tools


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>/



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. Usage is similar to GNU make. To build a project, run following command in the directory where a SConstruct file exists. SConstruct is the controlling file for an scons build, similar to the Makefile for the make command, but there is only one. In SCons, subsidiary files are always called explicitly by the build, by convention these are named SConscript, although iotivity also has instances of scripts named something.scons. With scons you cannot start a partial build by running scons in a subdirectory, but you can usually name the target you want to build for from the top directory. Use the help option to see available targets.

$ 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.

To build, you need to specify the target OS and target ARCH, to to build the project for. If not specified, the target OS and ARCH will default to those of the host.

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

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



Please refer to the following page to install scons:


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

Build IoTivity project for webOS

Additional Resources

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

build_for_your_system.txt · Last modified: 2018/11/06 21:48 by nathanheldtsheller