【发布时间】:2022-04-07 01:16:10
【问题描述】:
错误:*** No rule to make target 'Home' Stop
我是如何编写 Makefile 的:
obj-m += hello-1.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
【问题讨论】:
-
我在提供的 Makefile 中看不到任何内容,这可能会导致有关
Home目标的错误。你在命令行中输入什么命令来编译模块? -
终端中的命令'make'
-
请在问题后添加更多输出部分。也就是说,错误消息之前的一些行和它之后的行。
-
请澄清您的具体问题或提供其他详细信息以准确突出您的需求。正如目前所写的那样,很难准确地说出你在问什么。
-
我尝试在 linux 版本 5.11.0-38 上通过命令 'make' 运行和编译 Makefile,但文件未执行时遇到问题。有问题的截图 - i.imgur.com/OjknU5k.png 或
make make -C /lib/modules/5.11.0-38-generic/build M=/home/ash/MyProjects/OS Home Assignment/HA3/Code/Test modules make[1]: Entering directory '/usr/src/linux-headers-5.11.0-38-generic' make[1]: *** No rule to make target 'Home'. Stop. make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-38-generic' make: *** [Makefile:4: all] Error 2
标签: kernel-module