OK, problem solved. The issue was that preprocesor directive in c: #elseif
doesn't work. I don't know why but I replaced this with #ifdef ... #endif
and #ifdef ... #endif instead of using #elseif in the middle and
everything works.
On Fri, Aug 21, 2020 at 10:01 AM Tomek The Messenger <
tomekthemes
Hi
I have problem with passing flag from makefile to .c file.
During building external kernel module my macro isn't seen by compiler. I
used plenty of ways.
First way:
ccflags-y += -DMY_FLAG
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
Second:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) CFLAGS_my-kernel-module.o="-DMY