diff --git a/config/efr32/efr32-app.mk b/config/efr32/efr32-app.mk index b09214aa999b8b..81bd2fe4cccd37 100644 --- a/config/efr32/efr32-app.mk +++ b/config/efr32/efr32-app.mk @@ -263,6 +263,7 @@ endif endif STD_DEFINES = \ + HAVE_CONFIG_H \ __STARTUP_CLEAR_BSS \ $(MCU) diff --git a/config/nrf5/nrf5-app.mk b/config/nrf5/nrf5-app.mk index 544e32ba85eb44..6ccd967b6a22b7 100644 --- a/config/nrf5/nrf5-app.mk +++ b/config/nrf5/nrf5-app.mk @@ -144,7 +144,7 @@ STD_LIBS = \ STD_INC_DIRS = -STD_DEFINES = +STD_DEFINES = HAVE_CONFIG_H STD_COMPILE_PREREQUISITES = nrf5-sdk-check diff --git a/config/standalone/standalone-app.mk b/config/standalone/standalone-app.mk index f784c246e13150..93743d784bf3e7 100644 --- a/config/standalone/standalone-app.mk +++ b/config/standalone/standalone-app.mk @@ -91,6 +91,8 @@ STD_LIBS = \ -lm \ -lpthread +STD_DEFINES = HAVE_CONFIG_H + DEFINE_FLAGS = $(addprefix -D,$(STD_DEFINES) $(DEFINES)) INC_FLAGS = $(addprefix -I,$(INC_DIRS) $(STD_INC_DIRS)) diff --git a/src/system/SystemConfig.h b/src/system/SystemConfig.h index ac283cf92fc2f6..02c997c247d466 100644 --- a/src/system/SystemConfig.h +++ b/src/system/SystemConfig.h @@ -38,7 +38,9 @@ #define SYSTEMCONFIG_H /* Platform include headers */ +#ifdef HAVE_CONFIG_H #include +#endif /* Include a CHIP project-specific configuration file, if defined. *