[riot-users] Explicitly enumerating app sources?
kaspar at schleiser.de
Tue Sep 10 23:15:48 CEST 2019
On 9/10/19 3:06 PM, Lars Eggert wrote:
> the RIOT make process for an application seems to want to compile all *.c files in the app directory.
> Is there a way to (1) prevent that and (2) explicitly specify which *.c files should be compiled in the app directory and ideally also outside of it?
Not using *.c is possible by setting "NO_AUTO_SRC=1" and adding the .c
files manually to SRC, both in the app's Makefile.
The files have to be in the same folder, though.
> (Have a complex app with many sources in a directory hierarchy.)
A workaround for that would be:
1. a Makefile in each subdirectory containing
and maybe "MODULE:=<unique_name>" (defaults to the last path component
2. add the folders to "DIRS", in the application's Makefile,
3. add the module names to "USEMODULE"
More information about the users