[EXPERIMENTAL] Makefile: EXTRA_APPS_LIBS and EXTRA_APPS_INCPATHS vars#3154
[EXPERIMENTAL] Makefile: EXTRA_APPS_LIBS and EXTRA_APPS_INCPATHS vars#3154zdebanos wants to merge 1 commit intoapache:masterfrom
Conversation
|
@zdebanos I suggest converting it to Draft until we have an equivalent support to CMakefile to avoid build system asymmetry. |
|
I also forgot to mention one problem I've come accross. I've found out that the $(AR) variable in the nuttx build system is set to Currently in this commit, |
|
Yup, the same for SED it is set to just sed. It works on Linux, but on BSD sed is "bsd sed" and gsed (GNU sed compatible with Linux one), we should also add |
|
Does Nuttx actually support the |
I am Make user, sorry, maybe @raiden00pl will know? :-) |
The variables are to be used to mainly by the export rule to export external libraries (.a files) and respective include paths. The exported external libraries are packed together in the libapps.a library (basically, every .o files are extracted and then packed together). Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com>
51d2942 to
ddb1dae
Compare
I think it is not supported yet, cmake is relatively new on NuttX and it is not the official building system (maybe it could become in the future or maybe not) :-) |
The variables are to be used to mainly by the export rule to export external libraries (.a files) and respective include paths.
The exported external libraries are packed together in the libapps.a library (basically, every .o files are extracted and then packed together).
Signed-off-by: Stepan Pressl pressl.stepan@gmail.com
Summary
Improving the build system with these variables so all the symbols from the external libraries can be packed together within the libapps.a library. This is particularly useful, when we'd like to use this external library and all of its symbols in the nuttx export.
I'm not expecting to be this merged, yet. But I'd like to start a debate over possible solutions and discuss other solutions and improvements. I'm thinking about generalizing the variables over multiple Makefiles, so any directory in the NuttX project would have some kind of a variable. Or possibly only one variable.
A different way of doing this is to just all of these libraries separately, and not withing libapps.a, etc.
Also, external libraries are, in the current state, linked using the EXTRA_LIBS variable. But that is done only in the last stage of the build and the linker only picks symbols that are needed. In the end, the exported library only has a subset of all the symbols.
Also cmake support must be added.