Update xmail to 1.25 (#3607)
[openwrt/svn-archive/archive.git] / libs / libelf / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libelf
12 PKG_VERSION:=0.8.8
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.mr511.de/software/
17 PKG_MD5SUM:=be84e553686dd50c8b6d520f86f46521
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libelf
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=ELF object file access library
25 URL:=http://www.stud.uni-hannover.de/~michael/software/
26 endef
27
28 CONFIGURE_ARGS += \
29 --enable-shared \
30 --enable-static \
31 --enable-elf64=yes \
32
33 CONFIGURE_VARS += \
34 mr_cv_target_elf=yes \
35 libelf_64bit=yes \
36 libelf_cv_struct_elf64_ehdr=yes \
37 libelf_cv_type_elf64_addr=no \
38 libelf_cv_struct_elf64_rel=yes \
39
40 define Build/Compile
41 $(MAKE) -C $(PKG_BUILD_DIR) \
42 instroot="$(PKG_INSTALL_DIR)" \
43 all install
44 endef
45
46 define Build/InstallDev
47 mkdir -p $(1)/usr/include
48 $(CP) $(PKG_INSTALL_DIR)/usr/include/libelf* $(1)/usr/include/
49 mkdir -p $(1)/usr/lib
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.{a,so*} $(1)/usr/lib/
51 mkdir -p $(1)/usr/lib/pkgconfig
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libelf.pc $(1)/usr/lib/pkgconfig/
53 endef
54
55 define Package/libelf/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.so.* $(1)/usr/lib/
58 endef
59
60 $(eval $(call BuildPackage,libelf))