2015-12-05 14:52:09 +01:00
|
|
|
/**
|
2015-11-17 15:19:55 +01:00
|
|
|
* @defgroup pkg Packages
|
|
|
|
* @{
|
|
|
|
* @brief External libraries and applications
|
|
|
|
*
|
|
|
|
* Using packages
|
|
|
|
* ==============
|
|
|
|
* To add a package to the list of compiled modules you have to add it to the
|
|
|
|
* `USEPKG` macro in your application's Makefile. If the package provides
|
|
|
|
* header files you might need to update the `INCLUDE` macro, too:
|
|
|
|
*
|
|
|
|
* ~~~~~~~~ {.mk}
|
|
|
|
* USEPKG += <pkg_name>
|
2016-03-05 01:05:48 +01:00
|
|
|
* INCLUDE += $(RIOTPKG)/<pkg_name>/...
|
2015-11-17 15:19:55 +01:00
|
|
|
* ~~~~~~~~
|
|
|
|
*
|
2020-06-23 19:17:25 +02:00
|
|
|
* When the package can be build out-of-source, the source code of external
|
|
|
|
* packages is fetched in a global location in
|
|
|
|
* `$(RIOTBASE)/build/pkg/$(PKG_NAME)`.
|
|
|
|
* When out-of-source build is not possible (for example because the package
|
|
|
|
* build system doesn't allow it), the source code is fetch in the build
|
|
|
|
* directory of the application under `$(BINDIR)/pkg/$(PKG_NAME)`
|
|
|
|
* and is the same as the build directory (this is the case for micropython
|
|
|
|
* and openthread packages).
|
|
|
|
*
|
2015-11-17 15:19:55 +01:00
|
|
|
* Porting an external library
|
|
|
|
* ===========================
|
|
|
|
* Structure of a package
|
|
|
|
* ----------------------
|
|
|
|
* This module provides porting information for libraries and applications to use
|
|
|
|
* with RIOT (to build an external module). If you'd like to add a package to RIOT
|
|
|
|
* you need to add a directory with the name of your package to this directory.
|
2018-09-19 20:08:06 +02:00
|
|
|
* This directory should contain at least one file:
|
2015-11-17 15:19:55 +01:00
|
|
|
*
|
|
|
|
* * **Makefile**: A Makefile describing how to get the upstream application,
|
|
|
|
* apply the patch and how to build the package as a RIOT module.
|
|
|
|
* A rough template for several methods of acquiring a package is provided in
|
2019-10-28 21:24:58 +01:00
|
|
|
* `pkg/Makefile.git` and `pkg/Makefile.http`.
|
2015-11-17 15:19:55 +01:00
|
|
|
*
|
2018-09-19 20:08:06 +02:00
|
|
|
* Patch files can be included in a `patches` directory in the package dir.
|
|
|
|
* These are applied to the upstream package to make it build with RIOT.
|
|
|
|
*
|
2015-11-17 15:19:55 +01:00
|
|
|
* Creating a patch with git
|
|
|
|
* -------------------------
|
|
|
|
* Assuming your upstream library resides in a git repository, you can create the
|
|
|
|
* patch files as follows:
|
|
|
|
* * checkout the targeted version of the upstream application
|
|
|
|
* * create a new branch (e.g. `riot-port`)
|
|
|
|
* * conduct necessary changes (e.g. edit, add, or remove some files)
|
|
|
|
* * commit your changes using `git commit`
|
|
|
|
* * create the patch files using `git format-patch -n riot-port`
|
2018-09-19 20:08:06 +02:00
|
|
|
* * move the resulting patch files to the patches directory of your package.
|
2015-11-17 15:19:55 +01:00
|
|
|
* @}
|
2015-12-05 14:52:09 +01:00
|
|
|
*/
|