makefile

------------------------------------------------------------------------------------------------------------------------------------------------------------------

# : 注释

显示规则:

目标文件:依赖文件
[TAB]指令

例子:
hello:hello.o  (目标文件:依赖文件)
  gcc -c hello.o -o hello (TAB+命令)

目标文件要置于最前面,例如:
run : a + b
a : ---
b : ---
make run

 

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 

 

 

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 

 

 

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------  

上一篇:[MakeFile教程-01] 概述


下一篇:makefile深入