I want to be able to dynamically create a define for builds. I'm planning to have a build script that will write...
CXXFLAGS=-Dmydefine to a component.mk file. If i write it in my root project directory it seems to do nothing. If I write to my main project subdirectory it works, but doesn't work in a parallel folder components subdirectory. For example....
MyRootFolder
<tab>mainFolder
<tab>components/sensorsFolder
<tab>components/audioFolder
So the component.mk in mainFolder works for those files. But it appears I would have to modify component.mk in all the component subfolders. I'm looking for a simpler method that would cover the entire project.
Create define for build question
Re: Create define for build question
To make project-wide changes, add a Makefile.projbuild file to one of your components (alongside component.mk), that sets "CPPFLAGS += -Dxyz"
(Note that these are a blunt instrument as they will also change all IDF source file compiler flags. Sparing use is recommended.)
(Note that these are a blunt instrument as they will also change all IDF source file compiler flags. Sparing use is recommended.)
Re: Create define for build question
The guy who's going to automate the builds wants to export an environment variable to define which H/W version of the device he's building the firmware for. I was able to do that with Makefile.projbuild. Thanks!!!ESP_Angus wrote: ↑Fri Apr 12, 2019 4:36 amTo make project-wide changes, add a Makefile.projbuild file to one of your components (alongside component.mk), that sets "CPPFLAGS += -Dxyz"
(Note that these are a blunt instrument as they will also change all IDF source file compiler flags. Sparing use is recommended.)
John A
Who is online
Users browsing this forum: No registered users and 124 guests