代码拉取完成,页面将自动刷新
# Use "make TARGET=Linux all" to build for Linux
export
STEPS := all tests apps clean check info tools docs %.debug
.PHONY: $(STEPS) %.debug shell docker lint lint-changed
CWD := $(shell pwd)
HOST := $(shell uname)
NPROC :=
ifeq ($(HOST),Darwin)
NPROC = sysctl -n hw.physicalcpu
else
NPROC = nproc
endif
TARGET ?= $(HOST)
BUILD_TYPE ?= Debug
MAKE := make -f Build/Makefile -j $(shell $(NPROC))
DOCKER_EXE := DOCKER_BUILDKIT=0 docker
DOCKER ?= 1
DOCKERFILE := Build/Docker/Dockerfile
ifeq ($(TARGET),Raspi)
DOCKERFILE := Build/Docker/Dockerfile.Raspi
endif
ENABLE_TTY =
MAKE_DOCKER = $(DOCKER_EXE) build - < $(DOCKERFILE) | tee /dev/stderr | grep "Successfully built" | cut -d ' ' -f 3
RUN = $(DOCKER_EXE) run \
-e APPS \
-e BUILD_TYPE \
-e HOST \
-e LOG_LEVEL \
-e PROTOCOLS \
-e TARGET \
-e USE_HW_AUTH \
-e USE_NFC \
--cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
--mount type=bind,source="$(CWD)",target=/build \
--rm \
-i $(ENABLE_TTY) `$(MAKE_DOCKER)`
ifeq ($(HOST)$(TARGET),LinuxDarwin)
$(error Can't build $(TARGET) on $(HOST).)
endif
ifneq ($(TARGET),Darwin)
ifneq (,$(wildcard /.dockerenv))
# If we are already running inside docker
MAKE := $(MAKE)
else ifeq ($(DOCKER),0)
MAKE := $(MAKE)
else
# Else run make inside docker
MAKE := $(RUN) $(MAKE)
endif
endif
define make_target
$(1):
@$(2) $$@
endef
$(eval $(foreach step,$(STEPS),$(call make_target,$(step),$(MAKE) PAL=$(TARGET))))
shell: ENABLE_TTY=-t
shell:
@$(RUN) bash
docker:
@$(MAKE_DOCKER)
# Lint (and correct) all files.
lint:
@Tools/linters/lint.sh -c
# Lint (and correct) all currently-changed files (according to git).
lint-changed:
@git diff-index --name-only HEAD \
| xargs printf -- '-f\0%s\0' \
| xargs -0 -- Tools/linters/lint.sh -Q -c
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。