Makefile.am, Makefile.in 与 Makefile的关系(转)
文章出处:http://blog.mcuol.com/User/wangguangdong/Article/17384_1.htm
Makefile.am, Makefile.in, Makefile之间关系以及aclocal, automake, autoconf等命令作用的探究
aclocal #产生 aclocal.m4
libtoolize --force
automake --add-missing #根据Makefile.am生成Makefile.in
autoconf #根据configure.in 生成configure
autoheader
为了弄清楚automake等一系列命令的作用,专门搜集并阅读了一些相关资料。并通过下面一个小例子,熟悉了一下这些GNU工具的使用:
例子:在/hello/目录下创建一个hello.c文件,并编译运行它:
#cd /hello/
(1) 编写源文件hello.c:
include
int main(int argc, char** argv)
{
printf("Hello, GNU!n");
return 0;
}
(2) #autoscan
->生成 configure.scan 和 autoscan.log
(3) 将configure.scan 修改为 configure.in:
# Process this file with autoconf to produce a configure script.
AC_INIT(hello.c)
AM_INIT_AUTOMAKE(hello, 1.0)
# Checks for programs.
AC_PROG_CC
# Checks for library functions.
AC_OUTPUT(Makefile)
(4) #aclocal
->生成 aclocal.m4 和 autom4te.cache (生成aclocal.m4的过程中涉及到configure.in)
(5) #autoconf
->生成 configure (根据 configure.in, 和 aclocal.m4)
(6) 编写Makefile.am:
AUTOMAKE_OPTIONS= foreign
bin_PROGRAMS= hello
hello_SOURCES= hello.c
(7) #automake --add-missing
->生成 Makefile.in, depcomp, install-sh, 和 missing (根据 Makefile.am, 和 aclocal.m4)
(8) #./configure
->生成 Makefile, config.log, 和 config.status
Makefile.am, Makefile.in 与 Makefile的关系(转)的更多相关文章
- Linux kernel的 Makefile和Kconfig以及Make menuconfig的关系【转】
本文转载自:http://blog.sina.com.cn/s/blog_4ba5b45e0102e6vp.html 熟悉内核的Makefile对开发设备驱动.理解内核代码结构都是非常重要的linux ...
- Makefile学习与进阶之Makefile.am和$$(M)的意思
(1)makefile 中,出现$$(M) 是什么意思,发现还是看实际的Makefile长知识啊 在makefile中,会经常使用shell命令,也经常见到$var 和 $$var的情况,有什么区别呢 ...
- make 与makefile(会不会写 makefile,从一个侧面说明了一个人是否具备完成大型工程的能力。)
跟我一起写 Makefile /**/ 陈皓 (CSDN) 概述 —— 什么是makefile?或许很多Winodws的程序员都不知道这个东西,因为那些Windows的IDE都为你做了这个工作,但我觉 ...
- make :err Makefile.ssl is older than Makefile.org. Reconfigure the source tree (via './config' or 'perl Configure'), please.
内核编译时出现错误 Makefile.ssl is older than Makefile.org. Reconfigure the source tree (via './config' or 'p ...
- Can't locate Log/Dispatch.pm in @INC /Makefile out-of-date with respect to Makefile.PL
mha check的时候报错问题解决: # masterha_check_ssh --conf=/data/mha/app1.cnf Can't locate Log/Dispatch.pm in ...
- 【linux】-Makefile简要知识+一个通用Makefile
目录 Makefile Makefile规则与示例 为什么需要Makefile Makefile样式 先介绍Makefile的两个函数 完善Makefile 通用Makefile的使用 通用的Make ...
- makefile自动生成目标与依赖的关系
有main.c: #include <stdio.h> #include "command.h" int main(int argc, const char *argv ...
- Linux C编程学习之开发工具3---多文件项目管理、Makefile、一个通用的Makefile
GNU Make简介 大型项目的开发过程中,往往会划分出若干个功能模块,这样可以保证软件的易维护性. 作为项目的组成部分,各个模块不可避免的存在各种联系,如果其中某个模块发生改动,那么其他的模块需要相 ...
- project管理之makefile与自己主动创建makefile文件过程
(风雪之隅 http://www.laruence.com/2009/11/18/1154.html) Linux Makefile自己主动编译和链接使用的环境 想知道到Linux Makefile系 ...
- 代码片段--Makefile之大型工程项目子目录Makefile的一种通用写法
转载:http://blog.csdn.net/mo_hui123456/article/details/8929615 管理Linux环境下的C/C++大型项目,如果有一个智能的Build Syst ...
随机推荐
- 要知道的DbProviderFactory
了解DbProviderFactory 前不久想使用下EF的通用单表增删改的特性,当时使用控制台做测试,怎么弄都没成功,原因出在app.config中,反而在mvc项目中,就没有任何问题.在反复的更改 ...
- Spring中报"Could not resolve placeholder"的解决方案(引入多个properties文件)
除去properites文件路径错误.拼写错误外,出现"Could not resolve placeholder"很有可能是使用了多个PropertyPlaceholderCon ...
- Windows ToolTips简要介绍(转)
原文转自 https://blog.csdn.net/sesiria/article/details/77450151 Windows 标准控件ToolTips简要介绍 参考文档 MSDN https ...
- C/S模式和BS模式是什么?
C/S是Client/Server,即客户端/服务器:B/S是Browser/Server,即浏览器/服务器的意思. C/S (Client/Server)结构,即大家熟知的客户机和服务器结构.它 ...
- iOS_自定义毛玻璃效果
http://www.2cto.com/kf/201408/329969.html 最终效果图: 关键代码: UIImage分类代码 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 1 ...
- malloc,calloc,realloc区别
malloc:memory allocation calloc:The 'c' indicates 'cleared' realloc:The realloc() function changes t ...
- Centos 6.3软件安装
一.软件安装包的类型: 1. tar包,如software-1.2.3-1.tar.gz.它是使用UNIX系统的打包工具tar打包的. 2. rpm包,如software-1.2.3-1.i386.r ...
- 解决:java.lang.ArrayIndexOutOfBoundsException: 160 at com.alibaba.fastjson.serializer.SerializeWriter.writeStringWithDoubleQuote(SerializeWriter.java:868)
今天线上遇到一个问题,从hbase里读取出来的数据在转换json后输出时出现异常: java.lang.ArrayIndexOutOfBoundsException: 160 at com.aliba ...
- python collections(容器)模块
原文:http://docs.pythontab.com/interpy/collections/collections/ 容器(Collections) Python附带一个模块,它包含许多容器数据 ...
- linq中转换类型报错
错误:LINQ to Entities 不识别方法“Int32 ToInt32(System.String)”,因此该方法无法转 上面报错是因为在Linq表达式中无法识别Convert和Parse方法 ...