代码拉取完成,页面将自动刷新
同步操作将从 millerluo/ability_idl_tool 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Copyright (c) 2023-2024 Huawei Device Co., Ltd.
# 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.
BOUNDS_CHECK_DIR := $(abspath ../../../third_party/bounds_checking_function)
INCLUDES = -I$(PWD) -I$(BOUNDS_CHECK_DIR)/include
CODEGEN_SOURCE_DIR := $(PWD)/codegen
CODEGEN_SOURCE := $(wildcard $(CODEGEN_SOURCE_DIR)/*.cpp)
CODEGEN_OBJ_DIR := $(BUILD_DIR)/codegen
CODEGEN_OBJS := $(addprefix $(CODEGEN_OBJ_DIR)/, $(patsubst %.cpp, %.o, $(notdir $(CODEGEN_SOURCE))))
METADATA_SOURCE_DIR := $(PWD)/metadata
METADATA_SOURCE := $(wildcard $(METADATA_SOURCE_DIR)/*.cpp)
METADATA_OBJ_DIR := $(BUILD_DIR)/metadata
METADATA_OBJS := $(addprefix $(METADATA_OBJ_DIR)/, $(patsubst %.cpp, %.o, $(notdir $(METADATA_SOURCE))))
PARSER_SOURCE_DIR := $(PWD)/parser
PARSER_SOURCE := $(wildcard $(PARSER_SOURCE_DIR)/*.cpp)
PARSER_OBJS_DIR := $(BUILD_DIR)/parser
PARSER_OBJS := $(addprefix $(PARSER_OBJS_DIR)/, $(patsubst %.cpp, %.o, $(notdir $(PARSER_SOURCE))))
AST_SOURCE_DIR := $(PWD)/ast
AST_SOURCE := $(wildcard $(AST_SOURCE_DIR)/*.cpp)
AST_OBJS_DIR := $(BUILD_DIR)/ast
AST_OBJS := $(addprefix $(AST_OBJS_DIR)/, $(patsubst %.cpp, %.o, $(notdir $(AST_SOURCE))))
UTIL_SOURCE_DIR := $(PWD)/util
UTIL_SOURCE := $(wildcard $(UTIL_SOURCE_DIR)/*.cpp)
UTIL_OBJS_DIR := $(BUILD_DIR)/util
UTIL_OBJS := $(addprefix $(UTIL_OBJS_DIR)/, $(patsubst %.cpp, %.o, $(notdir $(UTIL_SOURCE))))
BOUNDS_CHECK_SOURCE_DIR := $(abspath ../../../third_party/bounds_checking_function/src)
BOUNDS_CHECK_SOURCE := $(wildcard $(BOUNDS_CHECK_SOURCE_DIR)/*.c)
BOUNDS_CHECK_OBJS_DIR := $(BUILD_DIR)/bounds_checking_function
BOUNDS_CHECK_OBJS := $(addprefix $(BOUNDS_CHECK_OBJS_DIR)/, $(patsubst %.c, %.o, $(notdir $(BOUNDS_CHECK_SOURCE))))
MAIN_SOURCE := $(wildcard *.cpp)
MAIN_OBJS := $(addprefix $(BUILD_DIR)/, $(patsubst %.cpp, %.o, $(MAIN_SOURCE)))
all:$(TARGET)
$(TARGET) : $(BOUNDS_CHECK_OBJS) $(UTIL_OBJS) $(HASH_OBJS) $(AST_OBJS) $(PARSER_OBJS) $(CODEGEN_OBJS) $(METADATA_OBJS) $(MAIN_OBJS)
$(Q) $(CXX) $(CXXFLAGS) $(INCLUDES) $^ -o $@
$(Q) echo $(TARGET):build successful.
$(BUILD_DIR)/%.o : %.cpp
$(Q) mkdir -p $(BUILD_DIR)
$(Q) $(CXX) $(CXXFLAGS) $(INCLUDES) -c $^ -o $@
$(CODEGEN_OBJ_DIR)/%.o : $(CODEGEN_SOURCE_DIR)/%.cpp
$(Q) mkdir -p $(CODEGEN_OBJ_DIR)
$(Q) $(CXX) $(CXXFLAGS) $(INCLUDES) -c $^ -o $@
$(METADATA_OBJ_DIR)/%.o : $(METADATA_SOURCE_DIR)/%.cpp
$(Q) mkdir -p $(METADATA_OBJ_DIR)
$(Q) $(CXX) $(CXXFLAGS) $(INCLUDES) -c $^ -o $@
$(PARSER_OBJS_DIR)/%.o : $(PARSER_SOURCE_DIR)/%.cpp
$(Q) mkdir -p $(PARSER_OBJS_DIR)
$(Q) $(CXX) $(CXXFLAGS) $(INCLUDES) -c $^ -o $@
$(AST_OBJS_DIR)/%.o : $(AST_SOURCE_DIR)/%.cpp
$(Q) mkdir -p $(AST_OBJS_DIR)
$(Q) $(CXX) $(CXXFLAGS) $(INCLUDES) -c $^ -o $@
$(UTIL_OBJS_DIR)/%.o : $(UTIL_SOURCE_DIR)/%.cpp
$(Q) mkdir -p $(UTIL_OBJS_DIR)
$(Q) $(CXX) $(CXXFLAGS) $(INCLUDES) -c $^ -o $@
$(BOUNDS_CHECK_OBJS_DIR)/%.o : $(BOUNDS_CHECK_SOURCE_DIR)/%.c
$(Q) mkdir -p $(BOUNDS_CHECK_OBJS_DIR)
$(Q) $(CXX) $(CXXFLAGS) $(INCLUDES) -c $^ -o $@
clean:
$(Q) rm -rf $(TARGET) $(BUILD_DIR)
.PHONY:all clean
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。