首页 > 其他 > 详细

My first makefile to compile multiple C files

时间:2016-10-10 23:53:49      阅读:370      评论:0      收藏:0      [点我收藏+]

I have three files to compile: main.c, func.c,  func.h

The steps:

           1   main.c   to   main.o

           2   func.c    to   func.o

           3    link main.o func.o to main(file that can execute)

So, u need to run at least three commands without a Makefile.Then if u have 100 files to compile, how to do?

If u have a Makefile, u just need to type one word ‘make‘.

EASY

技术分享

 

技术分享

 

技术分享

 

And I writed a Makefile:

技术分享

 

test:

技术分享

My first makefile to compile multiple C files

原文:http://www.cnblogs.com/rixiang/p/5947510.html

(1)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!