Automake简单使用,网上很多的都报错,参考官方文档改了一些,行了
来源:互联网 发布:跟家里阿姨做了知乎 编辑:程序博客网 时间:2024/04/30 06:20
Automake简单使用
这是一个HelloWorld!例子
一.准备三个文件,放在一个文件夹中,如hello
1. main.c //源程序
liuyc@ubuntu:~/Desktop/hello$cat main.c
#include<stdio.h>
void main()
{
printf("HelloWorld!\n");
}
2. Makefile.am //make需要的文件
liuyc@ubuntu:~/Desktop/hello$cat Makefile.am
bin_PROGRAMS= hello
hello_SOURCES= main.c
3. configure.ac //配置文件
liuyc@ubuntu:~/Desktop/hello$cat configure.ac
AC_INIT([hello],[1.0], [bug-automake@gnu.org])
AM_INIT_AUTOMAKE([-Wall-Werror foreign])
AC_PROG_CC
AC_OUTPUT([Makefile
])
二.该目录下执行autoreconf –install
liuyc@ubuntu:~/Desktop/hello$autoreconf --install
configure.ac:3:installing './compile'
configure.ac:2:installing './install-sh'
configure.ac:2:installing './missing'
Makefile.am:installing './depcomp'
三.该目录下执行./configure
checkingfor a BSD-compatible install... /usr/bin/install -c
checkingwhether build environment is sane... yes
checkingfor a thread-safe mkdir -p... /bin/mkdir -p
checkingfor gawk... no
checkingfor mawk... mawk
checkingwhether make sets $(MAKE)... yes
checkingwhether make supports nested variables... yes
checkingfor gcc... gcc
checkingwhether the C compiler works... yes
checkingfor C compiler default output file name... a.out
checkingfor suffix of executables...
checkingwhether we are cross compiling... no
checkingfor suffix of object files... o
checkingwhether we are using the GNU C compiler... yes
checkingwhether gcc accepts -g... yes
checkingfor gcc option to accept ISO C89... none needed
checkingwhether gcc understands -c and -o together... yes
checkingfor style of include used by make... GNU
checkingdependency style of gcc... gcc3
checkingthat generated files are newer than configure... done
configure:creating ./config.status
config.status:creating Makefile
config.status:executing depfiles commands
四.已经生成Makefile.in文件,可以执行make操作
liuyc@ubuntu:~/Desktop/hello$make
gcc-DPACKAGE_NAME=\"hello\" -DPACKAGE_TARNAME=\"hello\"-DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"hello\ 1.0\"-DPACKAGE_BUGREPORT=\"bug-automake@gnu.org\"-DPACKAGE_URL=\"\" -DPACKAGE=\"hello\"-DVERSION=\"1.0\" -I. -g-O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv-f .deps/main.Tpo .deps/main.Po
gcc -g -O2 -o hello main.o
五.执行hello,完成
liuyc@ubuntu:~/Desktop/hello$./hello
HelloWorld!
参考网站:
http://www.gnu.org/software/automake/manual/automake.html#Hello-World
其他:
Ubuntu版本:14.04.1 64位 虚拟机中
Automake版本: 2.69
- Automake简单使用,网上很多的都报错,参考官方文档改了一些,行了
- 一个简单的“ls -al”实现(其实网上已经有很多了)
- 因为网上的面试题很长时间都没更新了,有很多漏洞,所以我想总结一些面试题供大家参考(因为我也即将找工作了哈哈)!第一篇
- 参考网上的一些struts2的action用法,自己写了一个Demo记录一下。
- 今天用httpclient访问jenkins遇到请求被转发到登录页面,看了网上的一些教程也没能解决。后来参考了下官方文档解决了,代码如下
- 安裝roller3.0过程(参考了网上的一些文摘)
- JS打印机切纸,参考了网上其它人的一些内容
- CSDN改版了,改了很多
- android之旅-Intent和BroadcastReceiver(修改了网上文章很多不足,重点参考了android4高级编程)
- 参考:xUtils 包含了很多实用的android工具
- 最近想写一个邮箱自动验证功能,在网上看了很多,写到自己上面出了很多问题,记录下来给后面的人一个参考
- 针对网上很多抱怨的言论,写了一个EF中update对象时,通用的遍历赋值方法,以供参考
- 最近使用jquery比较多,网上搜了很多有用的东西,先记下来!(1.动态添加表格行, 2.下拉框联动)
- 收集了一些常用的API参考文档,放在这里以备及时之需要:
- 一个好网站 提供了很多总结性的文档
- flash 导入相对路径的视频,改了contentPath,在本地行,可是上传到网上就不能显示了??
- SQL2008R2 导出表 成dbf文件,网上很多文档,但是真正能执行生成dbf文件的不多,我整理了一下:
- OpenCV视频检测代码(抄了很多代码,改了很多,算是自己的东西吧)
- Setup Factory 脚本编辑方法
- 设计模式笔记-桥模式
- 自开发程序下载的工具
- 分享一个连接,python扩展包下载地址分享包括numpy,scipy等,解决了win8系统不能使用这些扩展包的问题!
- 王立平--GUI与GUILayout的区别
- Automake简单使用,网上很多的都报错,参考官方文档改了一些,行了
- C语言中的基本数据类型
- Java:Java中引用的原理
- UVALive 6485 Electric Car Rally (BFS,优先队列)
- Android ActionBar完全解析,使用官方推荐的最佳导航栏(上)
- 归并排序的递归和非递归实现方法
- Insert Interval
- 结束,是另一个开始
- Android 自定义View学习(3)--仿IOS风格滑动按钮