|
RcdMathLib_doc
Open Source Library for Linear and Non-linear Algebra
|
Well-defined units of code in the RcdMathLib that provide a set of features are encapsulated in a module. RcdMathLib is module-based and composed of the following main modules:
Each main module includes sub-modules, for more details see The structure of the RcdMathLib.
Modules are directories containing source and header files as well as a Makefile. Furthermore, their API can be defined in one or more header files, residing in the include path of their super-module.
For example, the matrix sub-module is implemented in the BASIC_OPERATIONS sub-module, in the linear_algebra/basic_operations directory. Its API is defined in linear_algebra/basic_operations/matrix.h.
A module's Makefile just needs to include Makefile.base in the RIOT repository as well as Makefile.base and Makefile.include in the RcdMathLib repository:
The Makefile.base and Makefile.include macros in the example above are includes for the linear algebra module.
If your module's name differs from the name of the directory it resides in you need to set the MODULE macro in addition.
The Makefile.dep serves to define dependencies and the Makefile.include to append target specific information to variables like INCLUDES. Modules can be used by adding their name to the USEMODULE macro of the application's Makefile.
The module may depend on other modules to minimize code duplication. These dependencies are defined in Makefile.dep with the following syntax:
Makefile.dep is processed only once therefore, the dependency block for a module must be added before dependencies pull in their dependencies.