您的位置:首页 > 运维架构 > Linux

Linux Makefile编译使用的环境从helloworld入手

2015-08-11 15:15 686 查看
1、以root用户登录,执行下面的操作。

2、如果你的Linux系统中没有autotools,可以在这个地址下载autotools:
http://m.blog.csdn.net/blog/hhko12322/21335503
要安装autotools需要如下几个文件:automake、autoconf、M4。

这三个文件的安装顺序是:1、M4 ;2、autoconf ;3、automake。

以安装m4为例,演示安装步骤:

###安装m4

wget http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz \

&& tar -xzvf m4-1.4.13.tar.gz \

&& cd m4-1.4.13 \

&& ./configure --prefix=/usr/local //./configure是预编译你的源码文件 --prefix=/usr/local 是指定文件安 //装目录

make && make install
//make 编译,make clean安装

3、上面的步骤完了后,可以按这个例子练手。例子对应的链接:

Linux Makefile编译使用的环境从helloworld入手
http://os.51cto.com/art/201002/185318.htm
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: