3 export BASE_DIR=$( cd "$(dirname "$0")" ; pwd )
6 SUBMODULE="edge-home-orchestration-go"
7 SUBMODULE_BUILD_CMD="build.sh object"
9 # Orchestration library for c-archive
10 HEADER_FILE="orchestration.h"
11 LIBRARY_FILE="liborchestration.a"
12 INTERFACE_OUT_DIR="$BASE_DIR/$SUBMODULE/src/interfaces/capi/output"
13 INTERFACE_OUT_INC_DIR="$INTERFACE_OUT_DIR/inc/linux_arm"
14 INTERFACE_OUT_LIB_DIR="$INTERFACE_OUT_DIR/lib/linux_arm"
17 CMAIN_DIR="$BASE_DIR/CMain"
18 CMAIN_INC_DIR="$CMAIN_DIR/inc"
19 CMAIN_LIB_DIR="$CMAIN_DIR/lib"
21 function build_init() {
23 echo "=================================================================="
24 echo " Initialize Submodule from \"$SUBMODULE\" repository"
25 echo "=================================================================="
31 function build_c_interface() {
33 echo "=================================================================="
34 echo " Build binary [c-archive] of c interface from Submodule locally"
35 echo "=================================================================="
40 function submodule_init() {
42 echo "----------------------------------------------------------"
43 echo " Submodule Init to \"$SUBMODULE\" directory"
44 echo "----------------------------------------------------------"
48 function submodule_sync() {
50 echo "---------------------------------------------"
51 echo " Submodule Sync to Init version"
52 echo "---------------------------------------------"
56 function submodule_update() {
58 echo "---------------------------------------------"
59 echo " Submodule update to Latest version"
60 echo "---------------------------------------------"
61 git submodule foreach git pull origin master
64 function submodule_build() {
66 echo "---------------------------------------------"
67 echo " Build binary [c-archive]"
68 echo "---------------------------------------------"
70 cd $SUBMODULE || exit 1
71 bash $SUBMODULE_BUILD_CMD || exit 1
75 function copy_library() {
77 echo "----------------------------------------------------------"
78 echo " Copy orchestration library [c-archive] to CMain folder"
79 echo "----------------------------------------------------------"
80 cp $INTERFACE_OUT_INC_DIR/$HEADER_FILE $CMAIN_INC_DIR
81 cp $INTERFACE_OUT_LIB_DIR/$LIBRARY_FILE $CMAIN_LIB_DIR
85 function build_clean() {
87 echo "-----------------------------------"
89 echo "-----------------------------------"
93 function build_test() {
95 echo "-----------------------------------"
97 echo "-----------------------------------"
101 function build_package() {
103 echo "------------------------------------------"
104 echo " Create Packages for Tizen from gbs build"
105 echo "------------------------------------------"
107 gbs -c ./.tizen.gbs.conf build -A armv7l --include-all
109 ### build through go toolchain
110 #gbs -c ./.tizen.gbs.conf build -A armv7l --include-all --define 'go_build ON'
134 echo "--------------------------------------------------------------"
135 echo " $0 : build C-Archive & RPM packages from Submodule"
136 echo " $0 local : build from local Submodule"
137 echo " $0 test : build test"
138 echo " $0 clean : build clean"
139 echo "--------------------------------------------------------------"