代码拉取完成,页面将自动刷新
同步操作将从 BookOS/nxos 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
##
# Copyright (c) 2018-2022, NXOS Development Team
# SPDX-License-Identifier: Apache-2.0
#
# Contains: Makefile for NXOS
#
# Change Logs:
# Date Author Notes
# 2021-9-20 JasonHu Init
##
#
# Get platform config
#
sinclude platform.mk
#
# Tools name
#
GIT :=git
#
# Use build dir for target
#
USE_BUILD_DIR :=y
BUILD_DIR :=build
#
# Set compile and platform
#
CROSS_COMPILE ?=
ARCH_PLATFORM ?=
#
# Target file name
#
NXOS_NAME ?= NXOS
export NXOS_NAME
#
# Use kconfiglib
#
USE_KCONFIGLIB :=y
KCONFIGLIB_DIR := scripts/kconfiglib
#
# Enable GDB debug
#
G ?=n
#
# Enable test case
#
TC ?=n
#
# Get platform information about ARCH and PLATFORM from ARCH_PLATFORM variable.
#
ifeq ($(words $(subst -, , $(ARCH_PLATFORM))), 2)
ARCH := $(word 1, $(subst -, , $(ARCH_PLATFORM)))
PLATFORM := $(word 2, $(subst -, , $(ARCH_PLATFORM)))
else
# you can set default platfrom here
ARCH := x86
PLATFORM := i386
endif
#
# System environment variable.
#
ifeq ($(OS), Windows_NT)
HOSTOS := windows
else
ifneq (,$(findstring Linux, $(shell uname -a)))
HOSTOS := linux
endif
endif
#
# Override default variables.
#
sinclude src/platform/$(PLATFORM)/compile.mk
#
# Export global values
#
export CROSS_COMPILE
export PLATFORM
export ARCH
export HOSTOS
export USE_BUILD_DIR
export G
export TC
#
# Kconfig path
#
CONFIG_OUT_FILE = ./src/include/nx_configure.h
CONFIG_OUT_FILE_PLATFORM = ./src/platform/$(PLATFORM)/include/nx_configure.h
CONFIG_IN_FILE = .config
#
# Cmds
#
.PHONY: all clean run prepare menuconfig defconfig saveconfig gdb cleanAll
#
# Compile only
#
all:
ifeq ($(USE_BUILD_DIR), y)
@$(MAKE) -s -C src O=$(BUILD_DIR)
else
@$(MAKE) -s -C src
endif
cleanAll: clean
@-rm -f .config
@-rm -f .config.old
@-rm -f ./src/platform/Kconfig
@-rm -f ./src/include/nx_configure.h
#
# Clean all targets
#
clean:
ifeq ($(USE_BUILD_DIR), y)
@$(MAKE) -s -C src clean O=$(BUILD_DIR)
else
@$(MAKE) -s -C src clean
endif
@$(MAKE) -s -C src/platform/$(PLATFORM) -f cmd.mk clean
#
# Run OS
#
run: all
@$(MAKE) -s -C src/platform/$(PLATFORM) -f cmd.mk run
#
# GDB command
#
gdb:
@$(MAKE) -s -C src/platform/$(PLATFORM) -f cmd.mk gdb
#
# dump kernel
#
dump:
@$(MAKE) -s -C src/platform/$(PLATFORM) -f cmd.mk dump
#
# menuconfig
#
menuconfig:
ifeq ($(USE_KCONFIGLIB), y)
@python $(KCONFIGLIB_DIR)/menuconfig.py Kconfig
@python $(KCONFIGLIB_DIR)/genconfig.py --header-path=$(CONFIG_OUT_FILE).tmp
@echo "#ifndef __NX_CONFIG__" > $(CONFIG_OUT_FILE)
@echo "#define __NX_CONFIG__" >> $(CONFIG_OUT_FILE)
@cat $(CONFIG_OUT_FILE).tmp >> $(CONFIG_OUT_FILE)
@echo "#endif" >> $(CONFIG_OUT_FILE)
@rm -f $(CONFIG_OUT_FILE).tmp
@echo genconfig to $(CONFIG_OUT_FILE) .
endif
defconfig:
@-rm -f .config
@-rm -f .config.old
@-cp src/platform/$(PLATFORM)/defconfig ./.config
@-cp $(CONFIG_OUT_FILE_PLATFORM) $(CONFIG_OUT_FILE)
@echo update Kconfig from platform $(ARCH)-$(PLATFORM) .
saveconfig:
@-cp ./.config src/platform/$(PLATFORM)/defconfig
@-cp $(CONFIG_OUT_FILE) $(CONFIG_OUT_FILE_PLATFORM)
@echo save Kconfig to platform $(ARCH)-$(PLATFORM) .
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。