zoukankan      html  css  js  c++  java
  • GNU make manual 翻译(十三)

    继续翻译

       In the example makefile, the targets include the executable file    
    `edit', and the object files `main.o' and `kbd.o'.  The prerequisites    
    are files such as `main.c' and `defs.h'.  In fact, each `.o' file is    
    both a target and a prerequisite.  Recipes include `cc -c main.c' and    
    `cc -c kbd.c'.    
        
       When a target is a file, it needs to be recompiled or relinked if any    
    of its prerequisites change.  In addition, any prerequisites that are    
    themselves automatically generated should be updated first.  In this    
    example, `edit' depends on each of the eight object files; the object    
    file `main.o' depends on the source file `main.c' and on the header    
    file `defs.h'.    

     在此例子makefile中,目的包括 可执行文件 edit, 还有 目标文件 main.o 和 kbd.o。

    前提条件指  mian.c , defs.h 之类的文件。

    实际上,每一个 .o 文件都 既是一个目的,又是一个前提条件。

    片段包括诸如  cc -c main.c 和 cc -c kbd.c

    当一个目的是一个文件,如果任何它的前提条件变化了,此目标就需要被重新编译或者链接。

    而且,那些自己自动生成的 前提条件需要首先被变更。

    在此例子中,edit 依赖于 8个目标文件, 目标文件 main.o 依赖于 源文件 main.c 和头文件 defs.h

    后文待续

  • 相关阅读:
    【18焦作网络赛 J】 大数开方
    最小圆覆盖
    高斯消元
    回文自动机 PAM
    后缀自动机 SAM
    后缀数组 SA
    左偏树(可并堆)
    动态树LCT(Link-Cut-Tree)
    职场自我推销10大金点子
    数据库笔记
  • 原文地址:https://www.cnblogs.com/gaojian/p/2681892.html
Copyright © 2011-2022 走看看