iproute2.mk 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ################################################################################
  2. #
  3. # iproute2
  4. #
  5. ################################################################################
  6. IPROUTE2_VERSION = 5.7.0
  7. IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.xz
  8. IPROUTE2_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/net/iproute2
  9. IPROUTE2_DEPENDENCIES = host-bison host-flex host-pkgconf \
  10. $(if $(BR2_PACKAGE_LIBMNL),libmnl)
  11. IPROUTE2_LICENSE = GPL-2.0+
  12. IPROUTE2_LICENSE_FILES = COPYING
  13. ifeq ($(BR2_PACKAGE_ELFUTILS),y)
  14. IPROUTE2_DEPENDENCIES += elfutils
  15. endif
  16. ifeq ($(BR2_PACKAGE_LIBCAP),y)
  17. IPROUTE2_DEPENDENCIES += libcap
  18. endif
  19. ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
  20. IPROUTE2_DEPENDENCIES += libselinux
  21. endif
  22. ifeq ($(BR2_PACKAGE_IPTABLES)x$(BR2_STATIC_LIBS),yx)
  23. IPROUTE2_DEPENDENCIES += iptables
  24. else
  25. define IPROUTE2_DISABLE_IPTABLES
  26. # m_xt.so is built unconditionally
  27. echo "TC_CONFIG_XT:=n" >>$(@D)/config.mk
  28. endef
  29. endif
  30. ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185),y)
  31. IPROUTE2_DEPENDENCIES += berkeleydb
  32. endif
  33. define IPROUTE2_CONFIGURE_CMDS
  34. cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure
  35. $(IPROUTE2_DISABLE_IPTABLES)
  36. endef
  37. define IPROUTE2_BUILD_CMDS
  38. $(TARGET_MAKE_ENV) LDFLAGS="$(TARGET_LDFLAGS)" \
  39. CFLAGS="$(TARGET_CFLAGS) -DXT_LIB_DIR=\\\"/usr/lib/xtables\\\"" \
  40. CBUILD_CFLAGS="$(HOST_CFLAGS)" $(MAKE) V=1 LIBDB_LIBS=-lpthread \
  41. DBM_INCLUDE="$(STAGING_DIR)/usr/include" \
  42. SHARED_LIBS="$(if $(BR2_STATIC_LIBS),n,y)" -C $(@D)
  43. endef
  44. define IPROUTE2_INSTALL_TARGET_CMDS
  45. $(TARGET_MAKE_ENV) DESTDIR="$(TARGET_DIR)" $(MAKE) -C $(@D) install
  46. endef
  47. $(eval $(generic-package))