enable $(FPIC) for a few more packages
[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.10
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:=9db4d36c283d9790d8fa7df1f4d7b4d9
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 TARGET_CFLAGS += $(FPIC)
29
30 CONFIGURE_ARGS += \
31 --enable-shared \
32 --enable-static \
33 --enable-elf64=yes \
34
35 CONFIGURE_VARS += \
36 mr_cv_target_elf=yes \
37 libelf_64bit=yes \
38 libelf_cv_struct_elf64_ehdr=yes \
39 libelf_cv_type_elf64_addr=no \
40 libelf_cv_struct_elf64_rel=yes \
41
42 define Build/Compile
43 $(MAKE) -C $(PKG_BUILD_DIR) \
44 instroot="$(PKG_INSTALL_DIR)" \
45 all install
46 endef
47
48 define Build/InstallDev
49 mkdir -p $(1)/usr/include
50 $(CP) $(PKG_INSTALL_DIR)/usr/include/libelf* $(1)/usr/include/
51 mkdir -p $(1)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.{a,so*} $(1)/usr/lib/
53 mkdir -p $(1)/usr/lib/pkgconfig
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libelf.pc $(1)/usr/lib/pkgconfig/
55 endef
56
57 define Package/libelf/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.so.* $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,libelf))