2014-08-29 186 views
5

我是CDT的新手,我试图自动生成makefile。我注意到它包含三个根本不存在的文件,makefile.init,makefile.defs,makefile.targets。 只是想知道,他们做什么?为什么他们在那里?Eclipse CDT使用makefile.init生成makefile,makefile.defs,makefile.targets

################################################################################ 
# Automatically-generated file. Do not edit! 
################################################################################ 

-include ../makefile.init 

RM := rm -rf 

# All of the sources participating in the build are defined here 
-include sources.mk 
-include subdir.mk 
-include objects.mk 

#Other codes 

-include ../makefile.defs 

# Add inputs and outputs from these tool invocations to the build variables 

#Other codes 

-include ../makefile.targets 

回答

4

这三个包括是为你着想。 如果你需要手动编译一些专有的东西,或者在编译主程序之前复制文件或任何你能想到的东西,你可以在源代码目录下创建文件makefile.init,并将makefile-stuff放在这里。

其他文件中的情况也同样适用于编译链中的其他时间。