Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #
  2. # Copyright (C) 2010-2014 OpenWrt.org
  3. # Copyright (C) 2016-2017 Luiz Angelo Daros de Luca <luizluca@gmail.com>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=elfutils
  10. PKG_VERSION:=0.174
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
  14. PKG_HASH:=cdf27e70076e10a29539d89e367101d516bc4aa11b0d7777fe52139e3fcad08a
  15. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  16. PKG_LICENSE:=GPL-3.0+
  17. PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
  18. PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
  19. PKG_FIXUP:=autoreconf
  20. PKG_INSTALL:=1
  21. PKG_USE_MIPS16:=0
  22. PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
  23. include $(INCLUDE_DIR)/package.mk
  24. include $(INCLUDE_DIR)/nls.mk
  25. define Package/elfutils/Default
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. TITLE:=ELF manipulation libraries
  29. URL:=https://fedorahosted.org/elfutils/
  30. endef
  31. define Package/libasm
  32. $(call Package/elfutils/Default)
  33. TITLE+= (libasm)
  34. DEPENDS:=libelf1 +libdw
  35. endef
  36. define Package/libdw
  37. $(call Package/elfutils/Default)
  38. DEPENDS:=libelf1 +libbz2
  39. TITLE+= (libdw)
  40. endef
  41. define Package/libelf1
  42. $(call Package/elfutils/Default)
  43. DEPENDS:=$(INTL_DEPENDS) +zlib
  44. TITLE+= (libelf)
  45. endef
  46. ifeq ($(CONFIG_BUILD_NLS),y)
  47. TARGET_LDFLAGS += "-lintl"
  48. endif
  49. CONFIGURE_ARGS += \
  50. --program-prefix=eu- \
  51. --disable-nls \
  52. --without-lzma
  53. TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral
  54. define Build/InstallDev
  55. $(INSTALL_DIR) $(1)/usr/include
  56. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.{a,so*} $(1)/usr/lib/
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.{a,so*} $(1)/usr/lib/
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.{a,so*} $(1)/usr/lib/
  61. endef
  62. define Package/libasm/install
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.so* $(1)/usr/lib/
  65. endef
  66. define Package/libdw/install
  67. $(INSTALL_DIR) $(1)/usr/lib
  68. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.so* $(1)/usr/lib/
  69. endef
  70. define Package/libelf1/install
  71. $(INSTALL_DIR) $(1)/usr/lib
  72. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.so* $(1)/usr/lib/
  73. endef
  74. $(eval $(call BuildPackage,libasm))
  75. $(eval $(call BuildPackage,libdw))
  76. $(eval $(call BuildPackage,libelf1))