最近的libtool工具可以生成各种库文件.包括静态库与动态库.使用这个即可
示例configure.ac
# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.68]) AC_INIT([librfc], [1.0], [http://www.sourceforge.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) AC_CONFIG_SRCDIR([src/httpuriparser.cpp]) AC_CONFIG_HEADERS([config.h]) # Checks for programs. AC_PROG_CXX LT_INIT # Checks for libraries. # Checks for header files. # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_TYPE_SIZE_T # Checks for library functions. AC_CONFIG_FILES([Makefile]) AC_OUTPUT
示例Makefile.am
AM_CPPFLAGS = --std=c++11 lib_LTLIBRARIES = librfc.la librfc_la_SOURCES = \ ./src/httpuriparser.cpp \ ./src/uri.cpp librfc_la_LDFLAGS = -no-undefined noinst_PROGRAMS = test1 test1_SOURCES = ./test/test1.cpp test1_LDADD = librfc.la pkginclude_HEADERS = \ ./src/httpuriparser.hpp \ ./src/iuriparser.hpp \ ./src/rfc.hpp \ ./src/uri.hpp
这样便可以既可以生成librfc的动态库,也可以生成librfc的静态库
相关推荐
autoconf和automake
ubuntu20.04离线dpkg安装automake
免费下载 automake-1.16.1.tar.xz_FreeDownload.zip 文件后,解压此文件即可得到 automake-1.16.1.tar.xz源文件。
autoconf automake 轻松入门
automake 是linux下的自动生成makefile的工具。需要配合auroconf使用 版本:automake-1.9.6.tar.tar
GNU官方的Automake教程,国内的Automake教程大多过时并且抽象,官方教程从零开始,可帮助初学者快速了解Automake的基础知识,熟练驾驭开源项目的automake
automake和autoconf英文手册,automake和autoconf英文手册
automake的一个完整例子。 研究automake的例子。当然也包括autoconf。
AutoMake使用总结,如何使用AutoMake!
automake 1.11版本 automake 1.11版本 automake 1.11版本
轻松学automake.pdf—— automake及开源项目软件工程中文基础教程,很实用!
依次执行命令:aclocal,libtoolize -f -c,autoconf,automake --add-missing,./configure,make。 3、cd */project/swap 依次执行命令:aclocal,autoconf,automake --add-missing,./configure,make。 4、cd *...
automake-1.11.3.tar.xz
automake 可以生成两个执行程序:main 和main2 一个automake生成多个执行程序
如何使用automake,如何通过automake构建一个源代码工程
GNU automake documentation file
automake 工具链使用, 有利于makefile的生成
automake-1.9.5-mingwPORT
automake 中文用户手册 GNU Automake For version 1.3, 3 April 1998
使用AutoMake轻松生成Makefile