Kernel 2.4 compiling device driver
by Slack_nub from LinuxQuestions.org on (#5F5S6)
Hello,
I'm using Slackware 10.1 kernel 2.4.29. I need to enable a Ethernet device driver as kernel module. I have the c file for the driver and I made a makefile according to
https://tldp.org/LDP/lkmpg/2.4/html/x208.htm
My goal is to have a file named devicedriver.o in /lib/modules/2.4.29/kernel/drivers/net so INSMOD will be able to load the ethernet card driver.
This is my makefile
I got "make: Nothing to be done for 'makefile'." after I run $make makefile
Can you please help me out? Thanks.


I'm using Slackware 10.1 kernel 2.4.29. I need to enable a Ethernet device driver as kernel module. I have the c file for the driver and I made a makefile according to
https://tldp.org/LDP/lkmpg/2.4/html/x208.htm
My goal is to have a file named devicedriver.o in /lib/modules/2.4.29/kernel/drivers/net so INSMOD will be able to load the ethernet card driver.
This is my makefile
TARGET := devicedriverI place the makefile in the same folder as my devicedriver.c in /10.1
WARN := -W -Wall -Wstrict-prototypes -Wmissing-prototypes
INCLUDE := -isystem /lib/modules/2.4.29/build/include
CFLAGS := -O2 -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE}
CC := gcc
${TARGET}.o: ${TARGET}.c
.PHONY: clean
clean:
rm -rf ${TARGET}.o
I got "make: Nothing to be done for 'makefile'." after I run $make makefile
Can you please help me out? Thanks.