elfutils: rename libelf1 to libelf
[openwrt/staging/jogo.git] / package / libs / elfutils / Makefile
1 #
2 # Copyright (C) 2010-2014 OpenWrt.org
3 # Copyright (C) 2016-2017 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
10 PKG_NAME:=elfutils
11 PKG_VERSION:=0.175
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
16 PKG_HASH:=f7ef925541ee32c6d15ae5cb27da5f119e01a5ccdbe9fe57bf836730d7b7a65b
17 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
18 PKG_LICENSE:=GPL-3.0+
19 PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
20 PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
21 PKG_FIXUP:=autoreconf
22
23 PKG_INSTALL:=1
24 PKG_USE_MIPS16:=0
25
26 PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/nls.mk
30
31 define Package/elfutils/Default
32 SECTION:=libs
33 CATEGORY:=Libraries
34 TITLE:=ELF manipulation libraries
35 URL:=https://fedorahosted.org/elfutils/
36 ABI_VERSION:=1
37 endef
38
39 define Package/libasm
40 $(call Package/elfutils/Default)
41 TITLE+= (libasm)
42 DEPENDS:=libelf +libdw
43 endef
44
45 define Package/libdw
46 $(call Package/elfutils/Default)
47 DEPENDS:=libelf +libbz2
48 TITLE+= (libdw)
49 endef
50
51 define Package/libelf
52 $(call Package/elfutils/Default)
53 DEPENDS:=$(INTL_DEPENDS) +zlib
54 TITLE+= (libelf)
55 PROVIDES:=libelf1
56 endef
57
58 ifeq ($(CONFIG_BUILD_NLS),y)
59 TARGET_LDFLAGS += -lintl
60 else
61 CONFIGURE_ARGS += --disable-nls
62 endif
63
64 CONFIGURE_ARGS += \
65 --program-prefix=eu- \
66 --without-lzma
67
68 TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral
69
70 define Build/InstallDev
71 $(INSTALL_DIR) $(1)/usr/include
72 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.{a,so*} $(1)/usr/lib/
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.{a,so*} $(1)/usr/lib/
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.{a,so*} $(1)/usr/lib/
77 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libelf.pc $(1)/usr/lib/pkgconfig/
79 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdw.pc $(1)/usr/lib/pkgconfig/
80 endef
81
82 define Package/libasm/install
83 $(INSTALL_DIR) $(1)/usr/lib
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.so.* $(1)/usr/lib/
85 endef
86
87 define Package/libdw/install
88 $(INSTALL_DIR) $(1)/usr/lib
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.so.* $(1)/usr/lib/
90 endef
91
92 define Package/libelf/install
93 $(INSTALL_DIR) $(1)/usr/lib
94 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.so.* $(1)/usr/lib/
95 endef
96
97 $(eval $(call BuildPackage,libasm))
98 $(eval $(call BuildPackage,libdw))
99 $(eval $(call BuildPackage,libelf))