module compile_ firsttime
I am writing a helloworld module & for my make this is the errors comming
rajasekhar@localhost hello]$ make -f Makefile.txt make -C /lib/modules/2.6.20/build M=/home/rajasekhar/hello modules make[1]: Entering directory `/usr/src/kernels/linux-2.6.20.4' scripts/Makefile.build:17: /home/rajasekhar/hello/Makefile: No such file or directory make[2]: *** No rule to make target `/home/rajasekhar/hello/Makefile'. Stop. make[1]: *** [_module_/home/rajasekhar/hello] Error 2 make[1]: Leaving directory `/usr/src/kernels/linux-2.6.20.4' make: *** [default] Error 2 my makefile is like this PLEASE FIND THE BUG ifneq ($(KERNELRELEASE),) @echo $(KERNELRELEASE) # call from kernel build system obj-m := hello.o else KERNELDIR ?= /lib/modules/2.6.20/build PWD := $(shell pwd) default: $(MAKE) -C $(KERNELDIR) M=$(PWD) modules echo $(KERNELDIR) endif clean: rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions depend .depend dep: $(CC) $(CFLAGS) -M *.c > .depend ifeq (.depend,$(wildcard .depend)) include .depend endif |
Why don’t you call your makefile “Makefile” instead of “Makefile.txt”?
|
All times are GMT -5. The time now is 08:00 AM. |