Makefile包含 目标文件、依赖文件、可运行命令三部分。
每部分的基本格式例如以下:
test: prog.o code.o
gcc -o test prog.o code.o
当中,第一行的test是目标文件。 prog.o、code.o是依赖文件;
第二行的gcc -o test prog.o code.o是可运行命令。
整个Makefile文件都是这样的格式。
参考链接:
https://blog.csdn.net/haoel/article/details/2886
Makefile 伪目标:
https://www.cnblogs.com/hnrainll/archive/2011/04/12/2014082.html
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有