[package] add elfutils
[openwrt/svn-archive/archive.git] / libs / elfutils / Makefile
1 #
2 # Copyright (C) 2010 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
9 PKG_NAME:=elfutils
10 PKG_VERSION:=0.143
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
14 PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/elfutils/
15
16 include $(INCLUDE_DIR)/package.mk
17
18 define Package/elfutils
19 SECTION:=libs
20 CATEGORY:=Libraries
21 DEPENDS:=+libintl
22 TITLE:=ELF utilities
23 URL:=https://fedorahosted.org/releases/e/l/elfutils/
24 endef
25
26 CONFIGURE_OPTS += --disable-generic
27
28 define Build/Compile
29 $(MAKE) -C $(PKG_BUILD_DIR)/libelf \
30 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libintl/include" \
31 LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libintl/lib -lintl" \
32 DESTDIR="$(PKG_INSTALL_DIR)"
33 endef
34
35 define Build/InstallDev
36 $(INSTALL_DIR) $(1)/usr/include
37 $(CP) $(PKG_BUILD_DIR)/libelf/libelf.h $(1)/usr/include/
38 $(INSTALL_DIR) $(1)/usr/lib
39 $(CP) $(PKG_BUILD_DIR)/libelf/libelf.{a,so*} $(1)/usr/lib/
40 endef
41
42 define Package/elfutils/install
43 $(INSTALL_DIR) $(1)/usr/lib
44 $(CP) $(PKG_BUILD_DIR)/libelf/libelf.so* $(1)/usr/lib/
45 endef
46
47 $(eval $(call BuildPackage,elfutils))