Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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:= \
  14. http://distfiles.gentoo.org/distfiles/ \
  15. http://distcache.freebsd.org/ports-distfiles/
  16. HOST_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/host-build.mk
  18. HOST_CONFIGURE_ARGS += \
  19. --disable-shared \
  20. --enable-elf64
  21. define Host/Configure
  22. (cd $(HOST_BUILD_DIR)/$(3); \
  23. $(HOST_CONFIGURE_CMD) \
  24. $(HOST_CONFIGURE_ARGS); \
  25. )
  26. endef
  27. define Host/Compile
  28. +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib/ libelf.a
  29. endef
  30. define Host/Install
  31. $(INSTALL_DIR) $(STAGING_DIR_HOST)/{lib/pkgconfig,include/libelf}
  32. $(CP) $(HOST_BUILD_DIR)/lib/{elf_repl.h,gelf.h,libelf.h,nlist.h,sys_elf.h} \
  33. $(STAGING_DIR_HOST)/include/libelf/
  34. $(CP) $(HOST_BUILD_DIR)/lib/libelf.a $(STAGING_DIR_HOST)/lib/
  35. $(CP) $(HOST_BUILD_DIR)/libelf.pc $(STAGING_DIR_HOST)/lib/pkgconfig/
  36. endef
  37. define Host/Clean
  38. rm -rf $(STAGING_DIR_HOST)/include/libelf
  39. rm -f $(STAGING_DIR_HOST)/lib/libelf.a
  40. rm -f $(STAGING_DIR_HOST)/lib/pkgconfig/libelf.pc
  41. $(call Host/Clean/Default)
  42. endef
  43. $(eval $(call HostBuild))