I´m trying to compile a kernel module which has a included .h file in it. At the moment the follow files are used;
main.c
gpiodriver.c
gpiodriver.h
The makefile:
#CC=/usr/local/xtools/arm-unknown-linux-uclibcgnueabi/bin/arm-unknown-linux-uclibcgnueabi-cc
PROG = main
$(PROG)-objs := gpiodriver.o
obj-m += $(PROG).o
all: $(PROG)
$(PROG): $(OBJ)
make ARCH=arm CROSS_COMPILE=/usr/local/xtools/arm-unknown-linux-uclibcgnueabi/bin/arm-linux- -C
~/felabs/sysdev/tinysystem/linux-2.6.34 M=$(PWD) -o $(PROG) modules
clean:
make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) clean
Honestly I'm not that good with the makefile, so my guess is that I'm doing it completly wrong..