c - Makefile - 包含库

标签 c module makefile

我正在尝试编写一个使用函数 nanosleep() 的模块。

当我的 make 文件运行时,它会通过以下方式更改构建库: make -C/lib/modules/2.6.18-128.4.1.el5/build M=/workspace/lcd-winstar-0.0.1 modules

nanosleep 在/usr/include 中声明,所以我的 makefile 找不到它。 我应该将哪些行添加到我的 makefile 中以包含此位置?????

谢谢

最佳答案

-I dir
Add the directory dir to the list of directories to be searched for header files. Directories named by -I are searched before the standard system include directories. If the directory dir is a standard system include directory, the option is ignored to ensure that the default search order for system directories and the special treatment of system headers are not defeated .

&&

-Ldir Add directory dir to the list of directories to be searched for -l

关于c - Makefile - 包含库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4479161/

相关文章:

c - 首先为 makefile 创建哪个文件有关系吗?

java - 为什么 Android aosp 中没有构建 JAVA 库?

c - 链接 pthread 库问题

c - 错误 : 'Mystruct' undeclared (first use in this function)

javascript - 需要时 Node 模块未定义

python - 在 Ubuntu Linux 机器上安装 3rd 方 Python 模块?

python - 属性错误 : 'module' object has no attribute 'computation'

c++ - 将 MASM 中制作的库调用为 C 或 C++

c - glob(使用唯一前缀)是否比 readdir 更快?

c - Linux:如何将文件描述符标记为在 fork 上不可继承?