您的位置:首页 > 运维架构 > Linux

Linux——makefile

2016-04-02 18:58 344 查看
1.vim Makefile 或 vim makefile

2.

targetName:a.o b.o #targetFileName:A.c B.c ,split with a space

  gcc #gcc command,startwith a '\t'

a.o:a.c depency.h

  gcc ...

clean:  # execute the following command when run "make clean" in CLI

  rm ...

3.定义宏()变量

VARNAME= VALUE

调用${VARNAME}

4.内置宏(略解释)

$^ 、 $@ 、 $< 、$+ 、$? 、$*

5.执行make targetName,在当前目录下找Makefile或makefile且第一个target为targetName的文件执行
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: