簡単なmakefileテンプレートとmakefileチュートリアルリソースの概要


ソースディレクトリの下にmakefile(またはMakefile)という名前のファイルを新規作成します.内容は以下の通りです.
# P=program_name
OBJECTS =
CFLAGS = -g -Wall -O3
CC= cc

$(P): $(OBJECTS)

ターミナルコマンドラインでは、コンパイルmakefileは、次のコマンド(「$」がターミナルプロンプト)を入力するだけです.
$ P=hello make

注意:
  • このテンプレートは、ソースコードが1つのファイルに集中する場合にのみ使用する
  • .
  • 陳皓大牛のMakefile記事
          Makefile( ):[http://blog.csdn.net/haoel/article/details/2886](http://blog.csdn.net/haoel/article/details/2886)  
          Makefile( ):[http://blog.csdn.net/haoel/article/details/2887](http://blog.csdn.net/haoel/article/details/2887)  
          Makefile( ):[http://blog.csdn.net/haoel/article/details/2888](http://blog.csdn.net/haoel/article/details/2888)  
          Makefile( ):[http://blog.csdn.net/haoel/article/details/2889](http://blog.csdn.net/haoel/article/details/2889)  
          Makefile( ):[http://blog.csdn.net/haoel/article/details/2890](http://blog.csdn.net/haoel/article/details/2890)  
          Makefile( ):[http://blog.csdn.net/haoel/article/details/2891](http://blog.csdn.net/haoel/article/details/2891)  
          Makefile( ):[http://blog.csdn.net/haoel/article/details/2892](http://blog.csdn.net/haoel/article/details/2892)  
          Makefile( ):[http://blog.csdn.net/haoel/article/details/2893](http://blog.csdn.net/haoel/article/details/2893)  
          Makefile( ):[http://blog.csdn.net/haoel/article/details/2894](http://blog.csdn.net/haoel/article/details/2894)  
          Makefile( ):[http://blog.csdn.net/haoel/article/details/2895](http://blog.csdn.net/haoel/article/details/2895)  
          Makefile(  ):[http://blog.csdn.net/haoel/article/details/2896](http://blog.csdn.net/haoel/article/details/2896)  
          Makefile(  ):[http://blog.csdn.net/haoel/article/details/2897](http://blog.csdn.net/haoel/article/details/2897)  
          Makefile(  ):[http://blog.csdn.net/haoel/article/details/2898](http://blog.csdn.net/haoel/article/details/2898)  
          Makefile(  ):[http://blog.csdn.net/haoel/article/details/2899](http://blog.csdn.net/haoel/article/details/2899)
    
    makefile変数をデバッグする方法をまとめます.http://coolshell.cn/articles/3790.html
  • GNU make中国語マニュアル:http://www.yayu.org/book/gnu_make/index.html