[riot-devel] Location for module specific compile configurations

Kaspar Schleiser kaspar at schleiser.de
Fri Feb 1 00:25:16 CET 2019


Hi,

On 1/31/19 3:31 PM, Gaëtan Harter wrote:
> One solution, which does not match the current way of doing in RIOT.
> Is to use Make declarative syntax and  define your configurations using
> deferred evaluation
> 
> CFLAGS += $(if $(filter something,$(USEMODULE)), -DIF_NUM=3)
> 
> This would make CFLAGS have the correct value when `USEMODULE` is
> resolved. There may be cases where it does not work directly though.

How about adding this somewhere:

CFLAGS += $(foreach module,$(USEMODULE), $(CFLAGS.$(module)))

Then add

CFLAGS.something += -DIF_NUM=3

to the CPU's Makefile.include.

Kaspar


More information about the devel mailing list