每次都要敲击冗长的编译命令,每次都要清理之前的编译中间结果和最终结果,在安装软件时复制剪切大量的动态库,在卸载软件时删除很多的动态库和配置文件。好吧,我被逼向了makefile。
helloworld.o : helloworld.c
all:
@echo "make all:"
gcc -o helloworld.o helloworld.c
clean:
@echo "make clean:"
rm *.o
install:
@echo "make install:"
@echo " copy file to the install fold!"
uninstall:
@echo "uninstall"
doall: all clean install
试试make doall。
$ make doall
make all:
gcc -o helloworld.o helloworld.c
make clean:
rm *.o
make install:
copy file to the install fold!