No.1: autoconf automake
来源:互联网 发布:安卓app 知乎 编辑:程序博客网 时间:2024/06/05 01:08
1. configure.ac
# -*- Autoconf -*-# Process this file with autoconf to produce a configure script.AC_PREREQ([2.68])AC_INIT([zz-test], [1.0], [amao.chj@gmail.com])AC_CONFIG_SRCDIR([src/common_test.c])AC_CONFIG_HEADERS([config.h])AC_CONFIG_AUX_DIR([config])AM_INIT_AUTOMAKE(foreign 1.1 -Wall -Werror)# Checks for programs.AC_PROG_CC# Checks for libraries.#if found, then LIBS="-lpthread $LIBS" and #define HAVE_LIBPTHREAD 1 in config.h#(Automake uses $LIBS for linking everything.)AC_CHECK_LIB([pthread], [pthread_rwlock_init]) # Checks for header files.dnl check for ANSI C headersAC_HEADER_STDCdnl check for other standard c headersAC_CHECK_HEADERS([inttypes.h sys/types.h stdint.h stdlib.h string.h strings.h unistd.h stdio.h stddef.h fcntl.h], [], AC_MSG_ERROR(some system header not found, please check.))# Checks for typedefs, structures, and compiler characteristics.AC_TYPE_SIZE_T# Checks for library functions.AC_FUNC_MALLOC#########################################if we will create libAC_PROG_RANLIBAM_PROG_CC_C_OAM_PROG_AR#AC_PROG_LIBTOOLAC_CONFIG_MACRO_DIR([m4]) AC_CHECK_PROGS([TAR], [tar gtar], [:])if test "$TAR" = :; thenAC_MSG_ERROR([tar is needed in this package.])fi#COMMON_WITH_READLINE#COMMON_VAR_SYS_ERRLIST#COMMON_VAR_SYS_SIGLISTTAR=$(whereis tar)AC_SUBST([TAR])###########################################AM_MAINTAINER_MODE #../configure --enable-maintainer-modeAC_SYS_LARGEFILE # ../configure --enable-largefile########################################AC_CONFIG_FILES([Makefilesrc/Makefilesrc/common/Makefilesrc/container/Makefiletestsuite/Makefiletestsuite/common_test/Makefile])AC_OUTPUT
2. Makefile.am
SUBDIRS = src testsuiteEXTRA_DIST = bootstrap autogen.sh
3. src/Makefile.am
SUBDIRS = common containerbin_PROGRAMS = common_testcommon_test_SOURCES = common/common.h common/xmalloc.h common/xstring.h \ common/xmalloc.c common/xstring.c common_test.c4.
4. src/common/Makefile.am
MAINTAINERCLEANFILES = Makefile.inbin_PROGRAMS = commoncommon_SOURCES = common.h xmalloc.h xmalloc.c xstring.h xstring.c common_test.clib_LIBRARIES = libcommon.alibcommon_a_SOURCES = common.h xmalloc.h xmalloc.c xstring.h xstring.cinclude_HEADERS = common.h xmalloc.h xstring.h###############################################libraries will be installed in $(libdir).##if the lib will not install, then use: noinst_LIBRARIES =##Public headers will be installed in $(includedir)##Private headers are not installed, like ordinary source files.#############################################
5. src/container/Makefile.am
bin_PROGRAMS = icontainericontainer_SOURCES = container.h container.c container_test.cicontainer_CPPFLAGS = -I$(top_srcdir)/src/common
6. testsuite/Makefile.am
SUBDIRS = common_test
7. testsuite/common_test/Makefile.am
MAINTAINERCLEANFILES = Makefile.inbin_PROGRAMS = test1test1_SOURCES = xstring_test1.ctest1_LDADD= $(top_builddir)/src/common/libcommon.atest1_CPPFLAGS = -I$(top_srcdir)/src/common##LDADD = $(top_builddir)/src/common/libcommon.a##AM_CPPFLAGS = -I$(top_srcdir)/src/common##'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')##LDADD = ../../src/common/libcommon.a##INCLUDES = -I../../../src/common
- No.1: autoconf automake
- Automake/Autoconf
- automake & autoconf
- Autoconf/Automake
- autoconf & automake
- automake autoconf
- autoconf & automake
- autoconf & automake
- automake/autoconf
- automake/autoconf入门
- automake/autoconf基本使用
- automake and autoconf
- automake autoconf 解说
- Gnu autoconf 和 automake
- Autoconf/Automake使用备忘
- autoconf/automake 生成 makefile
- autoconf&&automake sample
- Autoconf与Automake
- JavaSE第十五讲:方法参数传递详解
- AIX 平台上基于 IBM JDK 的 Java 应用内存泄漏分析
- linux 下 .sh 文件语法
- linux 命令备忘
- 机房收费系统--各个窗体功能实现的基本要点
- No.1: autoconf automake
- LRU cache implementation in C++
- android开发中代码片段集合 (一)
- poj 1845 Sumdiv
- 用WPF和WinForms实现的几个控件,带Tick的ProgressBar和TrackBar。
- redhat5中文显示乱码的解决方案
- 对于矩阵类型的一些算法的总结(一)
- 机房收费系统--对象图
- Java-乔晓松-JspBean