Makefile 928 B

123456789101112131415161718192021222324252627282930313233343536
  1. #
  2. # Copyright (C) 2011-2013 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:=upx
  9. PKG_VERSION:=3.91
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.bz2
  11. PKG_SOURCE_URL:=https://github.com/upx/upx/releases/download/v$(PKG_VERSION)
  12. PKG_HASH:=527ce757429841f51675352b1f9f6fc8ad97b18002080d7bf8672c466d8c6a3c
  13. PKG_CAT:=bzcat
  14. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)-src
  15. include $(INCLUDE_DIR)/host-build.mk
  16. define Host/Compile
  17. rm -f $(HOST_BUILD_DIR)/src/.depend
  18. $(MAKE) UPX_LZMADIR="$(BUILD_DIR_HOST)/lzma-4.65" -C $(HOST_BUILD_DIR)/src \
  19. CXXFLAGS_WERROR="" LDFLAGS="$(HOST_LDFLAGS)" \
  20. CXX="$(HOSTCXX)"
  21. endef
  22. define Host/Install
  23. $(CP) $(HOST_BUILD_DIR)/src/upx.out $(STAGING_DIR_HOST)/bin/upx
  24. endef
  25. define Host/Clean
  26. rm -f $(STAGING_DIR_HOST)/bin/upx
  27. endef
  28. $(eval $(call HostBuild))