Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformat GN build files #2192

Merged
merged 1 commit into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") {

if (chip_build_tools) {
deps += [
"${chip_root}/examples/shell",
"${chip_root}/src/qrcodetool",
"${chip_root}/src/setup_payload",
"${chip_root}/examples/shell",
]
}
}
Expand All @@ -74,8 +74,8 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") {
"${chip_root}/src/crypto/tests",
"${chip_root}/src/inet/tests",
"${chip_root}/src/lib/core/tests",
"${chip_root}/src/lib/support/tests",
"${chip_root}/src/lib/shell/tests",
"${chip_root}/src/lib/support/tests",
"${chip_root}/src/lwip/tests",
"${chip_root}/src/platform/tests",
"${chip_root}/src/setup_payload/tests",
Expand Down
32 changes: 16 additions & 16 deletions examples/lighting-app/nrf5/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ executable("lighting_app") {
output_name = "chip-nrf52840-lighting-example"

sources = [
"${chip_root}/src/app/clusters/on-off-server/on-off.c",
"${chip_root}/src/app/util/attribute-size.c",
"${chip_root}/src/app/util/attribute-storage.c",
"${chip_root}/src/app/util/attribute-table.c",
"${chip_root}/src/app/util/chip-response.cpp",
"${chip_root}/src/app/util/client-api.c",
"${chip_root}/src/app/util/ember-print.cpp",
"${chip_root}/src/app/util/message.c",
"${chip_root}/src/app/util/process-cluster-message.c",
"${chip_root}/src/app/util/process-global-message.c",
"${chip_root}/src/app/util/util.c",
"${nrf5_platform_dir}/app/Server.cpp",
"${nrf5_platform_dir}/app/chipinit.cpp",
"${nrf5_platform_dir}/app/include/Server.h",
Expand All @@ -65,36 +76,25 @@ executable("lighting_app") {
"main/AppTask.cpp",
"main/DataModelHandler.cpp",
"main/LightingManager.cpp",
"main/gen/call-command-handler.c",
"main/gen/callback-stub.c",
"main/gen/znet-bookkeeping.c",
"main/include/AppEvent.h",
"main/include/AppTask.h",
"main/include/DataModelHandler.h",
"main/include/LightingManager.h",
"main/main.cpp",
"main/gen/call-command-handler.c",
"main/gen/callback-stub.c",
"main/gen/znet-bookkeeping.c",
"${chip_root}/src/app/util/attribute-size.c",
"${chip_root}/src/app/util/attribute-storage.c",
"${chip_root}/src/app/util/attribute-table.c",
"${chip_root}/src/app/util/chip-response.cpp",
"${chip_root}/src/app/util/client-api.c",
"${chip_root}/src/app/util/ember-print.cpp",
"${chip_root}/src/app/util/message.c",
"${chip_root}/src/app/util/process-cluster-message.c",
"${chip_root}/src/app/util/process-global-message.c",
"${chip_root}/src/app/util/util.c",
"${chip_root}/src/app/clusters/on-off-server/on-off.c",
]

deps = [
":sdk",
"${chip_root}/src/lib",
"${chip_root}/third_party/openthread/platforms/nrf528xx:libnordicsemi_nrf52840_radio_driver_softdevice",
"${chip_root}/third_party/openthread/platforms/nrf528xx:libopenthread-nrf52840-softdevice-sdk",
"${openthread_root}:libopenthread-cli-ftd",
"${openthread_root}:libopenthread-ftd",
"${nrf5_platform_dir}/app/support:freertos_newlib_lock_support",
"${nrf5_platform_dir}/app/support:freertos_newlib_lock_support_test",
"${openthread_root}:libopenthread-cli-ftd",
"${openthread_root}:libopenthread-ftd",
]

output_dir = root_out_dir
Expand Down
11 changes: 6 additions & 5 deletions examples/lock-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ efr32_sdk("sdk") {
defines += [ "BUILD_RELEASE=1" ]
}

defines += [ "USE_APP_CONFIG",
"${efr32_board}=1",
"BOARD_ID=${efr32_board}",
defines += [
"USE_APP_CONFIG",
"${efr32_board}=1",
"BOARD_ID=${efr32_board}",
]
}

Expand All @@ -64,10 +65,10 @@ executable("lock_app") {
"src/AppTask.cpp",
"src/ButtonHandler.cpp",
"src/LEDWidget.cpp",
"src/main.cpp",
"src/platform/${efr32_family}/${efr32_board}/hal-config.h",
"src/platform/${efr32_family}/${efr32_board}/init_board.c",
"src/platform/${efr32_family}/${efr32_board}/init_mcu.c",
"src/platform/${efr32_family}/${efr32_board}/hal-config.h",
"src/main.cpp",
]

output_dir = root_out_dir
Expand Down
28 changes: 14 additions & 14 deletions examples/lock-app/nrf5/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ executable("lock_app") {
output_name = "chip-nrf52840-lock-example"

sources = [
"${chip_root}/src/app/clusters/on-off-server/on-off.c",
"${chip_root}/src/app/util/attribute-size.c",
"${chip_root}/src/app/util/attribute-storage.c",
"${chip_root}/src/app/util/attribute-table.c",
"${chip_root}/src/app/util/chip-response.cpp",
"${chip_root}/src/app/util/client-api.c",
"${chip_root}/src/app/util/ember-print.cpp",
"${chip_root}/src/app/util/message.c",
"${chip_root}/src/app/util/process-cluster-message.c",
"${chip_root}/src/app/util/process-global-message.c",
"${chip_root}/src/app/util/util.c",
"${nrf5_platform_dir}/app/Server.cpp",
"${nrf5_platform_dir}/app/chipinit.cpp",
"${nrf5_platform_dir}/app/include/Server.h",
Expand All @@ -66,25 +77,14 @@ executable("lock_app") {
"main/AppTask.cpp",
"main/BoltLockManager.cpp",
"main/DataModelHandler.cpp",
"main/gen/call-command-handler.c",
"main/gen/callback-stub.c",
"main/gen/znet-bookkeeping.c",
"main/include/AppEvent.h",
"main/include/AppTask.h",
"main/include/BoltLockManager.h",
"main/include/DataModelHandler.h",
"main/main.cpp",
"main/gen/call-command-handler.c",
"main/gen/callback-stub.c",
"main/gen/znet-bookkeeping.c",
"${chip_root}/src/app/util/attribute-size.c",
"${chip_root}/src/app/util/attribute-storage.c",
"${chip_root}/src/app/util/attribute-table.c",
"${chip_root}/src/app/util/chip-response.cpp",
"${chip_root}/src/app/util/client-api.c",
"${chip_root}/src/app/util/ember-print.cpp",
"${chip_root}/src/app/util/message.c",
"${chip_root}/src/app/util/process-cluster-message.c",
"${chip_root}/src/app/util/process-global-message.c",
"${chip_root}/src/app/util/util.c",
"${chip_root}/src/app/clusters/on-off-server/on-off.c",
]

deps = [
Expand Down
3 changes: 1 addition & 2 deletions examples/platform/nrf528xx/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ arm_fpu = "fpv4-sp-d16"

openthread_project_core_config_file = "OpenThreadConfig.h"
openthread_core_config_deps = []
openthread_core_config_deps =
[ "${chip_root}/examples/platform/nrf528xx:openthread_core_config_nrf52840_chip_examples" ]
openthread_core_config_deps = [ "${chip_root}/examples/platform/nrf528xx:openthread_core_config_nrf52840_chip_examples" ]

chip_ble_project_config_include = "<CHIPProjectConfig.h>"
chip_device_project_config_include = "<CHIPProjectConfig.h>"
Expand Down
4 changes: 2 additions & 2 deletions src/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ static_library("common") {
output_name = "libCHIPDataModelCommon"

sources = [
"chip-zcl-zpro/command-encoder/encoder.c",
"chip-zcl-zpro/command-encoder/decoder.c",
"chip-zcl-zpro/command-encoder/encoder.c",
]

public_deps = [
":codec_headers",
"${chip_root}/src/lib/support",
"${chip_root}/src/system",
":codec_headers",
]

public_configs = [ ":app_config" ]
Expand Down
2 changes: 1 addition & 1 deletion src/controller/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import("//build_overrides/chip.gni")

# FIXME: remove after actual key exchange is implemented
config("controller_wno_deprecate") {
cflags = ["-Wno-deprecated-declarations"]
cflags = [ "-Wno-deprecated-declarations" ]
}

static_library("controller") {
Expand Down
6 changes: 3 additions & 3 deletions src/crypto/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ chip_test_suite("tests") {
"HKDF_SHA256_test_vectors.h",
"Hash_SHA256_test_vectors.h",
"PBKDF2_SHA256_test_vectors.h",
"TestCryptoLayer.h",
"PBKDF2_SHA256_test_vectors.h",
"SPAKE2P_FE_MUL_test_vectors.h",
"SPAKE2P_FE_RW_test_vectors.h",
"SPAKE2P_HMAC_test_vectors.h",
"SPAKE2P_POINT_MUL_ADD_test_vectors.h",
"SPAKE2P_POINT_MUL_test_vectors.h",
"SPAKE2P_POINT_RW_test_vectors.h",
"PBKDF2_SHA256_test_vectors.h",
"SPAKE2P_POINT_VALID_test_vectors.h",
"SPAKE2P_FE_MUL_test_vectors.h",
"SPAKE2P_RFC_test_vectors.h",
"TestCryptoLayer.h",
]

public_deps = [
Expand Down
38 changes: 18 additions & 20 deletions src/lib/message/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,30 @@ static_library("message") {
output_name = "libChipMessage"

sources = [
"CHIPBinding.cpp",
"CHIPBinding.h",
"CHIPConnection.cpp",
"CHIPExchangeMgr.cpp",
"CHIPExchangeMgr.h",
"CHIPFabricState.cpp",
"CHIPFabricState.h",
"CHIPMessageLayer.cpp",
"CHIPMessageLayer.h",
"CHIPSecurityMgr.h",
"CHIPSecurityMgr.cpp",
"CHIPServerBase.h",
"CHIPServerBase.cpp",
"CHIPRMPConfig.h",
"HostPortList.h",
"HostPortList.cpp",
"CHIPBinding.cpp",
"CHIPBinding.h",
"CHIPConnection.cpp",
"CHIPExchangeMgr.cpp",
"CHIPExchangeMgr.h",
"CHIPFabricState.cpp",
"CHIPFabricState.h",
"CHIPMessageLayer.cpp",
"CHIPMessageLayer.h",
"CHIPRMPConfig.h",
"CHIPSecurityMgr.cpp",
"CHIPSecurityMgr.h",
"CHIPServerBase.cpp",
"CHIPServerBase.h",
"HostPortList.cpp",
"HostPortList.h",
]

public_deps = [
"${chip_root}/src/ble",
"${chip_root}/src/ble:ble_config_header",
"${chip_root}/src/crypto",
"${chip_root}/src/inet:inet_config_header",
"${chip_root}/src/inet",
"${chip_root}/src/inet:inet_config_header",
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/core:chip_config_header",
"${chip_root}/src/lib/support",
Expand All @@ -58,7 +58,5 @@ static_library("message") {
"${nlio_root}:nlio",
]

public_configs = [
":includes",
]
public_configs = [ ":includes" ]
}
2 changes: 1 addition & 1 deletion src/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build/config/linux/pkg_config.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/nlio.gni")
import("//build/config/linux/pkg_config.gni")

import("device.gni")

Expand Down
5 changes: 3 additions & 2 deletions src/platform/device.gni
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ if (chip_device_platform == "auto") {

declare_args() {
# Enable openthread support.
chip_enable_openthread = (chip_device_platform == "linux" || chip_device_platform == "nrf5")
chip_enable_openthread =
chip_device_platform == "linux" || chip_device_platform == "nrf5"

# Enable wifi support.
chip_enable_wifi = chip_device_platform == "linux"
chip_enable_wifi = chip_device_platform == "linux"
}

_chip_device_layer = "none"
Expand Down
1 change: 0 additions & 1 deletion third_party/efr32_sdk/efr32_board.gni
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ if (efr32_board == "BRD4304A") {
"Please provide a valid value for EFR32_BOARD env variable (currently supported BRD4304A, BRD4161A, BRD4166A, BRD4170A or BRD4180A)")
assert(false, "The board ${efr32_board} is unsupported as for now.")
}

3 changes: 1 addition & 2 deletions third_party/ot-br-posix/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/chip.gni")
import("//build/config/linux/pkg_config.gni")

import("//build_overrides/chip.gni")

config("ot_br_client_config") {
include_dirs = [
Expand Down