Describes other makefile rules, such as using wildcard characters in commands, and writing commands and dependencies on the same line, and using line breaks. See Example test006, in addition to makefile file is not the same, test006 and test005 other files are the same.
#执行方式:
#make-F Test006.mk
#################################################################
#说明:
#1. Introduction of other Makefile rules
#################################################################
#不能把 OBJ changed to *.O
OBJ = MATH.O MAIN.O
To separate from the middle by [;] #命令与依赖关系在同一行
Test.exe: $ (obj); cc-o test.exe $ (obj)
MATH.O:MATH.H Common.h
#[/] is the meaning of a newline character, makefile has no limit on how many characters are on the same line
Main.o:main.h MATH.H/
Common.h
#用 phony show that clean is a pseudo target
. Phony:clean
Clean
#在命令中使用通配符
-RM Test.exe *.O
Please download this example from http://u.115.com/file/f47a68b727