加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile.rules 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
#
# Import a sub-library of musl
#
# @param $(1)
# The name of the sub-library within musl.
# @param $(2)
# The headers for this sub-library.
# @param $(3)
# The source files for this sub-library.
#
ifeq ($(CONFIG_LIBMUSL), y)
define _libmusl_import_lib
$(LIBMUSL_BUILD)/include/$(1):
$(call verbose_cmd,MKDIR,libmusl: $(subst $(LIBMUSL_BUILD),,$(1)): $(notdir $$@), mkdir -p $$@)
# Make a symbolic link of the original header file to a sub-library directory
$(LIBMUSL_BUILD)/include/$(1)/%.h:
$$(Q)mkdir -p $$(shell dirname $$@)
$(call verbose_cmd,HOSTLN,libmusl: $(1): $$(subst $(LIBMUSL_BUILD)/include/$(1)/,,$$@), \
ln -sf $$(subst $(LIBMUSL_BUILD)/include/$(1)/,$(LIBMUSL),$$@) $$@)
# includes for building libmusl
LIBMUSL_$(call uc,$(1))_INCLUDES-y += -I$(LIBMUSL_BUILD)/include/$(1)/src/internal
LIBMUSL_$(call uc,$(1))_INCLUDES-y += -I$(LIBMUSL_BUILD)/include/$(1)/src/$(1)
LIBMUSL_$(call uc,$(1))_INCLUDES-y += -I$(LIBMUSL_BUILD)/include/$(1)/include
LIBMUSL_SRCS-y += $(3)
LIBMUSL_CINCLUDES-y += $$(LIBMUSL_$(call uc,$(1))_INCLUDES-y)
LIBMUSL_CXXINCLUDES-y += $$(LIBMUSL_$(call uc,$(1))_INCLUDES-y)
# includes for using libmusl
CINCLUDES-$(CONFIG_LIBMUSL) += -I$(LIBMUSL_BUILD)/include/$(1)/include
CXXINCLUDES-$(CONFIG_LIBMUSL) += -I$(LIBMUSL_BUILD)/include/$(1)/include
# Append the sub library directory to the include path
$(LIBMUSL_BUILD)/.prepared: $(subst $(LIBMUSL),$(LIBMUSL_BUILD)/include/$(1),$(2))
endef
endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化