Makefile
VPATH=src:include
all:project
.PHONY:all
project:main.o fun1.o fun2.o
gcc main.o fun1.o fun2.o -o project -g
main.o:main.c
gcc -c -Iinclude -o $@ $^ -g
fun1.o:fun1.c
gcc -c -Iinclude -o $@ $^ -g
fun2.o:fun2.c
gcc -c -Iinclude -o $@ $^ -g
tar:
tar cvf project.tar src include Makefile
.PHONY:clean
clean:
rm *.o project
报错啊!tab健有输
转载于:https://blog.51cto.com/4458708/802494