38 lines
903 B
Makefile
Raw Normal View History

2020-02-15 15:38:05 +08:00
#
# Copyright (C) 2011-2020 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=upx
PKG_VERSION:=3.96
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.xz
PKG_SOURCE_URL:=https://github.com/upx/upx/releases/download/v$(PKG_VERSION)
PKG_HASH:=47774df5c958f2868ef550fb258b97c73272cb1f44fe776b798e393465993714
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)-src
include $(INCLUDE_DIR)/host-build.mk
UPX_UCLDIR := $(BUILD_DIR_HOST)/ucl-1.03
define Host/Compile
UPX_UCLDIR=$(UPX_UCLDIR) \
$(MAKE) -C $(HOST_BUILD_DIR)/src \
CXXFLAGS_WERROR="" LDFLAGS="$(HOST_LDFLAGS)" \
CXX="$(HOSTCXX)"
endef
define Host/Install
$(CP) $(HOST_BUILD_DIR)/src/upx.out $(STAGING_DIR_HOST)/bin/upx
endef
define Host/Clean
rm -f $(STAGING_DIR_HOST)/bin/upx
endef
$(eval $(call HostBuild))