您好,欢迎光临本网站![请登录][注册会员]  
文件名称: 跟我一起写Makefile.pdf
  所属分类: C
  开发工具:
  文件大小: 964kb
  下载次数: 0
  上传时间: 2012-09-20
  提 供 者: mljl****
 详细说明: 第一部分、概述............................................................................................................................... 6 第二部分、关于程序的编译和链接...............................................................................................6 第三部分、Makefile 介绍............................................................................................................7 一、Makefile的规则..............................................................................................................7 二、一个示例........................ ...................................................................................................8 三、make是如何工作的........................................................................................................9 四、makefile中使用变量....................................................................................................10 五、让make自动推导.......................................................................................................... 11 六、另类风格的makefile....................................................................................................12 七、清空目标文件的规则.....................................................................................................13 第四部分、Makefile 总述..........................................................................................................13 一、Makefile里有什么?....................................................................................................13 1、显式规则。..............................................................................................................14 2、隐晦规则。..............................................................................................................14 3、变量的定义。..........................................................................................................14 4、文件指示。..............................................................................................................14 5、注释。......................................................................................................................14 二、Makefile的文件名........................................................................................................15 三、引用其它的Makefile....................................................................................................15 四、环境变量 MAKEFILES................................................................................................16 五、make的工作方式..........................................................................................................16 第五部分、书写规则.....................................................................................................................17 一、规则举例.........................................................................................................................17 二、规则的语法.....................................................................................................................17 三、在规则中使用通配符.....................................................................................................18 四、文件搜寻.........................................................................................................................19 五、伪目标.............................................................................................................................20 六、多目标.............................................................................................................................22 七、静态模式.........................................................................................................................22 八、自动生成依赖性.............................................................................................................24 第六部分 书写命令 .......................................................................................................................25 一、显示命令.........................................................................................................................26 二、命令执行.........................................................................................................................26 三、命令出错.........................................................................................................................27 四、嵌套执行make..............................................................................................................28 五、定义命令包.....................................................................................................................30 第七部分 使用变量 .......................................................................................................................30 一、变量的基础.....................................................................................................................31 二、变量中的变量.................................................................................................................32 三、变量高级用法.................................................................................................................34 四、追加变量值.....................................................................................................................37 五、override 指示符..........................................................................................................37 六、多行变量.........................................................................................................................38 七、环境变量.........................................................................................................................38 八、目标变量.........................................................................................................................39 九、模式变量.........................................................................................................................40 第八部分 使用条件判断 ...............................................................................................................40 一、示例............................................................................................................................... ..40 二、语法............................................................................................................................... ..42 第九部分 使用函数 .......................................................................................................................43 一、函数的调用语法.............................................................................................................44 二、字符串处理函数.............................................................................................................44 1、subst .......................................................................................................................44 2、patsubst.................................................................................................................45 3、strip.........................................................................................................................45 4、findstring ...............................................................................................................46 5、filter .........................................................................................................................46 6、filter-out .................................................................................................................46 7、sort ..........................................................................................................................47 8、word........................................................................................................................47 9、wordlist ..................................................................................................................47 10、words ....................................................................................................................47 11、firstword ..............................................................................................................48 12、字符串函数实例....................................................................................................48 三、文件名操作函数.............................................................................................................48 1、dir.............................................................................................................................48 2、notdir ......................................................................................................................48 3、suffix .......................................................................................................................49 4、basename..............................................................................................................49 5、addsuffix ................................................................................................................49 6、addprefix ...............................................................................................................49 7、join ...........................................................................................................................50 四、foreach 函数................................................................................................................50 五、if 函数............................................................................................................................50 六、call 函数..........................................................................................................................51 七、origin 函数.....................................................................................................................51 “undefined” .................................................................................................................52 “default” .......................................................................................................................52 “file” ............................................................................................................................... 52 “command line” .........................................................................................................52 “override”....................................................................................................................52 “automatic” .................................................................................................................52 八、shell函数.......................................................................................................................53 九、控制make的函数..........................................................................................................53 1、error ........................................................................................................................53 2、warning ..................................................................................................................54 第十部分 make 的运行..............................................................................................................54 一、make的退出码..............................................................................................................54 二、指定Makefile................................................................................................................54 三、指定目标.........................................................................................................................55 “all”............................................................................................................................... .56 “clean” ..........................................................................................................................56 “install” .........................................................................................................................56 “print” ...........................................................................................................................56 “tar” ............................................................................................................................... 56 “dist” ..............................................................................................................................56 “TAGS” ..........................................................................................................................56 “check” 和“test” ..........................................................................................................56 四、检查规则.........................................................................................................................57 五、make的参数..................................................................................................................57 第十一部分 隐含规则...................................................................................................................61 一、使用隐含规则.................................................................................................................61 二、隐含规则一览.................................................................................................................62 1、编译C程序的隐含规则...........................................................................................63 2、编译C++程序的隐含规则.....................................................................................63 3、编译Pascal程序的隐含规则..................................................................................63 4、编译Fortran/Ratfor程序的隐含规则..................................................................63 5、预处理Fortran/Ratfor程序的隐含规则..............................................................63 6、编译Modula-2 程序的隐含规则...........................................................................63 7、汇编和汇编预处理的隐含规则..............................................................................64 8、链接Object文件的隐含规则.................................................................................64 9、Yacc C程序时的隐含规则.....................................................................................64 10、Lex C 程序时的隐含规则.....................................................................................64 11、Lex Ratfor程序时的隐含规则 ...........................................................................65 12、从C程序、Yacc文件或Lex 文件创建Lint 库的隐含规则..................................65 三、隐含规则使用的变量.....................................................................................................65 1、关于命令的变量。..................................................................................................65 2、关于命令参数的变量..............................................................................................66 四、隐含规则链.....................................................................................................................67 五、定义模式规则.................................................................................................................68 1、模式规则介绍..........................................................................................................68 2、模式规则示例..........................................................................................................69 3、自动化变量..............................................................................................................70 4、模式的匹配..............................................................................................................72 5、重载内建隐含规则..................................................................................................72 六、老式风格的"后缀规则" .................................................................................................73 七、隐含规则搜索算法.........................................................................................................74 第十二部分 使用make更新函数库文件....................................................................................75 一、函数库文件的成员.........................................................................................................75 二、函数库成员的隐含规则.................................................................................................75 三、函数库文件的后缀规则.................................................................................................76 四、注意事项.........................................................................................................................76 第十三部分 后序...........................................................................................................................77 ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: Makefile 陈皓
 输入关键字,在本站1000多万海量源码库中尽情搜索: