11 Commits

Author SHA1 Message Date
Marian Buschsieweke
6ac8aba955
build system: rework EXTERNAL_MODULE_DIRS
Previously, external modules had to be individually added to both
EXTERNAL_MODULE_DIRS and USEMODULE. If those where not in sync, this
resulted in build errors.

With this commit, search folders for external modules are added to
EXTERNAL_MODULE_DIRS instead. So lets say the file system structure is
like this

```
└── /path/to/external/modules
    ├── mod_a
    │   ├── Makefile
    │   ├── Makefile.dep
    │   ├── Makefile.include
    │   ├── foo.c
    │   └── include
    │       └── external_module.h
    └── mod_b
        ├── Makefile
        └── bar.c

```

One now adds `/path/to/external/modules` to EXTERNAL_MODULES and only
with `USEMODULE += mod_a` the corresponding module, dependencies and
include settings are actually used. Hence, it is possible to configure
`EXTERNAL_MODULE_DIRS` from `~/.profile` or `~/.bashrc` once and never
needs to worry about them again.
2021-05-07 21:29:05 +02:00
Alexandre Abadie
f4ea2b97c8
doc/creating-modules: add section about module generator 2020-05-20 19:05:40 +02:00
Francisco Molina
67910a1219
doc/creating-modules.md: correct PSEUDOMODULES documentation 2020-04-21 09:25:06 +02:00
Jan Mohr
67569fbd56 doc/creating-modules: updated Pseudomodules entry 2020-02-28 16:51:53 +01:00
Marinus Enzinger
dc8b8d7749 doc: add example for problems arising from non unique module names 2019-01-07 15:29:25 +01:00
Gaëtan Harter
4157a07152
tests/external_module_dir: test for EXTERNAL_MODULE_DIRS
It demonstrates:

 * Adding a module with source code
 * Setting a header include directory
 * Adding dependences, which are evaluated before other modules dependencies

If the application compiles, everything is ok.
2018-10-23 13:22:25 +02:00
Gaëtan Harter
6b534a935f
make: process include and dep for external modules
Process `Makefile.include` for external modules. It is included after the others
so it could overwrite some of the configuration if wanted.

Process `Makefile.dep` for external modules. It is included before the others so
it could be parsed before setting 'default' values to dependencies.
2018-10-23 13:22:25 +02:00
Gaëtan Harter
051d192e7f doc: fix 'EXTERNAL_MODULES_DIRS' name
Name in the documentation did not match the one in Makefile.include.
2018-04-19 13:20:19 +02:00
Gaëtan Harter
e5d234e2f4 doc: add warning that MODULE name should be unique
Modules produce an output archive called `${MODULE}.a` if several modules use
the same name, the output is overwritten.
2018-03-14 12:29:22 +01:00
Raul Fuentes
1c0653f383 Doxygen: Completed line for Makefile.base 2017-05-30 20:48:57 +02:00
Martine Lenders
b5f5f8314a doc: add page about creating modules 2015-12-19 14:18:18 +01:00