I am learning Linux module programming. I work on Ubuntu 12.04. I made a module, namely start.c, and saved it in home/documents/module_prog.
Then I made the following makefile (I am not acquainted with makefiles so I just did what the tutorial told me to):
obj-m += start.o
KDIR = /usr/src/linux-headers-3.2.0-31-generic-pae
all:
make -C $(KDIR) SUBDIRS=$(PWD) modules
clean:
rm -rf *.o *.ko *.mod.* *.symvers *.order
But, now when I type make in the terminal, a message is displayed which says
make: Nothing to be done for `all'.
Please tell me what is wrong?
Make sure that the commands for a make target are intended with a tab, not spaces. I.e.
Otherwise the
alltarget will be empty, and thus nothing is to be done.