makefile的用法

1.@放在行首,表示不打印此行。默认在编译的过程中,会把此行的展开效果字符串打印出来。

2.make distclean

https://blog.csdn.net/qdujunjie/article/details/43918285

3.make与make all的区别

all : hello another

hello : hello.cpp

    g++ -o $@ $<

another : another.cpp

    g++ -o $@ $<

直接 make 或 make all 的话会执行 hello.cpp 和 another.cpp 的编译命令

后面不加参数的话,会把第一个目标作为默认的

make hello 的话只编译 hello.cpp

make another 的话只编译 another.cpp

https://blog.csdn.net/electrocrazy/article/details/79348357

https://blog.csdn.net/qing101hua/article/details/53228432

4.Makefile文件

https://www.cnblogs.com/lidabo/p/4521123.html

https://blog.csdn.net/dodonei/article/details/73928827

https://blog.csdn.net/lizhidefengzi/article/details/68960082

http://www.cnblogs.com/coderkian/p/3479564.html

https://www.cnblogs.com/Anker/p/3242207.html

https://www.cnblogs.com/bakoom/p/9697274.html

https://blog.csdn.net/u013774102/article/details/79043559

https://blog.csdn.net/weixin_38391755/article/details/80380786

https://www.cnblogs.com/wang_yb/p/3990952.html

5.$@ $^ %<的使用

https://blog.csdn.net/gmq_syy/article/details/73928782

https://blog.csdn.net/u013774102/article/details/79043559

6.make –C 跳转

https://blog.csdn.net/chinus_yan/article/details/8911049

7.cc –c

https://blog.csdn.net/sunxiaopengsun/article/details/79192192

8.makefile: 如何在.h文件更新之后,相应的.o文件能重新编译

https://blog.csdn.net/u010278579/article/details/52868789

9.all

http://blog.chinaunix.net/uid-28458801-id-3452277.html

https://blog.csdn.net/kooktao/article/details/78112419

10.=,:=区别

11.=取最终值,:=取当前值

https://www.cnblogs.com/wanqieddy/archive/2011/09/21/2184257.html

12.怎么获取makefile文件中定义的变量,或者说编译选项怎么与程序发生联系?

13.伪命令PHONY

https://www.cnblogs.com/hnrainll/archive/2011/04/12/2014082.html

https://www.cnblogs.com/samuelwnb/p/3895191.html

https://blog.csdn.net/gxlzyt123456/article/details/54965408

https://blog.csdn.net/derkampf/article/details/70256891

14.Makefile 与 shell脚本的区别

https://blog.csdn.net/gx19862005/article/details/40375909

https://blog.csdn.net/zengzhihao/article/details/79035319

https://blog.csdn.net/absurd/article/details/636418

15.make –j8 加快编译速度

Guess you like

Origin blog.csdn.net/Ftworld21/article/details/120153796