mirror of
https://github.com/Lienol/openwrt
synced 2025-01-08 11:37:34 +08:00
tools: add ucl and upx
This commit is contained in:
parent
8f69822432
commit
0223ceedf9
@ -70,6 +70,8 @@ tools-y += util-linux
|
||||
tools-y += xz
|
||||
tools-y += zip
|
||||
tools-y += zlib
|
||||
tools-y += ucl
|
||||
tools-y += upx
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS),y) += liblzo
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_B43_TOOLS),y) += b43-tools
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_BZIP2_TOOLS),y) += bzip2
|
||||
@ -88,6 +90,7 @@ tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USE_LLVM_BUILD),y) += llvm-bpf
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USE_MOLD),y) += mold
|
||||
|
||||
# builddir dependencies
|
||||
$(curdir)/upx/compile := $(curdir)/ucl/compile
|
||||
$(curdir)/autoconf/compile := $(curdir)/m4/compile
|
||||
$(curdir)/automake/compile := $(curdir)/autoconf/compile $(curdir)/pkgconf/compile $(curdir)/xz/compile
|
||||
$(curdir)/b43-tools/compile := $(curdir)/bison/compile
|
||||
|
51
tools/ucl/Makefile
Normal file
51
tools/ucl/Makefile
Normal file
@ -0,0 +1,51 @@
|
||||
#
|
||||
# Copyright (C) 2019 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:=ucl
|
||||
PKG_VERSION:=1.03
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/ucl/download/$(PKG_SOURCE)
|
||||
PKG_HASH:=b865299ffd45d73412293369c9754b07637680e5c826915f097577cd27350348
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOSTCC :=gcc
|
||||
HOST_CFLAGS +=-std=gnu89
|
||||
|
||||
define Host/Prepare
|
||||
$(Host/Prepare/Default)
|
||||
mkdir -p $(STAGING_DIR_HOST)/include/ucl
|
||||
endef
|
||||
|
||||
define Host/Configure
|
||||
(cd $(HOST_BUILD_DIR); \
|
||||
CC="$(HOSTCC)" \
|
||||
CFLAGS="$(HOST_CFLAGS)" \
|
||||
./configure --prefix=$(STAGING_DIR_HOST) \
|
||||
);
|
||||
$(call Host/Configure/Default)
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
$(MAKE) -C $(HOST_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) install
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) uninstall
|
||||
rm -rf $(HOST_BUILD_DIR)
|
||||
rm -rf $(STAGING_DIR_HOST)/include/ucl
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
35
tools/upx/Makefile
Normal file
35
tools/upx/Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
#
|
||||
# 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.95
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/upx/upx/releases/download/v$(PKG_VERSION)
|
||||
PKG_HASH:=3b0f55468d285c760fcf5ea865a070b27696393002712054c69ff40d8f7f5592
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)-src
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Host/Compile
|
||||
UPX_UCLDIR=$(STAGING_DIR_HOST) \
|
||||
$(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))
|
Loading…
Reference in New Issue
Block a user