懒人学习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 下安装苹果系统 (懒人版)
前言 这篇安装教程的素材在国庆就准备好了,但那时学习任务比较重,没有时间发帖,一直拖到现在.趁这个周末有空,赶紧写完它,希望能帮助一些景友. 论坛已经有不少安装教程,如果对这篇安装教程有疑问可以去 ...
随机推荐
- 积木大赛(NOIP2013)(纯贪心+模拟)
好吧,这道题也是..醉了. 其实题目编程挺水的,但是贪心过程不好想. 原题传送门 这道题对于任何一个点a[i]如果a[i]<a[i-1]的话,那么假设a[i-1]的高度为X,a[i]的高度为y, ...
- LINK : fatal error LNK1104: 无法打开文件“mfc71.lib”(转)
原文转自 http://blog.csdn.net/mxclxp/article/details/8196142 [环境] Windows XP OS: Visual Studio 2008: ...
- authencated认证登录
#coding:utf-8 import tornado.httpserver import tornado.ioloop import tornado.options import tornado. ...
- Linux SPI总线和设备驱动架构之一:系统概述【转】
转自:http://blog.csdn.net/droidphone/article/details/23367051/ 版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?)[-] 硬 ...
- Python 如何调用 Java
引用了这个文章,请打开链接 http://www.cnblogs.com/junrong624/p/5278457.html 日后待补写 ...
- Python编程学习笔记 随时更新
import urllib.request import re url = 'http://stock.sohu.com/news/' html = urllib.request.urlopen(ur ...
- Appium+python自动化12-appium元素定位【转载】
前言 appium定位app上的元素,可以通过id,name.class这些属性定位到 一.id定位 1.appium的id属性也就是通过UI Automator工具查看的resource-id属性
- Mex函数与C++数据矩阵交互方法
#include "mex.h" #include <iostream> #include <windows.h> #include "math. ...
- Qt如何学习(参考官方文档)
Designers who are familiar with web development can start with QML 一共有四种安装工具 You have following opti ...
- jsp笔记2(编译指令与动作指令)
一.jsp的编译指令是通知jsp引擎的消息,不会生成输出. jsp的3个编译指令: page:针对当前页面的指令 include:包含另一个页面的指令 taglib:用于定义和访问自定义标签 ...