mirror of
https://github.com/kenzok8/small.git
synced 2025-01-07 03:26:39 +08:00
59 lines
1.3 KiB
Makefile
59 lines
1.3 KiB
Makefile
# SPDX-License-Identifier: GPL-3.0-only
|
|
#
|
|
# Copyright (C) 2022 ImmortalWrt.org
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=gn
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git
|
|
PKG_SOURCE_DATE:=2024-12-17
|
|
PKG_SOURCE_VERSION:=c97a86a72105f3328a540f5a5ab17d11989ab7dd
|
|
PKG_MIRROR_HASH:=2884591821bac9779d01402e6e7a1c7966889cdd52d3163826ebdcb365ec6101
|
|
|
|
PKG_LICENSE:=BSD 3-Clause
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
|
|
|
PKG_HOST_ONLY:=1
|
|
HOST_BUILD_PARALLEL:=1
|
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/gn
|
|
SECTION:=devel
|
|
CATEGORY:=Development
|
|
TITLE:=A meta-build system that generates build files for Ninja
|
|
URL:=https://gn.googlesource.com/gn/
|
|
BUILDONLY:=1
|
|
endef
|
|
|
|
define Package/gn/description
|
|
GN can generate Ninja build files for C, C++, Rust, Objective C,
|
|
and Swift source on most popular platforms.
|
|
endef
|
|
|
|
define Host/Configure
|
|
$(PYTHON) $(HOST_BUILD_DIR)/build/gen.py \
|
|
--no-last-commit-position
|
|
endef
|
|
|
|
define Host/Compile
|
|
+$(NINJA) -C $(HOST_BUILD_DIR)/out
|
|
endef
|
|
|
|
define Host/Install
|
|
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
|
|
$(INSTALL_BIN) $(HOST_BUILD_DIR)/out/gn $(STAGING_DIR_HOSTPKG)/bin/
|
|
endef
|
|
|
|
define Host/Clean
|
|
$(RM) $(STAGING_DIR_HOSTPKG)/bin/gn
|
|
endef
|
|
|
|
$(eval $(call HostBuild))
|
|
$(eval $(call BuildPackage,gn))
|