forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.gn
128 lines (116 loc) · 5.17 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# See Project CHIP LICENSE file for licensing information.
import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
import("${chip_root}/src/lib/core/core.gni")
import("${chip_root}/src/lib/shell/shell_device.gni")
import("${chip_root}/src/platform/device.gni")
source_set("default") {
if (!chip_use_external_logging) {
deps = []
if (chip_use_pw_logging) {
deps += [ "$dir_pw_log" ]
}
if (chip_device_platform == "cyw30739") {
deps += [ "${chip_root}/src/platform/Infineon/CYW30739:logging" ]
} else if (chip_device_platform == "psoc6") {
deps += [ "${chip_root}/src/platform/Infineon/PSOC6:logging" ]
} else if (chip_device_platform == "cc32xx") {
deps += [ "${chip_root}/src/platform/cc32xx:logging" ]
} else if (chip_device_platform == "esp32") {
deps += [ "${chip_root}/src/platform/ESP32:logging" ]
} else if (chip_device_platform == "openiotsdk") {
deps += [ "${chip_root}/src/platform/openiotsdk:logging" ]
} else if (chip_device_platform == "mbed") {
deps += [ "${chip_root}/src/platform/mbed:logging" ]
} else if (chip_device_platform == "bl602" ||
chip_device_platform == "bl702" ||
chip_device_platform == "bl702l") {
deps += [ "${chip_root}/src/platform/bouffalolab/common:logging" ]
} else if (chip_device_platform == "mt793x") {
deps += [ "${chip_root}/src/platform/mt793x:logging" ]
} else if (chip_device_platform == "cc13x2_26x2") {
deps += [ "${chip_root}/src/platform/cc13xx_26xx/cc13x4_26x2:logging" ]
} else if (chip_device_platform == "cc13x4_26x4") {
deps += [ "${chip_root}/src/platform/cc13xx_26xx/cc13x4_26x4:logging" ]
} else if (chip_device_platform == "ameba") {
deps += [ "${chip_root}/src/platform/Ameba:logging" ]
} else if (chip_device_platform == "asr") {
deps += [ "${chip_root}/src/platform/ASR:logging" ]
} else if (chip_device_platform == "webos") {
deps += [ "${chip_root}/src/platform/webos:logging" ]
} else if (chip_device_platform == "zephyr" ||
chip_device_platform == "nxp_zephyr") {
deps += [ "${chip_root}/src/platform/Zephyr:logging" ]
} else if (chip_device_platform == "nrfconnect") {
deps += [ "${chip_root}/src/platform/nrfconnect:logging" ]
} else if (chip_device_platform == "telink") {
deps += [ "${chip_root}/src/platform/telink:logging" ]
} else if (chip_device_platform == "efr32") {
deps += [ "${chip_root}/src/platform/silabs/efr32:logging" ]
} else if (chip_device_platform == "SiWx917") {
deps += [ "${chip_root}/src/platform/silabs/SiWx917:logging" ]
} else if (chip_device_platform == "linux") {
deps += [ "${chip_root}/src/platform/Linux:logging" ]
} else if (chip_device_platform == "tizen") {
deps += [ "${chip_root}/src/platform/Tizen:logging" ]
} else if (chip_device_platform == "qpg") {
deps += [ "${chip_root}/src/platform/qpg:logging" ]
} else if (chip_device_platform == "darwin") {
deps += [ "${chip_root}/src/platform/Darwin:logging" ]
} else if (chip_device_platform == "mw320") {
deps += [ "${chip_root}/src/platform/nxp/mw320:logging" ]
} else if (chip_device_platform == "k32w0" ||
chip_device_platform == "k32w1" ||
chip_device_platform == "nxp") {
deps += [ "${chip_root}/src/platform/nxp:logging" ]
} else if (chip_device_platform == "beken") {
deps += [ "${chip_root}/src/platform/Beken:logging" ]
} else if (chip_device_platform == "stm32") {
deps += [ ":stdio" ]
} else if (chip_device_platform == "nuttx") {
deps += [ "${chip_root}/src/platform/NuttX:logging" ]
} else {
assert(
chip_device_platform == "fake" || chip_device_platform == "android" ||
chip_device_platform == "external")
}
}
}
source_set("headers") {
public = [ "LogV.h" ]
}
if (current_os == "android") {
static_library("android") {
sources = [ "impl/android/Logging.cpp" ]
deps = [
":headers",
"${chip_root}/src/lib/core:chip_config_header",
"${chip_root}/src/lib/support:attributes",
"${chip_root}/src/lib/support:logging_constants",
"${chip_root}/src/platform:platform_config_header",
"${chip_root}/src/platform/logging:headers",
]
libs = [ "log" ]
}
}
# We need to reference the output file of ":stdio" at build time,
# but get_target_outputs() does not work for binary targets. As a
# workaround, define a reasonable path and make the target use it.
stdio_archive = "$root_out_dir/liblogging-stdio.a"
source_set("stdio") {
sources = [ "impl/stdio/Logging.cpp" ]
deps = [
":headers",
"${chip_root}/src/lib/core:chip_config_header",
"${chip_root}/src/lib/support:attributes",
"${chip_root}/src/lib/support:logging_constants",
"${chip_root}/src/platform:platform_config_header",
"${chip_root}/src/platform/logging:headers",
]
# Ensure we end up with the expected output file name
output_dir = get_path_info(stdio_archive, "dir")
output_name = get_path_info(stdio_archive, "name")
output_extension = get_path_info(stdio_archive, "extension")
output_prefix_override = true
}