Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #
  2. # Copyright (C) 2010-2014 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.165
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/$(PKG_NAME)/$(PKG_VERSION)
  13. PKG_MD5SUM:=c37fdbe18e848002b451562cba964679
  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_INSTALL:=1
  18. PKG_USE_MIPS16:=0
  19. PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. define Package/elfutils/Default
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=ELF manipulation libraries
  26. URL:=https://fedorahosted.org/elfutils/
  27. endef
  28. define Package/libasm
  29. $(call Package/elfutils/Default)
  30. TITLE+= (libasm)
  31. DEPENDS:=libelf1
  32. endef
  33. define Package/libdw
  34. $(call Package/elfutils/Default)
  35. DEPENDS:=libelf1 +libbz2
  36. TITLE+= (libdw)
  37. endef
  38. define Package/libelf1
  39. $(call Package/elfutils/Default)
  40. DEPENDS:=$(INTL_DEPENDS) +zlib
  41. TITLE+= (libelf)
  42. endef
  43. ifeq ($(CONFIG_BUILD_NLS),y)
  44. TARGET_LDFLAGS += "-lintl"
  45. endif
  46. ifdef CONFIG_USE_UCLIBC
  47. CONFIGURE_VARS += \
  48. LIBS="-largp"
  49. endif
  50. ifdef CONFIG_USE_MUSL
  51. CONFIGURE_VARS += \
  52. LIBS="-largp"
  53. endif
  54. CONFIGURE_ARGS += \
  55. --without-lzma
  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_BUILD_DIR)/libasm/libasm.{a,so*} $(1)/usr/lib/
  61. $(CP) $(PKG_BUILD_DIR)/libdw/libdw.{a,so*} $(1)/usr/lib/
  62. $(CP) $(PKG_BUILD_DIR)/libelf/libelf.{a,so*} $(1)/usr/lib/
  63. endef
  64. define Package/libasm/install
  65. $(INSTALL_DIR) $(1)/usr/lib
  66. $(CP) $(PKG_BUILD_DIR)/libasm/libasm.so* $(1)/usr/lib/
  67. endef
  68. define Package/libdw/install
  69. $(INSTALL_DIR) $(1)/usr/lib
  70. $(CP) $(PKG_BUILD_DIR)/libdw/libdw.so* $(1)/usr/lib/
  71. endef
  72. define Package/libelf1/install
  73. $(INSTALL_DIR) $(1)/usr/lib
  74. $(CP) $(PKG_BUILD_DIR)/libelf/libelf.so* $(1)/usr/lib/
  75. endef
  76. $(eval $(call BuildPackage,libasm))
  77. $(eval $(call BuildPackage,libdw))
  78. $(eval $(call BuildPackage,libelf1))