Eclipse CDT使用makefile.init,makefile.defs,makefile.targets生成makefile

时间:2014-08-29 19:48:40

标签: eclipse-cdt

我是CDT的新手,我正在尝试自动生成makefile。我注意到它包含三个根本不存在的文件,makefile.init,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

1 个答案:

答案 0 :(得分:6)

这三个包含是为了您的目的。 如果你需要手动编译专有的东西,或者在编译主程序之前复制文件或任何你可以想出的东西,你可以在源目录中创建文件makefile.init并将你的makefile-stuff放在这里。

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