首页 > 代码库 > makefile

makefile

头文件依赖
http://blog.vjeux.com/category/makefile
http://scottmcpeak.com/autodepend/autodepend.html
http://www.freezhongzi.info/?p=216
依赖解释
http://maskray.me/blog/2011-08-11-generate-dependency-in-makefile

层级makefile
http://blog.csdn.net/hmsiwtv/article/details/20905177

静态库
http://www.cnblogs.com/itech/archive/2009/09/08/1562292.html
动态库
http://www.360doc.com/content/09/0421/19/36491_3216558.shtml

makefile处理
通配符展开
srcs:=$(wildcard *.c)
后缀替换
$(source:.d=.c)
增加前缀
$(source:%=pre%)
增加后缀
$(source:%=%suf)


gcc编译详解
http://www.cnblogs.com/azraelly/archive/2012/07/07/2580839.html
Gcc –E hello.c –o hello.i   预处理,包含头文件,宏展开
Gcc –S hello.i –o hello.s   汇编,生成可阅读的汇编代码
Gcc –c hello.s –o hello.o   生成二进制文件
Gcc hello.o –o hello        生成可执行文件

makefile