external kernel module how to do include in <>
by DeanAnderson from LinuxQuestions.org on (#50YEC)
Hi
I am compiling my external kernel module. I got error:
Code:trbus-core.c:18:10: fatal error: trbus.h: No such file or directory
| #include <trbus.h>Structure of my driver is:
Code:./trbus-core.c
./include/trbus.h
./MakefileIn Makefile:
Code:SRC := $(shell pwd)
obj-m := trbus-core.o
#ccflags-y := -I$(SRC)/include #this one also doesn't work
EXTRA_CFLAGS += -I$(SRC)/include
all:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
modules_install:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
clean:
rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
rm -f Module.markers Module.symvers modules.order
rm -rf .tmp_versions Modules.symversWhen I add path
#include "include/trbus.h"
there is none such problem.
Any idea how to solve the problem with #include <trbus.h>?
Because other kernel modules from other repositories need in future also see this header so this one #include <trbus.h> needs to work.


I am compiling my external kernel module. I got error:
Code:trbus-core.c:18:10: fatal error: trbus.h: No such file or directory
| #include <trbus.h>Structure of my driver is:
Code:./trbus-core.c
./include/trbus.h
./MakefileIn Makefile:
Code:SRC := $(shell pwd)
obj-m := trbus-core.o
#ccflags-y := -I$(SRC)/include #this one also doesn't work
EXTRA_CFLAGS += -I$(SRC)/include
all:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
modules_install:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
clean:
rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
rm -f Module.markers Module.symvers modules.order
rm -rf .tmp_versions Modules.symversWhen I add path
#include "include/trbus.h"
there is none such problem.
Any idea how to solve the problem with #include <trbus.h>?
Because other kernel modules from other repositories need in future also see this header so this one #include <trbus.h> needs to work.