Makefile 868 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.09
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.bz2
  11. PKG_SOURCE_URL:=@SF/upx
  12. PKG_MD5SUM:=1253da46eac54a217eb73e2d44818e53
  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) $(HOST_STATIC_LINKING)" \
  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))