1:创建makefile(大小写均可)
touch makefile
2:使用vim打开makefile
vim makefile
3.编写makefile
test:test.c
gcc -o $@ $^
.PHONY:clean
clean:
rm -f test
4:创建依赖文件test.c
touch test.c
5:使用vim打开并且编写test.c
vim test.c
#include<stdio.h>
int main()
{
printf("i like linux");
}
6:在执行街面使用make和make clean指令