MYSYS下的automake环境和使用

  1. 准备

下载如下工具或组件:autoconf,automake,m4,libtool,perl,crypt。 下载地址:http://sourceforge.net/projects/mingw/files/MSYS/ 其中autoconf,automake是主要使用工具;m4,libtool是必要工具;perl是支撑工具;crypt是支撑库。libtool和crypt以库的形式下载。

  1. automake组件的功能

  • libtoolize: this copies/links a few support scripts, including ltmain.sh.
  • aclocal: this looks up all m4 macros that your configure script will need make a local copy for easier access.
  • autoheader: if you want to use config.h/AC_CONFIG_HEADERS, otherwise all the test result macros will be inlined when you call the compiler.
  • autoconf: to expand all the macros used by configure.ac into the configure script.
  • automake: to convert all the Makefile.am into Makefile.in templates. You probably want to invoke this with --add-missing so additional support scripts can be linked/copied to your project (such as compile, missing, depcomp, test-driver, etc).
  1. automake使用方法

  • 运行libtoolize命令,产生ltmain.sh文件;
  • 运行autoscan命令,产生configure.scan文件;
  • 将configure.scan 文件重命名为configure.in,并修改configure.in文件;
  • 运行aclocal命令,产生aclocal.m4文件;
  • 运行autoconf命令,产生configure文件;
  • 新建Makefile.am文件,新建NEWS、 README、 ChangeLog 、AUTHORS文件;
  • 修改Makefile.am,并运行automake -a命令;(automake --add-missing)
  • 运行./confiugre脚本。
  • 至此,Makefile已生产,然后执行make编译即可。
其中configure.in的修改,Makefile.am的修改。可参考其他网上资料。
  1. 参考

http://www.ibm.com/developerworks/cn/linux/l-makefile/  (复杂例子)
http://tech.sina.com.cn/s/2004-10-19/1115443045.shtml  (简单例子)      
http://www.cnblogs.com/crazyhack/archive/2011/12/17/2291410.html

转载于:https://my.oschina.net/bygreencn/blog/333095

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值