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.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.mr511.de/software/
16 PKG_MD5SUM:=e21f8273d9f5f6d43a59878dc274fec7
18 include $(INCLUDE_DIR)/package.mk
23 TITLE:=ELF object file access library
24 URL:=http://www.mr511.de/software/
27 TARGET_CFLAGS += $(FPIC)
35 mr_cv_target_elf=yes \
37 libelf_cv_struct_elf64_ehdr=yes \
38 libelf_cv_type_elf64_addr=no \
39 libelf_cv_struct_elf64_rel=yes \
42 $(MAKE) -C $(PKG_BUILD_DIR) \
43 instroot="$(PKG_INSTALL_DIR)" \
47 define Build/InstallDev
48 $(INSTALL_DIR) $(1)/usr/include
49 $(CP) $(PKG_INSTALL_DIR)/usr/include/libelf* $(1)/usr/include/
50 $(INSTALL_DIR) $(1)/usr/lib
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.{a,so*} $(1)/usr/lib/
52 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libelf.pc $(1)/usr/lib/pkgconfig/
56 define Package/libelf/install
57 $(INSTALL_DIR) $(1)/usr/lib
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.so.* $(1)/usr/lib/
61 $(eval $(call BuildPackage,libelf))