automake
总结: automake 用于产生GNC下标准的makefile文件。
整体流程与步骤如下图所示;
对于使用者需要修改的文件有两个
- configure.ac
参数说明
-*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT(hello, 1.0,[email])
AM_INIT_AUTOMAKE(hello, 1.0)
AC_CONFIG_SRCDIR([hello.c]) #用于检测源码目录的有效性,任选一个源码文件即可
AC_CONFIG_HEADERS([config.h]) #用于生成config.h文件,以便autoheader使用
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
#LT_INIT #编译libtool必须添加的两行,这里直接编译成so,故不需要
#AC_PROG_LIBTOOL
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([Makefile ]) #需要生成的所有Makefile
AC_OUTPUT
- makefile.am
参数说明
AUTOMAKE_OPTIONS= foreign
bin_PROGRAMS= hello
hello_SOURCES= hello.c


浙公网安备 33010602011771号