aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Panella <ianchi74@outlook.com>2017-09-13 22:27:32 -0500
committerAdrian Panella <ianchi74@outlook.com>2017-09-13 22:27:32 -0500
commit7313348033e1bc53f0d4346036b5f98562b9379d (patch)
tree561374cdd0fc7c08f6833c00e1ab1b3539d3603d
parentd9a8e7541cbd6e8cd1e04caa296270a3217bc13c (diff)
zip: add host compile
make it available as a tool for building other packages Signed-off-by: Adrian Panella <ianchi74@outlook.com>
-rw-r--r--utils/zip/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/zip/Makefile b/utils/zip/Makefile
index 65de08d8b..afdc76ada 100644
--- a/utils/zip/Makefile
+++ b/utils/zip/Makefile
@@ -21,8 +21,10 @@ PKG_LICENSE:=BSD-4-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/zip$(PKG_REV)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)/zip$(PKG_REV)
PKG_CHECK_FORMAT_SECURITY:=0
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/zip
@@ -58,4 +60,14 @@ define Package/zip/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
endef
+define Host/Compile
+ +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) -I. -f unix/Makefile generic
+endef
+
+define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/zip $(STAGING_DIR_HOSTPKG)/bin/
+endef
+
+$(eval $(call HostBuild))
$(eval $(call BuildPackage,zip))