Makefile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. endef
  46. ifeq ($(CONFIG_BUILD_NLS),y)
  47. TARGET_LDFLAGS += -lintl
  48. else
  49. CONFIGURE_ARGS += --disable-nls
  50. endif
  51. HOST_CONFIGURE_ARGS += \
  52. --disable-shared \
  53. --disable-nls \
  54. --disable-debuginfod \
  55. --disable-libdebuginfod \
  56. --without-bzlib \
  57. --without-lzma \
  58. --without-zstd
  59. CONFIGURE_ARGS += \
  60. --program-prefix=eu- \
  61. --disable-debuginfod \
  62. --disable-libdebuginfod \
  63. --without-bzlib \
  64. --without-lzma \
  65. --without-zstd
  66. HOST_CONFIGURE_VARS += \
  67. ac_cv_search__obstack_free=yes
  68. CONFIGURE_VARS += \
  69. ac_cv_search__obstack_free=yes
  70. TARGET_CFLAGS += \
  71. -D_GNU_SOURCE \
  72. -Wno-unused-result \
  73. -Wno-format-nonliteral \
  74. -Wno-error=use-after-free
  75. define Build/InstallDev
  76. $(INSTALL_DIR) $(1)/usr/include
  77. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  78. $(INSTALL_DIR) $(1)/usr/lib
  79. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.{a,so*} $(1)/usr/lib/
  80. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.{a,so*} $(1)/usr/lib/
  81. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.{a,so*} $(1)/usr/lib/
  82. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  83. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libelf.pc $(1)/usr/lib/pkgconfig/
  84. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdw.pc $(1)/usr/lib/pkgconfig/
  85. endef
  86. define Package/libasm/install
  87. $(INSTALL_DIR) $(1)/usr/lib
  88. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm{-*.so,*.so.*} $(1)/usr/lib/
  89. endef
  90. define Package/libdw/install
  91. $(INSTALL_DIR) $(1)/usr/lib
  92. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw{-*.so,*.so.*} $(1)/usr/lib/
  93. endef
  94. define Package/libelf/install
  95. $(INSTALL_DIR) $(1)/usr/lib
  96. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf{-*.so,*.so.*} $(1)/usr/lib/
  97. endef
  98. # these lines need to be ordered by dependency because of ABI versioning
  99. $(eval $(call BuildPackage,libelf))
  100. $(eval $(call BuildPackage,libdw))
  101. $(eval $(call BuildPackage,libasm))