1
0

Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libelf
  9. PKG_VERSION:=0.8.13
  10. PKG_HASH:=591a9b4ec81c1f2042a97aa60564e0cb79d041c52faa7416acb38bc95bd2c76d
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=http://www.mr511.de/software/
  14. HOST_BUILD_PARALLEL:=1
  15. include $(INCLUDE_DIR)/host-build.mk
  16. HOST_CONFIGURE_ARGS += \
  17. --disable-shared \
  18. --enable-elf64
  19. define Host/Configure
  20. (cd $(HOST_BUILD_DIR)/$(3); \
  21. $(HOST_CONFIGURE_CMD) \
  22. $(HOST_CONFIGURE_ARGS); \
  23. )
  24. endef
  25. define Host/Compile
  26. +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib/ libelf.a
  27. endef
  28. define Host/Install
  29. $(INSTALL_DIR) $(STAGING_DIR_HOST)/{lib,include/libelf}
  30. $(CP) $(HOST_BUILD_DIR)/lib/{elf_repl.h,gelf.h,libelf.h,nlist.h,sys_elf.h} \
  31. $(STAGING_DIR_HOST)/include/libelf/
  32. $(CP) $(HOST_BUILD_DIR)/lib/libelf.a $(STAGING_DIR_HOST)/lib/
  33. endef
  34. define Host/Clean
  35. rm -rf $(STAGING_DIR_HOST)/include/libelf
  36. rm -f $(STAGING_DIR_HOST)/lib/libelf.a
  37. $(call Host/Clean/Default)
  38. endef
  39. $(eval $(call HostBuild))