Need help understanding Makefile(s)
Hello to all, I'm trying to make several thing but I'm having issues I think because the files the Makefile references are in different locations. I'm running Debian 2.6.26-1-686. Here is a Makefile I'm having trouble with:
ifneq ($(KERNELRELEASE),)
obj-m := fpi2002.o
else
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
fpi2002.ko:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
install: fpi2002.ko
cp fpi2002.ko /lib/modules/$(shell uname -r)/kernel/drivers/serial/fpi2002.ko
depmod -a
endif
This is the original file, I've tried editing KDIR to the path of kernel headers "/lib/modules/$(shell uname -r)/build/include" but then I get a message that there is no rule to make target modules. This may have been the wrong path to take that's why I've kept a backup of the original.(see above) Anyways I'm at a loss as I don't really understand the syntax of a makefile, my programming experience has been in the .Net environment.
|