mbedtls: tune config to reduce size and improve performance
[openwrt/openwrt.git] / package / libs / elfutils / Makefile
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
10 PKG_NAME:=elfutils
11 PKG_VERSION:=0.167
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/$(PKG_NAME)/$(PKG_VERSION)
16 PKG_MD5SUM:=efc6c2067dfad5646777e93e85222e8f
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
21 PKG_INSTALL:=1
22 PKG_USE_MIPS16:=0
23
24 PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/nls.mk
28
29 define Package/elfutils/Default
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=ELF manipulation libraries
33 URL:=https://fedorahosted.org/elfutils/
34 endef
35
36 define Package/libasm
37 $(call Package/elfutils/Default)
38 TITLE+= (libasm)
39 DEPENDS:=libelf1 +libdw
40 endef
41
42 define Package/libdw
43 $(call Package/elfutils/Default)
44 DEPENDS:=libelf1 +libbz2
45 TITLE+= (libdw)
46 endef
47
48 define Package/libelf1
49 $(call Package/elfutils/Default)
50 DEPENDS:=$(INTL_DEPENDS) +zlib
51 TITLE+= (libelf)
52 endef
53
54 ifeq ($(CONFIG_BUILD_NLS),y)
55 TARGET_LDFLAGS += "-lintl"
56 endif
57
58 ifdef CONFIG_USE_UCLIBC
59 CONFIGURE_VARS += \
60 LIBS="-largp"
61 endif
62
63 ifdef CONFIG_USE_MUSL
64 CONFIGURE_VARS += \
65 LIBS="-largp"
66 endif
67
68 CONFIGURE_ARGS += \
69 --without-lzma
70
71 define Build/InstallDev
72 $(INSTALL_DIR) $(1)/usr/include
73 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_BUILD_DIR)/libasm/libasm.{a,so*} $(1)/usr/lib/
76 $(CP) $(PKG_BUILD_DIR)/libdw/libdw.{a,so*} $(1)/usr/lib/
77 $(CP) $(PKG_BUILD_DIR)/libelf/libelf.{a,so*} $(1)/usr/lib/
78 endef
79
80 define Package/libasm/install
81 $(INSTALL_DIR) $(1)/usr/lib
82 $(CP) $(PKG_BUILD_DIR)/libasm/libasm.so* $(1)/usr/lib/
83 endef
84
85 define Package/libdw/install
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(CP) $(PKG_BUILD_DIR)/libdw/libdw.so* $(1)/usr/lib/
88 endef
89
90 define Package/libelf1/install
91 $(INSTALL_DIR) $(1)/usr/lib
92 $(CP) $(PKG_BUILD_DIR)/libelf/libelf.so* $(1)/usr/lib/
93 endef
94
95 $(eval $(call BuildPackage,libasm))
96 $(eval $(call BuildPackage,libdw))
97 $(eval $(call BuildPackage,libelf1))