懒人学习automake, Makefile.am,configure.ac
已经存在Makefile.am,如何生成Makefile?
步骤:
- [root@localhost hello]# autoscan .///在当前文件夹中搜索
- [root@localhost hello]# cp configure.scan configure.ac //复制文件
- [root@localhost hello]# vi configure.ac //编辑文件
- 编辑configure.ac,加入下面一行:
- AM_INIT_AUTOMAKE(hello,1.0) //automake所必备的宏,必须添加
- [root@localhost hello]# aclocal //执行aclocal生成aclocal.m4文件
- [root@localhost hello]# autoconf //执行autoconf生成configure文件
- [root@localhost hello]# autoheader
- [root@localhost hello]# automake --add-missing
- [root@localhost hello]# touch NEWS; touch README; touch AUTHORS; touch ChangeLog //创建NEWS等文件,如果没有自动生成,手工创建
- [root@localhost hello]# automake --add-missing //再运行一次
- [root@localhost hello]# ./configure //配置,生成Makefile文件
- [root@localhost hello]# make //执行make命令
以上过程可能出现一些警告,请忽略。最后,给出一个Makefile.am的内容作为例子:
- AM_LDFLAGS = -lpthread -lc -lm -lrt -ldl
- CXXFLAGS = -D__STDC_LIMIT_MACROS -g -Wall -DORDER_SERIALIZE #-O2 -fno-strict-aliasing
- bin_PROGRAMS = parser_main
- parser_main_SOURCES = parser_main.cpp \
- Parser.cpp \
- Lexer.cpp \
- SelectStmt.cpp \
- InsertStmt.cpp \
- UpdateStmt.cpp \
- DeleteStmt.cpp \
- Stmt.cpp \
- Expr.cpp \
- Identifier.cpp
- ~
参考文献:
http://os.51cto.com/art/201006/207098.htm
http://os.51cto.com/art/201006/207099.htm
http://os.51cto.com/art/201006/207101.htm
懒人学习automake, Makefile.am,configure.ac的更多相关文章
- 懒人学习automake, Makefile.am,configure.ac(转)
已经存在Makefile.am,如何生成Makefile? 步骤: [root@localhost hello]# autoscan .///在当前文件夹中搜索 [root@localhost hel ...
- automake中Makefile.am和configure.ac的格式及编译过程
step1:写Makefile.am step2:执行autoscan,会生成configurae.scan,修改configure.scan内容之后,命名为configure.ac step3:执行 ...
- configure.ac和Makefile.am的格式解析概述
1. configure.ac和Makefile.am的格式解析概述 1.1. Autotools相关工具链 1.1.1. Autotools 1.1.2. 其他相关工具 1.2. 工具链的流程 1. ...
- C# 嵌入dll 动软代码生成器基础使用 系统缓存全解析 .NET开发中的事务处理大比拼 C#之数据类型学习 【基于EF Core的Code First模式的DotNetCore快速开发框架】完成对DB First代码生成的支持 基于EF Core的Code First模式的DotNetCore快速开发框架 【懒人有道】在asp.net core中实现程序集注入
C# 嵌入dll 在很多时候我们在生成C#exe文件时,如果在工程里调用了dll文件时,那么如果不加以处理的话在生成的exe文件运行时需要连同这个dll一起转移,相比于一个单独干净的exe,这种形 ...
- 如何根据configure.ac和Makefile.am为开源代码产生当前平台的Makefile
1 2 3 4 5 6 7 8 9 //根据configure.in和Makefile.am生成makefile的步骤,基于UBUNTU 12.04 1.autoscan (可选) 2.aclocal ...
- 关于Makefile,Makefile.in,Makefile.am,Configure功能及相互关系的问题
makefile写法 在 Unix 上写程式的人大概都碰过 Makefile,尤其是用 C 来开发程式的人.用 make来开发和编译程式的确很方便,可是要写出一个 Makefile就不简单了.偏偏介绍 ...
- 编写configure.ac
configure.ac由一些宏组成(如果已经有源代码,你可以运行autoscan来产生一个configure.scan文件,在此基础修改成configure.ac将更加方便) 最基本的组成可以是下面 ...
- 源码编译Redis Desktop Manager | 懒人屋
原文:源码编译Redis Desktop Manager | 懒人屋 源码编译Redis Desktop Manager 2.3k 字 10 分钟 2019-10-10 文章背景 本 ...
- 【转】[教程]在 win7 / win8 下安装苹果系统 (懒人版)
前言 这篇安装教程的素材在国庆就准备好了,但那时学习任务比较重,没有时间发帖,一直拖到现在.趁这个周末有空,赶紧写完它,希望能帮助一些景友. 论坛已经有不少安装教程,如果对这篇安装教程有疑问可以去 ...
随机推荐
- 浅谈:nodejs在cmd提示不是内部或外部命令
今天用cmd安装个库,结果发现node不是内部命令,检查后发现上次重装nodejs换了个安装位置,path环境变量忘改了. 找到变量值中node的安装地址,比如C:develop\nodejs,如果不 ...
- php file_get_contents函数分段读取大记事本或其它文本文件
当我们遇到文本文件体积很大时,比如超过几十M甚至几百M几G的大文件,用记事本或者其它编辑器打开往往不能成功,因为他们都需要把文件内容全部放到内存里面,这时就会发生内存溢出而打开错误,遇到这种情况我们可 ...
- jQuery元素节点的插入
jquery插入节点的的方法,总的来说有8种,但是只要学会了其中的两个就能理解全部了, 这里我们学习append()和appendTo()两个方法: append()方法是向元素的内部追加内容: &l ...
- libevent reference Mannual I
FYI:http://www.wangafu.net/~nickm/libevent-book/ This lib is a integral of asynchronous IO. we shoul ...
- 洛谷——P1475 控制公司 Controlling Companies
P1475 控制公司 Controlling Companies 题目描述 有些公司是其他公司的部分拥有者,因为他们获得了其他公司发行的股票的一部分.(此处略去一句废话)据说,如果至少满足了以下三个条 ...
- CUDA 动态编译(NVRTC)简记
在linux上用sublime text 3上写完CUDA代码和c++代码后,想用code::blocks去一并编译,就像visual studio那样一键编译运行,但发现在code::blocks上 ...
- application对象的使用
application对象的使用 制作人:全心全意 application对象用于保存所有应用程序中的公有数据.它在服务器启动时自动创建,在服务器停止时销毁.当application对象没有被销毁时, ...
- vue v-model 的注意点
在使用表单元素 input 的 v-model 指令时,碰到一个问题: 如上图,修改 input 的内容,以便随时显示:但显示时明显慢一步. <template> <div> ...
- react-router v4 学习实践
最近学习了 react-router v4,根据官方 API 文档和网上资源做了一个简单的路由示例. 先用官方的工具 create-react-app 初始化一个 react 项目模板,再根据自己的 ...
- buf.write()
buf.write(string[, offset[, length]][, encoding]) string {String} 需要被写入到 Buffer 的字节 offset {Number} ...