微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > Linux下C编程基础之:实验内容

Linux下C编程基础之:实验内容

时间:08-13 来源:3721RD 点击:

res, and compiler characteristics.

# Checks for library functions.

AC_OUTPUT(makefile)

(5)保存退出,并重命名为configure.in。

(6)运行:aclocal。

(7)运行:autoconf,并用ls查看是否生成了configure可执行文件。

(8)运行:autoheader。

(9)用vi编辑makefile.am文件为:

AUTOMAKE_OPTIONS=foreign

bin_PROGRAMS=hello

hello_SOURCES=hello.c hello.h

(10)运行:automake,然后运行automake –a。

(11)运行:./configure。

(12)运行:make。

(13)运行:./hello,查看结果是否正确。

(14)运行:make install。

(15)运行:hello,查看结果是否正确。

(16)运行:make dist。

(17)在当前目录下解压hello-1.0.tar.gz:tar –zxvf hello-1.0.tar.gz。

(18)进入解压目录:cd ./hello-1.0。

(19)下面开始Linux下常见的安装软件步骤:./configure。

(20)运行:make。

(21)运行:./hello(在正常安装时这一步可省略)。

(22)运行:make install。

(23)运行:hello,查看结果是否正确。

4.实验结果

能够正确使用autotools生成makefile,并且能够成功安装短小的hello软件。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top