[Buildroot] Using CFLAGS_MODULE in linux.mk

John O'Sullivan John.OSullivan at BlackBox.com
Thu Mar 9 16:05:34 UTC 2017


Hi,
I am trying to build a kernel module that can have a number of conditional compile options depending on the product variant I am building.
Outside of buildroot I can do



make ARCH=arm modules CFLAGS_MODULE=-DVARIANT_PPG


The module picks up the VARIANT_PPG and I can conditionally build the module.
I am trying to do something similar in buildroot (2013-05). To test this out I tried amending the linux.mk file as follows:


LINUX_MAKE_FLAGS+=CFLAGS_MODULE=-DVARIANT_PPG




However when I add this line to linux.mk the variable VARIANT_PPG never seems to be seen in the module.
Has anyone any suggestions? Is there a reason its not working in the .mk file.
Is there a better way of doing this?


regards
John


________________________________

This email and any files transmitted with it are confidential and are intended for the sole use of the individual to whom they are addressed. Black Box Corporation reserves the right to scan all e-mail traffic for restricted content and to monitor all e-mail in general. If you are not the intended recipient or you have received this email in error, any use, dissemination or forwarding of this email is strictly prohibited. If you have received this email in error, please notify the sender by replying to this email.


More information about the buildroot mailing list