sungmok shin | b3c3799 | 2022-03-02 02:55:12 +0900 | [diff] [blame] | 1 | #!/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 |
| 19 | source scripts/activate.sh |
| 20 | |
| 21 | # Clone webos_sdk |
| 22 | echo "##### Cloning webOS OSE SDK #####" |
| 23 | git clone https://github.com/cabin15/webos-ose-ndk third_party/webos_sdk |
| 24 | |
| 25 | # Extract webOS SDK |
| 26 | cat 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 |
| 32 | chmod 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 |
| 35 | echo "##### Install webOS OSE NDK #####" |
| 36 | third_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 |
| 39 | echo "##### Activating webOS NDK build environment #####" |
| 40 | source third_party/webos_sdk/v2.14.1/environment-setup-cortexa7t2hf-neon-vfpv4-webos-linux-gnueabi |
| 41 | echo "" |
| 42 | |
| 43 | # Build webos example |
| 44 | echo "##### Build webos example #####" |
| 45 | echo "##### Performing gn gen #####" |
sungho1.shin | fda7854 | 2022-05-25 04:21:58 +0900 | [diff] [blame] | 46 | gn 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 shin | b3c3799 | 2022-03-02 02:55:12 +0900 | [diff] [blame] | 47 | |
| 48 | echo "##### Building by ninja #####" |
| 49 | ninja -C out/host |