2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.mr511.de/software/
17 PKG_MD5SUM:=be84e553686dd50c8b6d520f86f46521
19 include $(INCLUDE_DIR)/package.mk
24 TITLE:=ELF object file access library
25 URL:=http://www.stud.uni-hannover.de/~michael/software/
34 mr_cv_target_elf=yes \
36 libelf_cv_struct_elf64_ehdr=yes \
37 libelf_cv_type_elf64_addr=no \
38 libelf_cv_struct_elf64_rel=yes \
41 $(MAKE) -C $(PKG_BUILD_DIR) \
42 instroot="$(PKG_INSTALL_DIR)" \
46 define Build/InstallDev
47 mkdir -p $(1)/usr/include
48 $(CP) $(PKG_INSTALL_DIR)/usr/include/libelf* $(1)/usr/include/
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/
55 define Build/UninstallDev
57 $(STAGING_DIR)/usr/include/libelf* \
58 $(STAGING_DIR)/usr/lib/libelf.{a,so*}
61 define Package/libelf/install
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.so.* $(1)/usr/lib/
66 $(eval $(call BuildPackage,libelf))