Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #
  2. # Copyright (C) 2010-2019 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. PKG_NAME:=elfutils
  9. PKG_VERSION:=0.182
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
  13. PKG_HASH:=ecc406914edf335f0b7fc084ebe6c460c4d6d5175bfdd6688c1c78d9146b8858
  14. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <[email protected]>
  15. PKG_LICENSE:=GPL-3.0-or-later
  16. PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
  17. PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_USE_MIPS16:=1
  21. PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/nls.mk
  24. define Package/elfutils/Default
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. TITLE:=ELF manipulation libraries
  28. URL:=https://fedorahosted.org/elfutils/
  29. ABI_VERSION:=1
  30. endef
  31. define Package/libasm
  32. $(call Package/elfutils/Default)
  33. TITLE+= (libasm)
  34. DEPENDS:=+libelf +libdw
  35. endef
  36. define Package/libdw
  37. $(call Package/elfutils/Default)
  38. DEPENDS:=+libelf +libbz2
  39. TITLE+= (libdw)
  40. endef
  41. define Package/libelf
  42. $(call Package/elfutils/Default)
  43. DEPENDS:=$(INTL_DEPENDS) +zlib
  44. TITLE+= (libelf)
  45. PROVIDES:=libelf1
  46. endef
  47. ifeq ($(CONFIG_BUILD_NLS),y)
  48. TARGET_LDFLAGS += -lintl
  49. else
  50. CONFIGURE_ARGS += --disable-nls
  51. endif
  52. CONFIGURE_ARGS += \
  53. --program-prefix=eu- \
  54. --disable-debuginfod \
  55. --disable-libdebuginfod \
  56. --without-lzma \
  57. --without-zstd
  58. TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral
  59. define Build/InstallDev
  60. $(INSTALL_DIR) $(1)/usr/include
  61. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.{a,so*} $(1)/usr/lib/
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.{a,so*} $(1)/usr/lib/
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.{a,so*} $(1)/usr/lib/
  66. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libelf.pc $(1)/usr/lib/pkgconfig/
  68. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdw.pc $(1)/usr/lib/pkgconfig/
  69. endef
  70. define Package/libasm/install
  71. $(INSTALL_DIR) $(1)/usr/lib
  72. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm{-*.so,*.so.*} $(1)/usr/lib/
  73. endef
  74. define Package/libdw/install
  75. $(INSTALL_DIR) $(1)/usr/lib
  76. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw{-*.so,*.so.*} $(1)/usr/lib/
  77. endef
  78. define Package/libelf/install
  79. $(INSTALL_DIR) $(1)/usr/lib
  80. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf{-*.so,*.so.*} $(1)/usr/lib/
  81. endef
  82. # these lines need to be ordered by dependency because of ABI versioning
  83. $(eval $(call BuildPackage,libelf))
  84. $(eval $(call BuildPackage,libdw))
  85. $(eval $(call BuildPackage,libasm))