Makefile 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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.177
  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:=fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e
  14. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  15. PKG_LICENSE:=GPL-3.0+
  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:=0
  21. PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL: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. --without-lzma
  55. TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral
  56. define Build/InstallDev
  57. $(INSTALL_DIR) $(1)/usr/include
  58. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  59. $(INSTALL_DIR) $(1)/usr/lib
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.{a,so*} $(1)/usr/lib/
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.{a,so*} $(1)/usr/lib/
  62. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.{a,so*} $(1)/usr/lib/
  63. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libelf.pc $(1)/usr/lib/pkgconfig/
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdw.pc $(1)/usr/lib/pkgconfig/
  66. endef
  67. define Package/libasm/install
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm{-*.so,*.so.*} $(1)/usr/lib/
  70. endef
  71. define Package/libdw/install
  72. $(INSTALL_DIR) $(1)/usr/lib
  73. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw{-*.so,*.so.*} $(1)/usr/lib/
  74. endef
  75. define Package/libelf/install
  76. $(INSTALL_DIR) $(1)/usr/lib
  77. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf{-*.so,*.so.*} $(1)/usr/lib/
  78. endef
  79. $(eval $(call BuildPackage,libasm))
  80. $(eval $(call BuildPackage,libdw))
  81. $(eval $(call BuildPackage,libelf))