一。
建立工程:
建立文件夹helloworld helloworld /src
建立文件 helloworld /src/helloworld .c
二。
执行:autoscan
mv configure.scan configure.in
修改:
AM_INIT_AUTOMAKE(helloworld, 0.1)
修改:
helloworld_SOURCES=helloworld.c
四。
命令:
touch NEWS README ChangeLog AUTHORS
[root@linux helloworld]# cp -f /usr/share/automake-1.7/depcomp .
[root@linux helloworld]# cp -f /usr/share/automake-1.7/compile .
aclocal
autoheader
autoconf
automake -a
./configure
make
至此,helloworld目录下及helloworld/src下有Makefile
纵观整个过程:
1.改configure.scan 名为configure.in,
2.在configure.in中改过三个地方,
3.建立过两个Makefile.am,
4.复制过两个文件到当前目录,
5.其余的全是命令了
本文详细介绍了如何通过自动化工具设置并构建一个简单的HelloWorld项目。包括创建项目结构、配置自动化构建脚本、以及使用一系列自动化工具如autotools来生成Makefile等内容。
981

被折叠的 条评论
为什么被折叠?



