自动生成makefile简略

1、自己需要准备的文件有:makefile.am

    //makefile,am怎样编写,请参考本博客的其他文章或者访问该链接http://blog.ossxp.com/2010/04/954/

2、自己需要用的工具有:autoscan、aclocal、autoconf、autoheader、automake

3、步骤如下:

   (1)autoscan生成configure.scan

   (2)将configure.scan重命名为configure.in;

            修改AC_INIT(。。。)修改为AC_INIT(hello,1.0);//hello是自己起的名字,1.0是版本号

            在AC_INIT的下一行新增加一行的内容为AM_INIT_AUTOMAKE(hello,1.0)

  (3)aclocal生成aclocal.m4

  (4)autoconf生成configure

  (5)autoheader生成config.in.h

  (6)automake利用makefile.am生成makefile.in

          //注意,在此步骤中可能会出现很多问题,按照提示一步一步解决

  (7)./configure生成makefile

  (8)make //编译链接

   (9)make install //安装

你可能感兴趣的:(工具,makefile,2010)