libtool.mk 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #############################################################
  2. #
  3. # libtool
  4. #
  5. #############################################################
  6. LIBTOOL_VERSION = 1.5.24
  7. LIBTOOL_SOURCE = libtool-$(LIBTOOL_VERSION).tar.gz
  8. LIBTOOL_SITE = $(BR2_GNU_MIRROR)/libtool
  9. ifeq ($(BR2_ENABLE_DEBUG),y) # install-exec doesn't install aclocal stuff
  10. LIBTOOL_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
  11. endif
  12. LIBTOOL_DEPENDENCIES = uclibc
  13. $(eval $(call AUTOTARGETS,package,libtool))
  14. # libtool for the host
  15. LIBTOOL_HOST_DIR:=$(BUILD_DIR)/libtool-$(LIBTOOL_VERSION)-host
  16. # variables used by other packages
  17. LIBTOOL:=$(HOST_DIR)/usr/bin/libtool
  18. $(DL_DIR)/$(LIBTOOL_SOURCE):
  19. $(call DOWNLOAD,$(LIBTOOL_SITE),$(LIBTOOL_SOURCE))
  20. $(STAMP_DIR)/host_libtool_unpacked: $(DL_DIR)/$(LIBTOOL_SOURCE)
  21. mkdir -p $(LIBTOOL_HOST_DIR)
  22. $(INFLATE$(suffix $(LIBTOOL_SOURCE))) $< | \
  23. $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LIBTOOL_HOST_DIR) $(TAR_OPTIONS) -
  24. toolchain/patch-kernel.sh $(LIBTOOL_HOST_DIR) package/libtool/ \*.patch
  25. touch $@
  26. $(STAMP_DIR)/host_libtool_configured: $(STAMP_DIR)/host_libtool_unpacked
  27. (cd $(LIBTOOL_HOST_DIR); rm -rf config.cache; \
  28. $(HOST_CONFIGURE_OPTS) \
  29. CFLAGS="$(HOST_CFLAGS)" \
  30. LDFLAGS="$(HOST_LDFLAGS)" \
  31. ./configure \
  32. --prefix="$(HOST_DIR)/usr" \
  33. --sysconfdir="$(HOST_DIR)/etc" \
  34. --disable-static \
  35. )
  36. touch $@
  37. $(STAMP_DIR)/host_libtool_compiled: $(STAMP_DIR)/host_libtool_configured
  38. $(MAKE) -C $(LIBTOOL_HOST_DIR)
  39. touch $@
  40. $(STAMP_DIR)/host_libtool_installed: $(STAMP_DIR)/host_libtool_compiled
  41. $(MAKE) -C $(LIBTOOL_HOST_DIR) install
  42. install -D -m 0644 $(HOST_DIR)/usr/share/aclocal/libtool.m4 \
  43. $(STAGING_DIR)/usr/share/aclocal/libtool.m4
  44. install -D -m 0644 $(HOST_DIR)/usr/share/aclocal/ltdl.m4 \
  45. $(STAGING_DIR)/usr/share/aclocal/ltdl.m4
  46. touch $@
  47. host-libtool: $(STAMP_DIR)/host_libtool_installed
  48. host-libtool-clean:
  49. rm -f $(addprefix $(STAMP_DIR)/host_libtool_,unpacked configured compiled installed)
  50. -$(MAKE) -C $(LIBTOOL_HOST_DIR) uninstall
  51. -$(MAKE) -C $(LIBTOOL_HOST_DIR) clean
  52. host-libtool-dirclean:
  53. rm -rf $(LIBTOOL_HOST_DIR)