首页 > 编程知识 正文

auto clicker怎么用,autoitlibrary 教程

时间:2023-05-06 11:21:03 阅读:49355 作者:4778

cmake和autoconf automake使用案例

目录

一.个人资料

二.样品流程如下

1、源文件

2、通过autscan命令生成configure.scan文件,并修改为configure.ac

3、运行aclocal,生成aclocal.m4配置文件

4、运行autoconf,生成配置文件

5、运行自动头生成config.h.in

6、创建Makefile.am文件

7、根据具体情况,创建常用文档文件news自述文件更改日志

8、Makefile.am发生Makefile.in

9、运行./configure生成Makefile

三.总结

制作流程:

生成makefile的过程:

综合征

%BF%87%E7%A8%8B%E7%9A%84automake%E7%89%88%E6%9C%AC%EF%BC%8C%E4%B8%8E%E6%9C%80%E7%BB%88%E4%BD%BF%E7%94%A8%E7%94%A8%E6%88%B7%E7%89%88%E6%9C%AC%E4%B8%8D%E4%B8%80%E8%87%B4%E7%9A%84%E9%97%AE%E9%A2%98-toc" style="margin-left:40px;">注意:通过autoreconf命令,来解决由于制作过程的automake版本,与最终使用用户版本不一致的问题


一、简介

在Linux下,编译某个程序,使用Makefile, 但对于Makefile来讲,有一定的语法;同时编译过程,也对外部环境有一定的依赖,如需要依赖某些特定的库才能编译通过。

Autoconf 及Automake 这两个软件是帮助程序开发者轻松产生 Makefile,同时在配置过程中,提示用户来安装缺失的环境。

 

二、示例过程如下

 

1、源文件

hello.c

#include <stdio.h>extern int test(void);int main(void){printf("In %s, Hello World.n", __FILE__);test();return 0;}

 

test.c

 

#include <stdio.h>int test(){printf("In test FUNC.....n");return 0;}

 

2、通过autscan命令,产生 configure.scan文件,修改为configure.ac root@wangxinyu-PC:/home/wangxinyu/work/temp/test_automake# autoscan root@wangxinyu-PC:/home/wangxinyu/work/temp/test_automake# lsautoscan.log configure.scan hello.c test.croot@wangxinyu-PC:/home/wangxinyu/work/temp/test_automake# mv configure.scan configure.acroot@wangxinyu-PC:/home/wangxinyu/work/temp/test_automake# cat configure.ac # -*- Autoconf -*-# Process this file with autoconf to produce a configure script.AC_PREREQ([2.69])AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])AM_INIT_AUTOMAKE(tt, 0.0) # Add , automakeAC_CONFIG_SRCDIR([hello.c])AC_CONFIG_HEADERS([config.h])# Checks for programs.AC_PROG_CC# Checks for libraries.# Checks for header files.# Checks for typedefs, structures, and compiler characteristics.# Checks for library functions.AC_CONFIG_FILES([Makefile]) # Add, Create MakefileAC_OUTPUTroot@wangxinyu-PC:/home/wangxinyu/work/temp/test_automake#

 

3、执行aclocal,产生aclocal.m4 配置文件 root@wangxinyu-PC:/home/wangxinyu/work/temp/test_automake# aclocal

 

4、执行autoconf, 产生configure文件 root@wangxinyu-PC:/home/wangxinyu/work/temp/test_automake# autoconf

 

5、执行autoheader 产生config.h.in root@wangxinyu-PC:/home/wangxinyu/work/temp/test_automake# autoheader

 

6、创建Makefile.am文件 root@wangxinyu-PC:/home/wangxinyu/work/temp/test_automake# vi Makefile.am 1 AUTOMAKE_OPTION=foreign 2 ygdbm_PROGRAMS=tt 3 tt_SOURCES=hello.c test.c

 

 

7、根据情况,创建一些常用的文档文件NEWS README AUTHORS ChangeLog touch NEWS README AUTHORS ChangeLog

 

8、根据Makefile.am产生Makefile.in automake --add-missing

 

9、执行./configure 生成Makefile ./configure makeroot@wangxinyu-PC:/home/wangxinyu/work/temp/test_automake# make installmake[1]: Entering directory '/home/wangxinyu/work/temp/test_automake' /usr/ygdbm/mkdir -p '/usr/local/ygdbm' /usr/ygdbm/install -c tt '/usr/local/ygdbm'make[1]: Nothing to be done for 'install-data-am'.make[1]: Leaving directory '/home/wangxinyu/work/temp/test_automake'root@wangxinyu-PC:/home/wangxinyu/work/temp/test_automake# ttIn hello.c, Hello World.In test FUNC.....

 

三、总结 制作过程:

 

生成Makefile过程:

 

综合

 

注意:通过autoreconf命令,来解决由于制作过程的automake版本,与最终使用用户版本不一致的问题 autoreconf --force --install ./configure xxxx xxx xxx xxx(配置参数)

 

 

 

 

 

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。