1# Copyright (C) 2022 Beken Corporation 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/lite/config/subsystem/lite_subsystem.gni") 15import("//kernel/liteos_m/liteos.gni") 16import("${board_adapter_dir}/hals/sdk_dir.gni") 17 18module_name = get_path_info(rebase_path("."), "name") 19module_switch = defined(LOSCFG_BOARD_BK7235X) 20kernel_module(module_name) { 21 deps = [ 22 #"$product_path/hdf_config:hdf_hcs", 23 "${third_party_adatpter_path}/arch", 24 "${third_party_adatpter_path}/musl", 25 ] 26} 27 28declare_args() { 29} 30 31config("public") { 32 include_dirs = [ 33 "${beken_sdk_dir}/components/bk_ps/include", 34 "${beken_sdk_dir}/components/bk_startup/liteos_m", 35 "${beken_sdk_dir}/components/bk_startup/liteos_m", 36 "${beken_sdk_dir}/components/bk_common/include", 37 "${beken_sdk_dir}/components/bk_ble", 38 "${beken_sdk_dir}/components/media/include", 39 "${beken_sdk_dir}/components/release", 40 "${beken_sdk_dir}/components/bk_libs/include", 41 "${beken_sdk_dir}/components/easy_flash", 42 ] 43 include_dirs += bk_hal_include_dirs 44 45 lib_dirs = [ "$root_out_dir/libs" ] 46 ldflags = [ 47 "-lc", 48 "-Wl,--cref", 49 50 "-fno-rtti", 51 "-fno-lto", 52 "-T$device_path/bk7235_ota.ld", 53 ] 54 defines = [ 55 # "WIFI_STATE_NOT_AVALIABLE=WIFI_STATE_NOT_AVAILABLE", 56 ] 57 libs = [ 58 "sdk_adapter", 59 "gcc", 60 "bt", 61 "wifi", 62 ] 63 64 if (build_xts) { 65 ldflags += [ 66 "-Wl,--whole-archive", 67 "-lbootstrap", 68 "-lbroadcast", 69 "-lbegetutil", 70 "-lcjson_static", 71 "-lhctest", 72 "-lhal_sysparam", 73 "-lhal_update_static", 74 "-lhota", 75 "-lhuks_test_common", 76 "-linithook", 77 "-lmbedtls_static", 78 "-lmodule_ActsBootstrapTest", 79 "-lmodule_ActsDfxFuncTest", 80 "-lmodule_ActsHieventLiteTest", 81 "-lmodule_ActsHuksHalFunctionTest", 82 83 # "-lmodule_ActsParameterTest", 84 "-lmodule_ActsSamgrTest", 85 "-lmodule_ActsUpdaterFuncTest", 86 87 # "-lmodule_ActsUtilsFileTest", 88 "-lmodule_ActsWifiIotTest", 89 90 #"-lmodule_ActsWifiServiceTest", 91 "-lwifiservice", 92 "-Wl,--no-whole-archive", 93 ] 94 } 95} 96 97lite_subsystem("bk_sdk") { 98 subsystem_components = [ ":cjson" ] 99 deps = [ 100 "adapter", 101 "//build/lite:ohos", 102 "//device/soc/beken/bk7235/hals/communication/wifi_lite/wifiservice:wifiservice", 103 ] 104} 105 106lite_component("cjson") { 107 features = [] 108 109 deps = [ "//build/lite/config/component/cJSON:cjson_static" ] 110} 111