1
0

Makefile 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #
  2. # Copyright (C) 2010-2014 OpenWrt.org
  3. # Copyright (C) 2016 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.168
  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:=b88d07893ba1373c7dd69a7855974706d05377766568a7d9002706d5de72c276
  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_INSTALL:=1
  19. PKG_USE_MIPS16:=0
  20. PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. define Package/elfutils/Default
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=ELF manipulation libraries
  27. URL:=https://fedorahosted.org/elfutils/
  28. endef
  29. define Package/libasm
  30. $(call Package/elfutils/Default)
  31. TITLE+= (libasm)
  32. DEPENDS:=libelf1 +libdw
  33. endef
  34. define Package/libdw
  35. $(call Package/elfutils/Default)
  36. DEPENDS:=libelf1 +libbz2
  37. TITLE+= (libdw)
  38. endef
  39. define Package/libelf1
  40. $(call Package/elfutils/Default)
  41. DEPENDS:=$(INTL_DEPENDS) +zlib
  42. TITLE+= (libelf)
  43. endef
  44. ifeq ($(CONFIG_BUILD_NLS),y)
  45. TARGET_LDFLAGS += "-lintl"
  46. endif
  47. ifdef CONFIG_USE_UCLIBC
  48. CONFIGURE_VARS += \
  49. LIBS="-largp"
  50. endif
  51. ifdef CONFIG_USE_MUSL
  52. CONFIGURE_VARS += \
  53. LIBS="-largp"
  54. endif
  55. CONFIGURE_ARGS += \
  56. --without-lzma
  57. TARGET_CFLAGS += -D_GNU_SOURCE
  58. define Build/InstallDev
  59. $(INSTALL_DIR) $(1)/usr/include
  60. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  61. $(INSTALL_DIR) $(1)/usr/lib
  62. $(CP) $(PKG_BUILD_DIR)/libasm/libasm.{a,so*} $(1)/usr/lib/
  63. $(CP) $(PKG_BUILD_DIR)/libdw/libdw.{a,so*} $(1)/usr/lib/
  64. $(CP) $(PKG_BUILD_DIR)/libelf/libelf.{a,so*} $(1)/usr/lib/
  65. endef
  66. define Package/libasm/install
  67. $(INSTALL_DIR) $(1)/usr/lib
  68. $(CP) $(PKG_BUILD_DIR)/libasm/libasm.so* $(1)/usr/lib/
  69. endef
  70. define Package/libdw/install
  71. $(INSTALL_DIR) $(1)/usr/lib
  72. $(CP) $(PKG_BUILD_DIR)/libdw/libdw.so* $(1)/usr/lib/
  73. endef
  74. define Package/libelf1/install
  75. $(INSTALL_DIR) $(1)/usr/lib
  76. $(CP) $(PKG_BUILD_DIR)/libelf/libelf.so* $(1)/usr/lib/
  77. endef
  78. $(eval $(call BuildPackage,libasm))
  79. $(eval $(call BuildPackage,libdw))
  80. $(eval $(call BuildPackage,libelf1))