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 ...
随机推荐
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.Exec
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.> com.android.build.api.tr ...
- Scala学习随笔——Scala起步
实验楼学习Scala语言的笔记,课程网址为https://www.shiyanlou.com/courses/490 一.Scala简介 Scala 是一门多范式的编程语言,类似于 Java .设计初 ...
- kubernetes 搭建集群内服务
nginx-rc.yaml apiVersion: v1 kind: ReplicationController metadata: name: webapp spec: replicas: 2 te ...
- SQL Server分页语句ROW_NUMBER,读取第4页数据,每页10条
SQL Server分页语句ROW_NUMBER,读取第4页数据,每页10条 SELECT Id,[Title],[Content],[Image] FROM ( SELECT ROW_NUMBER( ...
- Python开发【项目】:FTP程序
作业:开发一个支持多用户在线的FTP程序 要求: 用户加密认证 允许同时多用户登录 每个用户有自己的家目录 ,且只能访问自己的家目录 对用户进行磁盘配额,每个用户的可用空间不同 允许用户在ftp se ...
- WCF 小程序案例以及序列化的使用
using System;using System.Collections.Generic;using System.Linq;using System.Runtime.Serialization;u ...
- mysql 取消命令行继续编辑
mysql> create database mingongge defa\c#回车 置空mysql> 加一个\c cancel 编辑命令 回车
- KMP CF126B Password
Description Asterix,Obelix和他们的临时伙伴Suffix.Prefix已经最终找到了和谐寺.然而和谐寺大门紧闭,就连Obelix的运气也没好到能打开它. 不久他们发现了一个字符 ...
- x-pack-crack
破解x-pack-----------1. 编辑文件:LicenseVerifier.javapackage org.elasticsearch.license;import java.nio.*;i ...
- CocoaPods安装使用及配置私有库及注意点
如何安装? 1.安装ruby环境,添加淘宝ruby镜像 $ gem sources --remove https://rubygems.org///等有反应之后再敲入以下命令$ gem sources ...