lantiq: fix missing symbols
[oweals/openwrt.git] / tools / libelf / Makefile
1 #
2 # Copyright (C) 2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libelf
11 PKG_VERSION:=0.8.13
12 PKG_MD5SUM:=4136d7b4c04df68b686570afa26988ac
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.mr511.de/software/
17
18 HOST_BUILD_PARALLEL:=1
19
20 include $(INCLUDE_DIR)/host-build.mk
21
22 HOST_CONFIGURE_ARGS += \
23         --disable-shared \
24         --enable-elf64
25
26 define Host/Configure
27         (cd $(HOST_BUILD_DIR)/$(3); \
28                 $(HOST_CONFIGURE_CMD) \
29                 $(HOST_CONFIGURE_ARGS); \
30         )
31 endef
32
33
34 define Host/Compile
35         +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib/ libelf.a
36 endef
37
38 define Host/Install
39         $(INSTALL_DIR) $(STAGING_DIR_HOST)/{lib,include/libelf}
40         $(CP) $(HOST_BUILD_DIR)/lib/{elf_repl.h,gelf.h,libelf.h,nlist.h,sys_elf.h} \
41                                                 $(STAGING_DIR_HOST)/include/libelf/
42         $(CP) $(HOST_BUILD_DIR)/lib/libelf.a $(STAGING_DIR_HOST)/lib/
43 endef
44
45 define Host/Clean
46         rm -rf $(STAGING_DIR_HOST)/include/libelf
47         rm -f $(STAGING_DIR_HOST)/lib/libelf.a
48         $(call Host/Clean/Default)
49 endef
50
51 $(eval $(call HostBuild))