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_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_SOURCE_URL
:=http
://www.mr511.de
/software
/
18 PKG_MD5SUM
:=be84e553686dd50c8b6d520f86f46521
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
28 TITLE
:=ELF object file access library
29 DESCRIPTION
:=ELF object file access library
30 URL
:=http
://www.stud.uni-hannover.de
/~michael
/software
/
33 define Build
/Configure
34 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
35 $(TARGET_CONFIGURE_OPTS
) \
36 CFLAGS
="$(TARGET_CFLAGS)" \
37 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
38 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
39 mr_cv_target_elf
=yes \
41 libelf_cv_struct_elf64_ehdr
=yes \
42 libelf_cv_type_elf64_addr
=no \
43 libelf_cv_struct_elf64_rel
=yes \
45 --target
=$(GNU_TARGET_NAME
) \
46 --host
=$(GNU_TARGET_NAME
) \
47 --build
=$(GNU_HOST_NAME
) \
53 --datadir=/usr
/share \
54 --includedir=/usr
/include \
55 --infodir=/usr
/share
/info \
57 --libexecdir
=/usr
/lib \
58 --localstatedir
=/var \
59 --mandir=/usr
/share
/man \
62 $(DISABLE_LARGEFILE
) \
71 rm -rf
$(PKG_INSTALL_DIR
)
72 mkdir
-p
$(PKG_INSTALL_DIR
)
73 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
74 CC
="$(TARGET_CC)" LD
="$(TARGET_CROSS)ld" ARCH
=$(ARCH
) \
75 instroot
="$(PKG_INSTALL_DIR)" \
79 define Package
/libelf
/install
80 install -d
-m0755
$(1)/usr
/lib
81 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelf.so.
* $(1)/usr
/lib
/
84 define Build
/InstallDev
85 mkdir
-p
$(STAGING_DIR
)/usr
/include
86 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libelf
* $(STAGING_DIR
)/usr
/include/
87 mkdir
-p
$(STAGING_DIR
)/usr
/lib
88 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelf.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
91 define Build
/UninstallDev
93 $(STAGING_DIR
)/usr
/include/libelf
* \
94 $(STAGING_DIR
)/usr
/lib
/libelf.
{a
,so
*}
97 $(eval
$(call BuildPackage
,libelf
))