1 Star 0 Fork 22

joker8888/HeliosSDK

forked from QuecPython/HeliosSDK 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
construct.mk 1.97 KB
一键复制 编辑 原始数据 按行查看 历史
chenchi 提交于 2021-06-03 17:04 +08:00 . first commit
# Copyright (c) Quectel Wireless Solution, Co., Ltd.All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
BUILD_MK :=
make_mk_fnc = $(1)/$(notdir $(1)).mk
include config/$(KCONFIG_CONFIG)
include $(BUILD_MK)
ifneq ($(filter-out system/%.mk, $(BUILD_MK)),)
$(NAME)_COMPONENTS += system
endif
$(NAME)_MK = $(foreach n, $($(NAME)_COMPONENTS), $(call make_mk_fnc, $(n)))
ARCHIVE_CORRESPONDING = $(OUTPUT_OBJ_PATH)/$(dir $(BUILD_MK))lib$(basename $(notdir $(BUILD_MK))).a
ARCHIVE_RECORD = $(shell grep $(ARCHIVE_CORRESPONDING) $(OUTPUT_TMP_PATH)/$(ARCHIVES_RECORD_TMP_FILE) 2> /dev/null)
SOURCES := $(foreach n, $($(NAME)_SRCS), $(dir $(BUILD_MK))$(n))
ifeq ($(ARCHIVE_RECORD),)
compile_opt_act = compile_opt
ifneq ($(SOURCES),)
compile_act = compile
endif
endif
.PHONY: all $(compile_opt_act) $(compile_act) recursion
all: $(compile_opt_act) $(compile_act) recursion
compile_opt:
@-rm -rf $(OUTPUT_TMP_PATH)/$(GLOBAL_INCS_TMP_FILE)
@-rm -rf $(OUTPUT_TMP_PATH)/$(GLOBAL_DEFINE_TMP_FILE)
ifneq ($(SOURCES),)
@echo
@echo [ making dependency for $(ARCHIVE_CORRESPONDING) ]
endif
@make --no-print-directory -f compile_opt.mk BUILD_MK=$(BUILD_MK)
compile:
@echo $(ARCHIVE_CORRESPONDING) >> $(OUTPUT_TMP_PATH)/$(ARCHIVES_RECORD_TMP_FILE)
@make --no-print-directory -j4 -f compile.mk BUILD_MK=$(BUILD_MK)
recursion:
@for mk_file in $($(NAME)_MK); \
do \
make --no-print-directory -f construct.mk BUILD_MK=$$mk_file; \
done
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/joker8888/HeliosSDK.git
git@gitee.com:joker8888/HeliosSDK.git
joker8888
HeliosSDK
HeliosSDK
master

搜索帮助