My first makefile to compile multiple C files

Posted NONE

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了My first makefile to compile multiple C files相关的知识,希望对你有一定的参考价值。

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的主要内容,如果未能解决你的问题,请参考以下文章

My First Blog - How to choose a handy Markdown writing tool

#My First Blog Diary : a jouney on cnblogs to be a real coder

原理图“my-comp”无法解析工厂

Makefile 结合了 fltk 和 C++ 文件

在foreach循环中调用导出

服务器找不到 java:comp/env/jdbc/my_db 数据源...在上下文“java:”中找不到名称 comp/env/jdbc