2.4makefile-general Linux technology-Linux programming and kernel information. For more information, see the following section. Hello, everyone
I have written a 2.4 driver named mymodule. c.
An error occurred while writing makefile. My makefile is as follows:
# Makefile2.4
KVER = $ (shell uname-r)
KDIR =/lib/modules/$ (KVER)/build
OBJS = mymodule. o
CFLAGS =-d1_kernel _-I $ (KDIR)/include-DMODULE-d1_kernel_syscils _-DEXPORT_SYMTAB-O2-fomit-frame-pointer-Wall-DMODVERSIONS-include $ (KDIR) /include/linux/modversions. h
All: $ (OBJS)
Mymodule. o: mymodule. c
Ld-r-o $ @ $ ^
Clean:
Rm-f *. o
In Red Hat 9, the following problem occurs after make:
No rule to make target 'mymodule. C', needed by mymodule. o
I have just learned how to write the makefile driver. Thank you!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service