aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/elfutils/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-06-14 17:43:40 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-06-14 17:43:40 +0000
commitb98fb7664639a814f3dba309eaf38b62be137bb8 (patch)
treeb475c55359ccce71152e3c81c6e72174c1c137f9 /package/libs/elfutils/Makefile
parentb7b855f9ebab26effce3af440d011fbe856df52b (diff)
downloadupstream-b98fb7664639a814f3dba309eaf38b62be137bb8.tar.gz
upstream-b98fb7664639a814f3dba309eaf38b62be137bb8.tar.bz2
upstream-b98fb7664639a814f3dba309eaf38b62be137bb8.zip
elfutils: import package from packages.git
elfutils is required by perf. So we'll move this package from packages.git and make it part of the core distribution. Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> SVN-Revision: 45969
Diffstat (limited to 'package/libs/elfutils/Makefile')
-rw-r--r--package/libs/elfutils/Makefile97
1 files changed, 97 insertions, 0 deletions
diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
new file mode 100644
index 0000000000..d3e1552c6a
--- /dev/null
+++ b/package/libs/elfutils/Makefile
@@ -0,0 +1,97 @@
+#
+# Copyright (C) 2010-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=elfutils
+PKG_VERSION:=0.161
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/$(PKG_NAME)/$(PKG_VERSION)
+PKG_MD5SUM:=e1b9847c9a6a1ad340de8d47a863ec52
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
+
+PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
+
+PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/elfutils/Default
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=$(INTL_DEPENDS)
+ TITLE:=ELF manipulation libraries
+ URL:=https://fedorahosted.org/elfutils/
+endef
+
+define Package/libasm
+ $(call Package/elfutils/Default)
+ TITLE+= (libasm)
+ DEPENDS:=libelf1
+endef
+
+define Package/libdw
+ $(call Package/elfutils/Default)
+ DEPENDS:=libelf1 +zlib +libbz2
+ TITLE+= (libdw)
+endef
+
+define Package/libelf1
+ $(call Package/elfutils/Default)
+ TITLE+= (libelf)
+endef
+
+ifeq ($(CONFIG_BUILD_NLS),y)
+TARGET_LDFLAGS += "-lintl"
+endif
+
+ifdef CONFIG_USE_UCLIBC
+CONFIGURE_VARS += \
+ LIBS="-largp"
+endif
+
+ifdef CONFIG_USE_MUSL
+CONFIGURE_VARS += \
+ LIBS="-largp"
+endif
+
+CONFIGURE_ARGS += \
+ --disable-werror \
+ --without-lzma
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/libasm/libasm.{a,so*} $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/libdw/libdw.{a,so*} $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/libelf/libelf.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libasm/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/libasm/libasm.so* $(1)/usr/lib/
+endef
+
+define Package/libdw/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/libdw/libdw.so* $(1)/usr/lib/
+endef
+
+define Package/libelf1/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/libelf/libelf.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libasm))
+$(eval $(call BuildPackage,libdw))
+$(eval $(call BuildPackage,libelf1))