b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | # |
| 2 | # Copyright (C) 2008-2015 OpenWrt.org |
| 3 | # |
| 4 | # This is free software, licensed under the GNU General Public License v2. |
| 5 | # See /LICENSE for more information. |
| 6 | # |
| 7 | include $(TOPDIR)/rules.mk |
| 8 | |
| 9 | PKG_NAME:=libtool |
| 10 | PKG_CPE_ID:=cpe:/a:gnu:libtool |
| 11 | PKG_VERSION:=2.4.7 |
| 12 | |
| 13 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 14 | PKG_SOURCE_URL:=@GNU/$(PKG_NAME) |
| 15 | PKG_HASH:=04e96c2404ea70c590c546eba4202a4e12722c640016c12b9b2f1ce3d481e9a8 |
| 16 | |
| 17 | HOST_BUILD_PARALLEL:=1 |
| 18 | |
| 19 | include $(INCLUDE_DIR)/host-build.mk |
| 20 | |
| 21 | export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR) |
| 22 | |
| 23 | HOST_CONFIGURE_VARS += \ |
| 24 | lt_cv_sys_dlsearch_path="" |
| 25 | |
| 26 | define Host/Bootstrap |
| 27 | ( \ |
| 28 | cd $(HOST_BUILD_DIR); \ |
| 29 | $(AM_TOOL_PATHS) \ |
| 30 | ./bootstrap \ |
| 31 | --copy \ |
| 32 | --force \ |
| 33 | --skip-git \ |
| 34 | --skip-po \ |
| 35 | --gnulib-srcdir=$(GNULIB_SRCDIR) \ |
| 36 | ) |
| 37 | endef |
| 38 | |
| 39 | define Host/Prepare |
| 40 | $(call Host/Prepare/Default) |
| 41 | $(call Host/Uninstall) |
| 42 | $(if $(QUILT),,$(call Host/Bootstrap)) |
| 43 | endef |
| 44 | |
| 45 | define Host/Configure |
| 46 | $(if $(QUILT),$(call Host/Bootstrap)) |
| 47 | $(call Host/Configure/Default) |
| 48 | endef |
| 49 | |
| 50 | define Host/Install |
| 51 | $(call Host/Compile/Default,install) |
| 52 | $(SED) 's,\(hardcode_into_libs\)=yes,\1=no,g' $(STAGING_DIR_HOST)/bin/libtool |
| 53 | $(CP) $(STAGING_DIR_HOST)/bin/libtool $(STAGING_DIR_HOST)/bin/libtool-ucxx |
| 54 | $(SED) 's,-lstdc++,-luClibc++,g' $(STAGING_DIR_HOST)/bin/libtool-ucxx |
| 55 | endef |
| 56 | |
| 57 | define Host/Uninstall |
| 58 | -$(call Host/Compile/Default,uninstall) |
| 59 | (cd $(STAGING_DIR_HOST)/share/aclocal/ && rm -f libtool.m4 ltdl.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4) |
| 60 | endef |
| 61 | |
| 62 | $(eval $(call HostBuild)) |