Makefile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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.192
  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. https://mirrors.kernel.org/sourceware/$(PKG_NAME)/$(PKG_VERSION)
  14. PKG_HASH:=616099beae24aba11f9b63d86ca6cc8d566d968b802391334c91df54eab416b4
  15. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <[email protected]>
  16. PKG_LICENSE:=GPL-2.0-or-later OR LGPL-3.0-or-later
  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_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 +USE_MUSL:musl-fts
  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. HOST_CONFIGURE_ARGS += \
  53. --disable-shared \
  54. --disable-nls \
  55. --disable-debuginfod \
  56. --disable-libdebuginfod \
  57. --without-bzlib \
  58. --without-lzma \
  59. --without-zstd
  60. CONFIGURE_ARGS += \
  61. --program-prefix=eu- \
  62. --disable-debuginfod \
  63. --disable-libdebuginfod \
  64. --without-bzlib \
  65. --without-lzma \
  66. --without-zstd
  67. HOST_CONFIGURE_VARS += \
  68. ac_cv_search__obstack_free=yes
  69. CONFIGURE_VARS += \
  70. ac_cv_search__obstack_free=yes
  71. TARGET_CFLAGS += \
  72. -D_GNU_SOURCE \
  73. -Wno-unused-result \
  74. -Wno-format-nonliteral \
  75. -Wno-error=use-after-free
  76. define Build/InstallDev
  77. $(INSTALL_DIR) $(1)/usr/include
  78. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  79. $(INSTALL_DIR) $(1)/usr/lib
  80. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.{a,so*} $(1)/usr/lib/
  81. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.{a,so*} $(1)/usr/lib/
  82. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.{a,so*} $(1)/usr/lib/
  83. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  84. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libelf.pc $(1)/usr/lib/pkgconfig/
  85. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdw.pc $(1)/usr/lib/pkgconfig/
  86. endef
  87. define Package/libasm/install
  88. $(INSTALL_DIR) $(1)/usr/lib
  89. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm{-*.so,*.so.*} $(1)/usr/lib/
  90. endef
  91. define Package/libdw/install
  92. $(INSTALL_DIR) $(1)/usr/lib
  93. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw{-*.so,*.so.*} $(1)/usr/lib/
  94. endef
  95. define Package/libelf/install
  96. $(INSTALL_DIR) $(1)/usr/lib
  97. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf{-*.so,*.so.*} $(1)/usr/lib/
  98. endef
  99. # these lines need to be ordered by dependency because of ABI versioning
  100. $(eval $(call BuildPackage,libelf))
  101. $(eval $(call BuildPackage,libdw))
  102. $(eval $(call BuildPackage,libasm))