由于在Win环境下编程常常没有用到Makefile,每次在Linux环境下写Makefile时都得上网参考参考,这里记录一下基本的模板以便使用。
任务名:前提条件
步骤
x1# zhang @ 202002082# Makefile template3#4all: main test56main: main.cpp student.cpp7 g++ -o main main.cpp student.cpp89test: student.cpp student_test.cpp10 g++ -o test student.cpp student_test.cpp11 12clean:13 rm -rf *.o main testmake -f 指定Makefile的名字。
@rm -rf *.o main test@符号起执行时不输出信息的作用。
→back
Contact me
Please contact me about any suggestion(s): aliceb0b@hotmail.com.