加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Makefile 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
export CONFIG_MT_BASE ?= $(CURDIR)
override CONFIG_MT_BASE := $(realpath $(CONFIG_MT_BASE))
ifeq ($(CONFIG_MT_BASE),)
$(error "Invalid base directory (CONFIG_MT_BASE)")
endif
# Check if the jq tool is installed.
ifeq ($(shell which jq),)
$(error "Missing jq tool, please install")
endif
# Setup Tenon workdirs.
TN_ROOT ?= $(CONFIG_MT_BASE)/workdir/tenon
TN_LIBS ?= $(CONFIG_MT_BASE)/workdir/libs
MT_BUILD ?= $(CONFIG_MT_BASE)/workdir/build
# Prepare adaptive platform for Mortise build with Tenon.
MT_PLAT ?= $(CONFIG_MT_BASE)/tnplat
# Prepare external libraries for Mortise build with Tenon.
MT_LIBS := $(CONFIG_MT_BASE)/lib
# Prepare external drivers for Mortise build with Tenon.
MT_DRIVS := $(CONFIG_MT_BASE)/drivers/serial
# Prepare Mortise build directory.
MORTISE_ROOT ?= $(PWD)
EXAMPLE_ROOT := $(MORTISE_ROOT)/examples
include $(MORTISE_ROOT)/version.mk
all: mt_version
@$(MAKE) -C $(TN_ROOT) A=$(MORTISE_ROOT) L=$(MT_LIBS) O=$(MT_BUILD) P=$(MT_PLAT) D=$(MT_DRIVS)
menuconfig defconfig distclean clean: mt_version
@$(MAKE) -C $(TN_ROOT) A=$(MORTISE_ROOT) L=$(MT_LIBS) O=$(MT_BUILD) P=$(MT_PLAT) D=$(MT_DRIVS) $@
update_depends:
@LIB_INFO=$(CONFIG_MT_BASE)/lib_depends.json; \
BSP_PATH=$(MORTISE_ROOT)/workdir/board-support-package; \
BSP_REPO=$$(jq -r ".bsp.url" "$$LIB_INFO"); \
BSP_BRANCH=$$(jq -r ".bsp.branch" "$$LIB_INFO"); \
if [ ! -d "$$BSP_PATH" ]; then \
git clone -q --depth=1 -b $$BSP_BRANCH $$BSP_REPO $$BSP_PATH; \
fi;\
cd $$BSP_PATH && bash ./build.sh --update-libs=$$LIB_INFO
mt_version:
export MT_FULLVERSION=$(MT_VERSION).$(MT_SUBVERSION).$(MT_EXTRAVERSION)$(shell cd $(MORTISE_ROOT); $(TN_ROOT)/support/scripts/gitsha1)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化