第7节 GNU AUTO TOOLS
推荐给好友
打印
加入收藏
更新于2008-05-15 19:31:41

7.1 编号
Module 5

7.2 目的
了解automake, autoconfig 的用法

7.3 实验描述
 7.3.1 最简单的automake, autoconfig
  7.3.1.1 实验编号
LAB1_MD6_1
 7.3.1.2 步骤
在实验之前,请确认LAB1_MD5_3 中的makefile已经被check in . 并建立文件hello_autotool.c,实现打印hello world功能。

1.    vim  Makefile.am
bin_PROGRAMS = hello_autotool
hello_autotool_SOURCES = hello_autotool.c

2. vim  configure.in
AC_INIT(hello_autotool.c)
AM_INIT_AUTOMAKE(hello_autotool, 0.1)
AC_PROG_CC
AC_OUTPUT(Makefile)

3. aclocal
autoconf
automake -a --foreign
./configure

6.    make
./hello_autotool.exe
7.3.1.3 验证
./hello_autotool
7.3.1.4 实验报告
cvs add makefile.am
cvs ci makefile.am
cvs add configure.in
cvs ci configure.in

cvs tag  LAB1_MD6_1  makefile.am configure.in


  7.3.2  多文件的automake, autoconfig
  7.3.2.1 实验编号
LAB1_MD6_2
  7.3.2.2 步骤
在LAB1_MD4_3和LAB1_MD6_1   的基础上, 完成多文件系统的添加
提示:
1.    hello_SOURCES = hello1.c hello2.c hello3.c hello.c
2.    ./configure
3.    make

  7.3.2.3 验证
./hello.exe 应该打印出3行文字

   7.3.2.4 实验报告
cvs ci makefile.am
cvs tag  LAB1_MD6_2  makefile.am

 

<<上一节            下一节>> 




 
关于我们 | 诚邀加盟 | 客户服务 | 相关法律 | 网站地图 | 友情链接 | 服务信箱:service@eefocus.com
© 2006 与非门科技信息咨询(北京)有限公司 All Rights Reserved.