Makefile obj-y
时间: 2024-01-05 13:03:31 浏览: 40
In a Makefile, the variable `obj-y` is typically used in the context of building a Linux kernel module. It is used to specify the object files that should be included in the final module. The `obj-y` variable should be assigned a list of object file names (with their relative paths) that are required for the module.
For example, if you have two object files `foo.o` and `bar.o` located in the same directory as the Makefile, you can set the `obj-y` variable like this:
```
obj-y := foo.o bar.o
```
This tells the build system to include `foo.o` and `bar.o` while building the module.
It's important to note that the usage of `obj-y` is specific to the Linux kernel build system and may not be applicable in other contexts.
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)