A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

September 9, 2009

Make error

Hi,

I got an error "No rule to make target " while running the make. Please see the make output below.

Room:/home/room/Desktop/net # make
make -C /lib/modules/2.6.16.21-0.8-smp/build SUBDIRS=/home/room/Desktop/net modules
make[1]: Entering directory `/usr/src/linux-2.6.16.21-0.8-obj/i386/smp'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/usr/src/linux-2.6.16.21-0.8-obj/i386/smp'
make: *** [all] Error 2
Room:/home/room/Desktop/net #

The Makefile having the below lines.

obj-m :=lin_net_device.o
obj-m +=lin_net1.o
obj-m +=lin_net2.o

KDIR= /lib/modules/$(shell uname -r)/build

all:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
clean:
rm -rf *.o *.mod.* .c* .t*
clear:
rm -rf *.o *.mod.* .c* .t* *.ko

Can you please help me on this.

Click Here!