【转】android makefile文件分析

Makefile的规则如下:

target ... : prerequisites ...

command ... ...

target可以是一个目标文件,也可以是Object File(例如helloworld.obj),也可以是执行文件和标签。

prerequisites就是生成target所需要的文件或是目标。

command也就是要达到target这个目标所需要执行的命令。

 

下面就是编译helloworld的makefile。

helloworld : helloworld.o

    cc -o helloworld helloworld .o

helloworld.o : helloworld.c

    cc -c main.c

clean:

    rm helloworld helloworl.o

转自:http://blog.csdn.net/chief1985/article/details/4705123

posted on 2013-08-22 22:45  meizixiong  阅读(132)  评论(0编辑  收藏  举报