Skip to content

Commit

Permalink
Move build/config to config (#426)
Browse files Browse the repository at this point in the history
* move build_config to config

* mv build/scripts

* Restyled by clang-format

* move build/autoconf to autoconf

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
Rob Walker and restyled-commits authored Apr 20, 2020
1 parent d0488aa commit aeec6c5
Show file tree
Hide file tree
Showing 23 changed files with 31 additions and 54 deletions.
13 changes: 1 addition & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,7 @@ Makefile.in
aclocal.m4
autom4te.cache
output/
build/*
!build/README.md
!build/autoconf/m4/chip_check_project_config_includes.m4
!build/autoconf/m4/nl_with_lwip.m4
!build/config/standalone/CHIPProjectConfig.h
!build/config/standalone/SystemProjectConfig.h
!build/config/standalone/darwin/CHIPProjectConfig.h
!build/config/standalone/no-openssl/CHIPProjectConfig.h
!build/efr32/
!build/esp32/
!build/nrf5/
!build/scripts/gen-chip-version
build/
examples/**/build
config.log
config.status
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"${workspaceFolder}/build/default/src/**",
"${workspaceFolder}/build/default/src/include/**",
"${workspaceFolder}/build/default/src/lib/**",
"${workspaceFolder}/build/config/standalone/",
"${workspaceFolder}/build/config/standalone/**",
"${workspaceFolder}/config/standalone/",
"${workspaceFolder}/config/standalone/**",
"${workspaceFolder}/examples/**",
"${workspaceFolder}/src/**",
"${workspaceFolder}/src/include/",
Expand Down
12 changes: 6 additions & 6 deletions Makefile-Android
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ANDROID_STL_INCLUDES = $(foreach dir,$(ANDROID_STL_INCLUDE_DIRS_$(AND
# Tools and Executables
#

android-ndk-which = $(shell $(AbsTopSourceDir)/build/scripts/android-ndk-which --ndk-home $(ANDROID_NDK_HOME) $(1) $(TARGET_ABI))
android-ndk-which = $(shell $(AbsTopSourceDir)/scripts/android-ndk-which --ndk-home $(ANDROID_NDK_HOME) $(1) $(TARGET_ABI))

AR = $(call android-ndk-which,ar)
AS = $(call android-ndk-which,as)
Expand Down Expand Up @@ -114,7 +114,7 @@ INCLUDES += -isystem $(ANDROID_NDK_HOME)/sysroot/usr/incl
#
# Compilation/Build Flags
#

CPPFLAGS = --sysroot=$(ABI_SYSROOT) $(DEFINES) $(INCLUDES) $(ABI_CPPFLAGS)
CFLAGS = $(CPPFLAGS) -ffunction-sections -funwind-tables $(ABI_CFLAGS)
CXXFLAGS = $(CPPFLAGS) -fno-rtti $(ABI_CXXFLAGS)
Expand Down Expand Up @@ -142,7 +142,7 @@ CONFIGURE_OPTIONS = --disable-cocoa \
ifeq ($(DEBUG),1)
CONFIGURE_OPTIONS += --enable-debug --enable-optimization=no
else
CONFIGURE_OPTIONS +=
CONFIGURE_OPTIONS +=
endif


Expand All @@ -162,7 +162,7 @@ TopResultDir = $(ResultPath)
AbsTopResultDir = $(PWD)/$(TopResultDir)

# NB: Regardless of where JAVA_HOME points, always use the JNI headers from the Android NDK,
# and only include the top-most directory (include), not the system directory (include/linux).
# and only include the top-most directory (include), not the system directory (include/linux).
# Because the NDK mixes the JNI headers in with the linux headers, listing the system
# directory in the -I flags will result in strange compilation errors. And unlike the standard
# Java jni.h, the jni.h that comes with the Android NDK does not depend on any system-specific
Expand Down Expand Up @@ -257,7 +257,7 @@ JNI_INCLUDE_DIRS="$(JNI_INCLUDE_DIRS)" \
--host=$(ABI_CONFIG_TUPLE_$(1)) \
--with-sysroot=$(ABI_SYSROOT) \
--with-libtool-sysroot=$(ABI_SYSROOT) \
--with-chip-project-includes=$(AbsTopSourceDir)/build/config/android \
--with-chip-project-includes=$(AbsTopSourceDir)/config/android \
--prefix=/ \
--exec-prefix=/$(ABI_CONFIG_TUPLE_$(1)) \
$(CONFIGURE_OPTIONS))
Expand Down Expand Up @@ -444,7 +444,7 @@ $(TopResultDir) $(BUILD_DIRS):

help:
$(ECHO) ""
$(ECHO) "Type 'make -f $(firstword $(MAKEFILE_LIST))' to build CHIP for Android for the following"
$(ECHO) "Type 'make -f $(firstword $(MAKEFILE_LIST))' to build CHIP for Android for the following"
$(ECHO) "API level and ABIs: "
$(ECHO) ""
$(ECHO) " API Level $(ANDROID_API)"
Expand Down
6 changes: 3 additions & 3 deletions Makefile-Standalone
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ AbsTopResultDir = $(CURDIR)/$(TopResultDir)
TargetTuple = $(shell ${AbsTopSourceDir}/third_party/nlbuild-autotools/repo/third_party/autoconf/config.guess | sed -e 's/[[:digit:].]*$$//g')

ifeq ($(HOSTOS),darwin)
ProjectConfigDir ?= $(AbsTopSourceDir)/build/config/standalone/darwin
ProjectConfigDir ?= $(AbsTopSourceDir)/config/standalone/darwin
else
ProjectConfigDir ?= $(AbsTopSourceDir)/build/config/standalone
ProjectConfigDir ?= $(AbsTopSourceDir)/config/standalone
endif

ifeq ($(ARCH),x86_64)
Expand Down Expand Up @@ -120,7 +120,7 @@ endif
configure_OPTIONS += --with-openssl=$(OPENSSL)
ifeq ($(OPENSSL),no)
configure_OPTIONS += --disable-tools
ProjectConfigDir = $(AbsTopSourceDir)/build/config/standalone/no-openssl
ProjectConfigDir = $(AbsTopSourceDir)/config/standalone/no-openssl
endif

# If the user has asserted USE_FUZZING enable fuzzing build
Expand Down
2 changes: 1 addition & 1 deletion Makefile-iOS
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ ac_cv_have_decl_clock_gettime=no \
--target=$($(1)_arch_AUTOTOOLS)-$(TargetTupleStem) \
--prefix=/ \
--exec-prefix=/$(1)-$(TargetTuple) \
--with-chip-project-includes=$(AbsTopSourceDir)/build/config/ios \
--with-chip-project-includes=$(AbsTopSourceDir)/config/ios \
--with-logging-style=external \
--enable-cocoa \
--disable-docs \
Expand Down
8 changes: 4 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ EXTRA_DIST = \
bootstrap-configure \
repos.conf \
$(srcdir)/build/autoconf \
$(srcdir)/build/config \
$(srcdir)/build/efr32 \
$(srcdir)/build/nrf5 \
$(srcdir)/build/scripts \
$(srcdir)/config \
$(srcdir)/config/efr32 \
$(srcdir)/config/nrf5 \
$(srcdir)/scripts \
$(NULL)

BUILT_SOURCES = \
Expand Down
File renamed without changes.
11 changes: 0 additions & 11 deletions build/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion build/efr32/efr32-app.mk → config/efr32/efr32-app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#
# PROJECT_ROOT = $(realpath .)
#
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/build/efr32
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/config/efr32
#
# include $(BUILD_SUPPORT_DIR)/efr32-app.mk
# include $(BUILD_SUPPORT_DIR)/efr32-chip.mk
Expand Down
2 changes: 1 addition & 1 deletion build/efr32/efr32-chip.mk → config/efr32/efr32-chip.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#
# PROJECT_ROOT = $(realpath .)
#
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/build/efr32
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/config/efr32
#
# include $(BUILD_SUPPORT_DIR)/efr32-app.mk
# include $(BUILD_SUPPORT_DIR)/efr32-chip.mk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#
# PROJECT_ROOT = $(realpath .)
#
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/openweave-core/build/efr32
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/openweave-core/config/efr32
#
# include $(BUILD_SUPPORT_DIR)/efr32-app.mk
# include $(BUILD_SUPPORT_DIR)/efr32-openweave.mk
Expand Down
2 changes: 1 addition & 1 deletion build/nrf5/nrf5-app.mk → config/nrf5/nrf5-app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#
# PROJECT_ROOT = $(realpath .)
#
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/build/nrf5
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/config/nrf5
#
# include $(BUILD_SUPPORT_DIR)/nrf5-app.mk
#
Expand Down
2 changes: 1 addition & 1 deletion build/nrf5/nrf5-chip.mk → config/nrf5/nrf5-chip.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#
# PROJECT_ROOT = $(realpath .)
#
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/build/nrf5
# BUILD_SUPPORT_DIR = $(PROJECT_ROOT)/third_party/connectedhomeip/config/nrf5
#
# include $(BUILD_SUPPORT_DIR)/nrf5-app.mk
# include $(BUILD_SUPPORT_DIR)/nrf5-chip.mk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#ifndef CHIPPROJECTCONFIG_H
#define CHIPPROJECTCONFIG_H


#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1

// Configure WDM for event offload
Expand Down Expand Up @@ -57,7 +56,7 @@
#define WDM_ENFORCE_EXPIRY_TIME 1

// Increase session idle timeout in stand-alone builds for the convenience of developers.
#define CHIP_CONFIG_DEFAULT_SECURITY_SESSION_IDLE_TIMEOUT 120000
#define CHIP_CONFIG_DEFAULT_SECURITY_SESSION_IDLE_TIMEOUT 120000

#define CHIP_CONFIG_ENABLE_WDM_UPDATE 1

Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ AC_CONFIG_AUX_DIR([build/autoconf])
# Tell autoconf where to find auxilliary M4 macros
# Note that nlbuild-autotools has macros in two subdirs, for local vs third-party scripts
#
AC_CONFIG_MACRO_DIRS([build/autoconf/m4 third_party/nlbuild-autotools/repo/third_party/autoconf/m4 third_party/nlbuild-autotools/repo/autoconf/m4])
AC_CONFIG_MACRO_DIRS([build/autoconf/m4 autoconf/m4 third_party/nlbuild-autotools/repo/third_party/autoconf/m4 third_party/nlbuild-autotools/repo/autoconf/m4])

#
# Tell autoconf what file the package is using to aggregate C preprocessor
Expand Down Expand Up @@ -1274,23 +1274,23 @@ AC_LANG_PUSH([C++])

# SystemLayer

CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-system-project-includes, SYSTEM_PROJECT_CONFIG_INCLUDE, SystemProjectConfig.h, CHIP System Layer, ${ac_abs_confdir}/build/config/standalone)
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-system-project-includes, SYSTEM_PROJECT_CONFIG_INCLUDE, SystemProjectConfig.h, CHIP System Layer, ${ac_abs_confdir}/config/standalone)

# BleLayer

if test ${CONFIG_NETWORK_LAYER_BLE} = 1; then
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-ble-project-includes, BLE_PROJECT_CONFIG_INCLUDE, BleProjectConfig.h, CHIP BLE Layer, ${ac_abs_confdir}/build/config/standalone)
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-ble-project-includes, BLE_PROJECT_CONFIG_INCLUDE, BleProjectConfig.h, CHIP BLE Layer, ${ac_abs_confdir}/config/standalone)
fi

# InetLayer

if test ${CONFIG_NETWORK_LAYER_INET} = 1; then
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-inet-project-includes, INET_PROJECT_CONFIG_INCLUDE, InetProjectConfig.h, CHIP Inet Layer, ${ac_abs_confdir}/build/config/standalone)
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-inet-project-includes, INET_PROJECT_CONFIG_INCLUDE, InetProjectConfig.h, CHIP Inet Layer, ${ac_abs_confdir}/config/standalone)
fi

# Core

CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-project-includes, CHIP_PROJECT_CONFIG_INCLUDE, CHIPProjectConfig.h, CHIP Core, ${ac_abs_confdir}/build/config/standalone)
CHIP_CHECK_PROJECT_CONFIG_INCLUDES(chip-project-includes, CHIP_PROJECT_CONFIG_INCLUDE, CHIPProjectConfig.h, CHIP Core, ${ac_abs_confdir}/config/standalone)

# Device Layer

Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/efr32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ GECKO_SDK_SUITE_DIR := $(EFR32_SDK_ROOT)/..

all : |

BUILD_SUPPORT_DIR := $(CHIP_ROOT)/build/efr32
BUILD_SUPPORT_DIR := $(CHIP_ROOT)/config/efr32

include $(BUILD_SUPPORT_DIR)/efr32-app.mk
include $(BUILD_SUPPORT_DIR)/efr32-chip.mk
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/nrf5/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
PROJECT_ROOT := $(realpath .)

CHIP_ROOT ?= $(realpath $(PROJECT_ROOT)/third_party/connectedhomeip)
BUILD_SUPPORT_DIR = $(CHIP_ROOT)/build/nrf5
BUILD_SUPPORT_DIR = $(CHIP_ROOT)/config/nrf5

include $(BUILD_SUPPORT_DIR)/nrf5-app.mk
include $(BUILD_SUPPORT_DIR)/nrf5-chip.mk
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ PRETTY_FILES = \
CHIPVersion.h: force

define check-file-CHIPVersion.h
$(top_srcdir)/build/scripts/gen-chip-version "`cat $(1)`" -o "$(2)"
$(top_srcdir)/scripts/gen-chip-version "`cat $(1)`" -o "$(2)"
endef # check-file-CHIPVersion.h

MAKEDIR_TARGETS=$(top_builddir)/.local-version
Expand Down

0 comments on commit aeec6c5

Please sign in to comment.