try it, then you know it____________just do it , as love easily fade.

一次只有一个目标,步子迈小些,抑制一次实现所有功能的冲动。 过程如何结果就如何,行动是欢喜的,不管是兴奋还是沮丧的情绪都对结果无益。贵在持之以恒

导航

make_tutorial and from last artical cygwin

  • 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. 

posted on 2013-02-08 22:31  吾一  阅读(201)  评论(0编辑  收藏  举报