본문 바로가기

IoT (Internet of Things)/AllSeen Alliance

AllJoyn framework 리눅스상에서 컴파일


AllSeen Alliance에서의 open-source framework인 AllJoyn을 컴파일 하는 방법에 대해서 간단히 정리하도록 하겠습니다.


먼저 AllJoyn 이란?

AllJoyn™ is a collaborative open-source software framework that makes it easy for devices and apps to discover and communicate with each other. It supports many language bindings and can be easily integrated into platforms small and large. The AllJoyn framework defines a common way for devices and apps to communicate with one another ushering a new wave of interoperable devices to make the Internet of Things a reality.


아래는 리눅스 피시에서 구동을 목표로 한다.


1. 컴파일을 하기 위하여 먼저 소스를 다운로드 받도록 한다.

     AllJoyn은 git 로 관리가 되고 있다.


$> mkdir alljoyn
 $> cd alljoyn

 $> repo init -u https://git.allseenalliance.org/gerrit/devtools/manifest
 $> repo sync


* repo: https://code.google.com/p/git-repo/

이미 git가 설치되어 있다면, 위의 사이트를 참고하여 repo를 적절한 설치 위치에 다운로드 하여 실행권한을 주면 된다.

* 왠지 한번에 다운로드가 되지 않아서 "ctrl + c" 후 몇번이나 repo sync를 하고 나서 정상적으로 모두 다운로드 할 수 있었다.



2. 다운로드가 모두 끝나면 다음과 같다


[sound79@sound79-FX603:test]$ ls
compliance  core  data  devtools  gateway  lighting  multimedia  services



3. 환경 변수를 설정한다.


export AJ_ROOT=`pwd`
export TARGET_CPU=x86_64
export LD_LIBRARY_PATH=$AJ_ROOT/core/alljoyn/build/linux/$TARGET_CPU/debug/dist/cpp/lib:$LD_LIBRARY_PATH 



4. 컴파일을 한다.


cd core/alljoyn/

scons BINDINGS=cpp WS=off BT=off ICE=off

* scon: http://www.scons.org/

SCons는 Python기반의 빌드툴이며, 나름 Makefile의 대안으로 떠오르고 있는 오픈 툴킷이라고 합니다.


5. 이제 샘플 프로그램을 실행해 보면 된다.