blob: 0621dfd6b52d652a9b16835159e8c498b6561eb3 [file] [log] [blame]
sungmok shinb3c37992022-03-02 02:55:12 +09001#!/usr/bin/env bash
2#
3# Copyright (c) 2022 Project CHIP Authors
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17
18# Activating connectedhomeip build environment
19source scripts/activate.sh
20
21# Clone webos_sdk
22echo "##### Cloning webOS OSE SDK #####"
23git clone https://github.com/cabin15/webos-ose-ndk third_party/webos_sdk
24
25# Extract webOS SDK
26cat third_party/webos_sdk/v2.14.1/webos_sdk.tar* | (
27 cd third_party/webos_sdk/v2.14.1/
28 tar xvzf -
29)
30
31# Grant execute permission for NDK install script
32chmod 555 third_party/webos_sdk/v2.14.1/webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.sh
33
34# Install webOS OSE NDK
35echo "##### Install webOS OSE NDK #####"
36third_party/webos_sdk/v2.14.1/webos-sdk-x86_64-cortexa7t2hf-neon-vfpv4-toolchain-2.14.1.g.sh -d third_party/webos_sdk/v2.14.1 -y
37
38# Activating webOS NDK build environment
39echo "##### Activating webOS NDK build environment #####"
40source third_party/webos_sdk/v2.14.1/environment-setup-cortexa7t2hf-neon-vfpv4-webos-linux-gnueabi
41echo ""
42
43# Build webos example
44echo "##### Build webos example #####"
45echo "##### Performing gn gen #####"
sungho1.shinfda78542022-05-25 04:21:58 +090046gn gen out/host --args="is_debug=false target_os=\"webos\" target_cpu=\"arm\" chip_enable_python_modules=false ar_webos=\"$AR\" cc_webos=\"$CC -Wno-format-security\" cxx_webos=\"$CXX\" webos_sysroot=\"$PKG_CONFIG_SYSROOT_DIR\" chip_build_tests=false enable_syslog=true treat_warnings_as_errors=false"
sungmok shinb3c37992022-03-02 02:55:12 +090047
48echo "##### Building by ninja #####"
49ninja -C out/host