makefile的格式一般为:
target : dependency_files
command //Makefile 中,每个command前面必须要有一个tab符,否则会出错。
例如:有两个文件 hello.c hello.h,则Makefile文件应该这样写:
hello.o : hello.c hello.h
gcc -c hello.c -o hello.o
makefile的格式一般为:
target : dependency_files
command //Makefile 中,每个command前面必须要有一个tab符,否则会出错。
例如:有两个文件 hello.c hello.h,则Makefile文件应该这样写:
hello.o : hello.c hello.h
gcc -c hello.c -o hello.o