xref: /test/xts/tools/lite/hctest/BUILD.gn (revision 31c75014)
1# Copyright (c) 2023 Huawei Device Co., Ltd.
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("//test/xts/device_attest_lite/build/devattestconfig.gni")
15
16static_library("hctest") {
17  sources = [
18    "//third_party/unity/src/unity.c",
19    "src/hctest.c",
20    "src/hctest_service.c",
21  ]
22
23  include_dirs = [
24    "include",
25    "//third_party/unity/src",
26    "//commonlibrary/utils_lite/include",
27    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
28    "//base/startup/bootstrap_lite/services/source",
29    "//base/startup/init/interfaces/innerkits/include/syspara",
30  ]
31
32  public = [
33    "//third_party/unity/src/unity.h",
34    "include/hctest.h",
35  ]
36
37  defines = [ "UNITY_INCLUDE_CONFIG_H" ]
38
39  deps = []
40
41  if (integrate_attest_mini_module) {
42    include_dirs += [
43      "//test/xts/device_attest_lite/interfaces/kit/js/include",
44      "//test/xts/device_attest_lite/interfaces/innerkits",
45      "//test/xts/device_attest_lite/framework/mini",
46    ]
47    defines += [ "INTER_ATTEST_MINI_MODULE" ]
48    deps += [ "${devattest_path}/framework:devattest_sdk" ]
49  }
50
51  if (board_toolchain_type != "iccarm") {
52    cflags = [ "-Wno-error" ]
53  }
54}
55