懒人学习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 下安装苹果系统 (懒人版)
前言 这篇安装教程的素材在国庆就准备好了,但那时学习任务比较重,没有时间发帖,一直拖到现在.趁这个周末有空,赶紧写完它,希望能帮助一些景友. 论坛已经有不少安装教程,如果对这篇安装教程有疑问可以去 ...
随机推荐
- 申请免费ssl证书
#安装certbotyum install epel-releaseyum install certbot#配置nginx,到需要申请证书的配置文件里添加location ^~ /.well-know ...
- PHP 时间获取本周 本月 本季度用法
<?php $week_begin = mktime(0, 0, 0,date("m"),date("d")-date("w&qu ...
- rabbitmq web管理页面无法访问
安装rabbitmq 之后可以通过默认的15672端口访问web界面进行管理,rabbitmq一些默认端口如下: 4369: epmd, a peer discovery service used b ...
- .ner core InvalidOperationException: Cannot find compilation library location for package 'xxx' 和 SqlException: 'OFFSET' 附近有语法错误。 在 FETCH 语句中选项 NEXT 的用法无效。问题
原文地址:传送门 1.InvalidOperationException: Cannot find compilation library location for package 'xxx'问题: ...
- jquery导出Excel表格
1.引用js插件 <script src="tableExport.js"></script> <script src="jquery.ba ...
- 牛客网暑期ACM多校训练营(第一场) - J Different Integers(线段数组or莫队)
链接:https://www.nowcoder.com/acm/contest/139/J来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 524288K,其他语言1048 ...
- 洛谷——P1679 神奇的四次方数
P1679 神奇的四次方数 题目描述 在你的帮助下,v神终于帮同学找到了最合适的大学,接下来就要通知同学了.在班级里负责联络网的是dm同学,于是v神便找到了dm同学,可dm同学正在忙于研究一道有趣的数 ...
- 「JXOI2018」游戏
注意输出的应该是 所有方案的和,,而不是期望. 我们不妨把依赖关系建图,可以发现 所有没有入度的点都被查水表了一次 是 游戏结束的 充要条件. 于是我们只需要知道有多少没有入度的点,然后再排列算一算就 ...
- [ZJb417]区间众数
题目大意: 给定一个长度为$n(1\leq n\leq10^5)$的正整数序列$s(1\leq s_i\leq n)$,对于$m(1\leq m\leq10^)$次询问$l,r$,每次求区间$[s_l ...
- JDBC完整版实现
package songyan.jdbc.test; import java.sql.Connection; import java.sql.DriverManager; import java.sq ...