openwrt默认会有autoconf、automake,但是没有autoconf-archive。
在编译外置包时可能需要使用autoconf-archive,以下是添加autoconf-archive步骤。
修改tools/Makefile
修改tools/Makfile添加autoconf-archive编译路径
- tools-$(BUILD_TOOLCHAIN) += gmp mpfr mpc libelf expat
- – tools-y += m4 libtool autoconf automake flex bison pkg-config mklibs zlib
- + tools-y += m4 libtool autoconf autoconf-archive automake flex bison pkg-config mklibs zlib
- tools-y += sstrip make-ext4fs e2fsprogs mtd-utils mkimage
- tools-y += firmware-utils patch-image quilt padjffs2
- tools-y += mm-macros missing-macros cmake scons bc findutils gengetopt patchelf
- tools-y += mtools dosfstools libressl
- tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2
- tools-$(CONFIG_TARGET_x86) += qemu
- tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
- tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs
- tools-$(CONFIG_USES_MINOR) += kernel2minor
- tools-y += lzma squashfs4
- tools-$(BUILD_B43_TOOLS) += b43-tools
- tools-$(BUILD_ISL) += isl
- tools-$(CONFIG_USE_SPARSE) += sparse
- tools-$(CONFIG_TARGET_apm821xx) += genext2fs
- # builddir dependencies
- $(curdir)/bison/compile := $(curdir)/flex/compile
- $(curdir)/flex/compile := $(curdir)/libtool/compile
- $(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile
- $(curdir)/squashfs/compile := $(curdir)/lzma-old/compile
- $(curdir)/squashfs4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile
- $(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compile
- $(curdir)/autoconf/compile := $(curdir)/m4/compile
- + $(curdir)/autoconf-archive/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile
- $(curdir)/automake/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/pkg-config/compile $(curdir)/xz/compile
添加autoconf-archive软件包
进入tools目录创建autoconf-archive文件夹,进入autoconf-archive创建Makefile
- cd tools
- mkdir autoconf-archive
- cd autoconf-archive
- touch Makefile
Makefile内容如下
- #
- # Copyright (C) 2006-2015 OpenWrt.org
- #
- # This is free software, licensed under the GNU General Public License v2.
- # See /LICENSE for more information.
- #
- include $(TOPDIR)/rules.mk
- PKG_NAME:=autoconf-archive
- PKG_VERSION:=2013.11.01
- PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
- PKG_SOURCE_URL:=@GNU/autoconf-archive
- PKG_MD5SUM:=f01381c7d3570cf3fcf65093989e0d29
- include $(INCLUDE_DIR)/host-build.mk
- HOST_CONFIGURE_ARGS += \
- –datarootdir=$(STAGING_DIR_HOST)/share
- define Host/Compile
- export SHELL=“$(BASH)”; $(MAKE) -C $(HOST_BUILD_DIR)
- endef
- define Host/Install
- export SHELL=“$(BASH)”; $(MAKE) -C $(HOST_BUILD_DIR) install
- endef
- define Host/Clean
- -export SHELL=“$(BASH)”; $(MAKE) -C $(HOST_BUILD_DIR) uninstall
- $(call Host/Clean/Default)
- endef
- $(eval $(call HostBuild))
编译
make tools/autoconf-archive/{clean,compile} V=s