On 1/15/25 11:34 AM, Quentin Schulz wrote:

[...]

Wondering if we couldn't use variables to make the Makefile a bit easier on the eye (though not necessarily more readable)?

Something like

ifdef CONFIG_XPL_BUILD
SPL_COMMON := spl
else
SPL_COMMON := common
endif

obj-y += rcar64-$(SPL_COMMON).o

Then we could use it for gen3 and gen4 object files as well for example.

I really struggle to parse Makefile/C code when there are a lot of ifdefs especially once they get nested, but maybe that's just me :)
What I would like even a bit more would be:

obj-$(!SYMBOL) +=

An inverted match, add stuff into build if symbol is not set.

Reply via email to