- make tutorial
http://mrbook.org/tutorials/make/
If you have several makefiles, then you can execute them with the command:
make -f MyMakefile
- compile related artical ,include make
http://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html
2. GNU Make
The "make
" utility automates the mundane aspects of building executable from source code. "make
" uses a so-called makefile
, which contains rules on how to build the executables.
You can issue "make --help
" to list the command-line options; or "man make
" to display the man pages.
Let's begin with a simple example to build the Hello-world program (hello.c
) into executable (hello.exe
) via make utility.
create the following file named"makefile"(without file extension)(//can be performed in notepad++);and save in the same source folder;use Tab to indent the command(not space)(//ok)
all: hello.exe hello.exe: hello.o gcc -o hello.exe hello.o hello.o: hello.c gcc -c hello.c clean: rm hello.o hello.exe
The Mingw work in my computer,to use make command:
copy the ****make.exe and change the name to make.exe.