GNU build system automake autoconf等快速入门
来源:互联网 发布:电影评论数据集下载 编辑:程序博客网 时间:2024/05/21 10:47
1、通过autoscan生成configure.scan, 然后改名成configure.in
2、编辑configure.in
3、编辑Makefile.am
4、运行下列命令,可以写入到bootstrap脚本中
touch NEWS README AUTHORS ChangeLog COPYING
aclocal
autoheader
libtoolize --automake #如果是共享库,则必须需要
automake -a
autoconf
5、configure.in编写规则
1)最基本的configure.in的编写规则
AC_INIT(src/main.cpp)
AM_INIT_AUTOMAKE(hello, 0.1)
AC_PROG_CXX
AC_PROG_RANLIB
AC_PROG_LIBTOOL # 共享库必须需要
AC_OUTPUT(Makefile src/Makefile src/sub/Makefile)
6、Makefile.am编写规则
- 1)根目录(configure.ac所在的目录)必须有一个Makefile.am
- 2)所有有需要编译的代码文件的目录下必须有一个Makefile.am
- 3)如果一个目录中有Makefile.am,那么必须在它的父目录中的Makefile.am里用SUBDIRS指定它
- 4)exe(可执行)程序的Makefile.am
bin_PROGRAMS = main
main_SOURCES = main.cpp
SUBDIRS = sub
LDADD = sub/lib.a
- 5)lib程序的Makefile.am
noinst_LIBRARIES = libfoo.a
libfoo_a_SOURCES = a.cpp a.h
- 6)共享库的Makefile.am
lib_LIBRARIES = libfoo.la
libfoo_la_SOURCES = …..
- GNU build system automake autoconf等快速入门
- GNU automake/autoconf 入门
- The GNU build system体验教程:Hello world example with Autoconf and Automake
- Gnu autoconf 和 automake
- automake/autoconf入门
- automake/autoconf入门
- automake/autoconf 入门
- 使用GNU Autoconf/Automake创建Makefile
- 使用GNU Autoconf/Automake创建Makefile
- GNU Build System
- GNU build system
- GNU Build System
- GNU build system
- The GNU Build System
- [BuildRelease]Mozilla Build Tools - Autoconf + GNU Make
- gnu build tools(automake ...) 指导
- 读GNU Autoconf, Automake, and Libtool后感
- GNU hello学习笔记(1)——autoconf和automake
- 系统消息数量的增加及减少!
- 反调试技术
- vmware安装linux Enterprise 5
- 微软机器人平台
- Jquery UI tabs
- GNU build system automake autoconf等快速入门
- yacc细节
- [转帖] 多个经典英语学习网站
- 2009 ACM/ICPC 武汉赛区G题解题报告(状态压缩 dp )
- VB.Net的类型字符
- jQuery框架获取及设置单选框、多选框、文本框内容
- 29-Dec-2009
- 内存字节对齐
- 成功的 Web 应用系统性能测试