Building Linux

设置

NOTE: 下列安装命令是针对 Debian/Ubuntu Linux 系统的。 对应其他 Linux 版本的安装命令也有提供。

sudo apt-get install build-essential libgtk2.0-dev libssl-dev xsltproc ia32-libs libxml2-dev libcap-dev
sudo apt-get install python
sudo apt-get install scons
sudo apt-get install libssl-dev
root-source-dir/
    core/
        alljoyn/
        ajtcl/
    services/
        base/
        base_tcl/

搭建样例

cd <root dir of source>/core/alljoyn
scons BINDINGS=cpp WS=off BT=off ICE=off SERVICES="about,notification,controlpanel,config,onboarding,sample_apps"

搭建 AC 服务器 样例

AC 服务器样例应用程序使用全部的基础服务来模拟一个 AC 设备。

# Note, exclude the "base" dir for pre-14.06 source
cd $AJ_ROOT/services/base/sample_apps
scons BINDINGS=cpp WS=off ALL=1

向现存的应用程序添加一个 AllJoyn™ 框架。

  export AJ_ROOT=~/alljoyn

  # <TARGET CPU> can be either x86_64, x86, or whatever value you set for CPU= when running SCons.
  export AJ_DIST="$AJ_ROOT/core/alljoyn/build/linux/<TARGET CPU>/debug/dist"
export CXXFLAGS="$CXXFLAGS \
    -I$AJ_DIST/cpp/inc \
    -I$AJ_DIST/about/inc \
    -I$AJ_DIST/services_common/inc \
    -I$AJ_DIST/notification/inc \
    -I$AJ_DIST/controlpanel/inc \
    -I$AJ_DIST/services_common/inc \
    -I$AJ_DIST/samples_common/inc"
export LDFLAGS="$LDFLAGS \
    -L$AJ_DIST/cpp/lib \
    -L$AJ_DIST/about/lib \
    -L$AJ_DIST/services_common/lib \
    -L$AJ_DIST/notification/lib \
    -L$AJ_DIST/controlpanel/lib"