摘自Linux内核documentation:
2.4构建单独的文件
It is possible to build single files that are part of a module.
This works equally well for the kernel, a module, and even for
external modules.
Example (The module foo.ko, consist of bar.o and baz.o):
make -C $KDIR M=$PWD bar.lst
make -C $KDIR M=$PWD baz.o
make -C $KDIR M=$PWD foo.ko
make -C $KDIR M=$PWD /
我无法理解这些命令的含义 .
make -C $ KDIR M = $ PWD bar.lst
这是不是意味着:找bar.c并将其编译成bar.1st?
make -C $ KDIR M = $ PWD foo.ko
这是不是意味着:寻找所有* .o并将它们链接到foo.ko?它是否也寻找* .1st?
制造-C $ KDIR M = $ PWD /
这是什么意思?
1 回答
这些命令都意味着“做makefile所说的构建命名目标所必需的” . 这样做所涉及的一系列行动是我不能说并且将完全取决于具体目标是什么 .
如果你想知道,具体来说,make会对给定命令做什么,给它
-n
参数 .