From db364960a70963eec641261235f5f0e022f6ee24 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Mon, 4 Jan 2021 17:57:16 -0800 Subject: [PATCH] [nrf52811] only build CLI and RCP examples (not NCP) (#6043) --- examples/Makefile-nrf52811 | 1 - examples/apps/Makefile.am | 4 ++++ examples/apps/ncp/Makefile.am | 4 ++++ script/check-arm-build-autotools | 1 - src/Makefile.am | 4 ++++ src/ncp/Makefile.am | 2 ++ 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/examples/Makefile-nrf52811 b/examples/Makefile-nrf52811 index 317bd9cc2..37cd78da3 100644 --- a/examples/Makefile-nrf52811 +++ b/examples/Makefile-nrf52811 @@ -91,7 +91,6 @@ endif # Otherwise, the default serial transport is UART. # ifndef DISABLE_TRANSPORTS -configure_OPTIONS += --enable-ncp configure_OPTIONS += --enable-radio-only ifeq ($(NCP_SPI),1) COMMONCFLAGS += -DSPIS_AS_SERIAL_TRANSPORT=1 diff --git a/examples/apps/Makefile.am b/examples/apps/Makefile.am index 8abfc8b85..004a98f5f 100644 --- a/examples/apps/Makefile.am +++ b/examples/apps/Makefile.am @@ -47,6 +47,10 @@ endif if OPENTHREAD_ENABLE_NCP SUBDIRS += ncp +else +if OPENTHREAD_ENABLE_RADIO_ONLY +SUBDIRS += ncp +endif endif endif diff --git a/examples/apps/ncp/Makefile.am b/examples/apps/ncp/Makefile.am index 430585ebd..7db30e851 100644 --- a/examples/apps/ncp/Makefile.am +++ b/examples/apps/ncp/Makefile.am @@ -76,11 +76,13 @@ LDADD_COMMON += \ $(NULL) endif # OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER +if OPENTHREAD_ENABLE_NCP if OPENTHREAD_ENABLE_FTD bin_PROGRAMS += \ ot-ncp-ftd \ $(NULL) endif +endif ot_ncp_ftd_CPPFLAGS = \ $(CPPFLAGS_COMMON) \ @@ -110,11 +112,13 @@ ot_ncp_ftd_SOURCES = \ $(SOURCES_COMMON) \ $(NULL) +if OPENTHREAD_ENABLE_NCP if OPENTHREAD_ENABLE_MTD bin_PROGRAMS += \ ot-ncp-mtd \ $(NULL) endif +endif ot_ncp_mtd_CPPFLAGS = \ $(CPPFLAGS_COMMON) \ diff --git a/script/check-arm-build-autotools b/script/check-arm-build-autotools index dee5ce31f..831fc86a3 100755 --- a/script/check-arm-build-autotools +++ b/script/check-arm-build-autotools @@ -133,7 +133,6 @@ build_kw41z() build_nrf52811() { local options=( - "BORDER_ROUTER=1" "COAP=1" "DNS_CLIENT=1" "LINK_RAW=1" diff --git a/src/Makefile.am b/src/Makefile.am index b06a7e428..97622dc08 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -51,6 +51,10 @@ endif if OPENTHREAD_ENABLE_NCP SUBDIRS += ncp +else +if OPENTHREAD_ENABLE_RADIO_ONLY +SUBDIRS += ncp +endif endif if OPENTHREAD_PLATFORM_POSIX diff --git a/src/ncp/Makefile.am b/src/ncp/Makefile.am index 7733e9f8a..69308d212 100644 --- a/src/ncp/Makefile.am +++ b/src/ncp/Makefile.am @@ -37,6 +37,7 @@ EXTRA_DIST = \ lib_LIBRARIES = $(NULL) +if OPENTHREAD_ENABLE_NCP if OPENTHREAD_ENABLE_FTD lib_LIBRARIES += libopenthread-ncp-ftd.a endif @@ -44,6 +45,7 @@ endif if OPENTHREAD_ENABLE_MTD lib_LIBRARIES += libopenthread-ncp-mtd.a endif +endif if OPENTHREAD_ENABLE_RADIO_ONLY lib_LIBRARIES += libopenthread-rcp.a