1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14separate_arguments(GENERATED_CROSS_VALUES_HEADERS) 15 16get_target_property(ENTRYPOINT_YAML_FILES entrypoints_yaml_gen ENTRYPOINT_YAML_FILES) 17 18set(GEN_ENTRYPOINTS_YAML ${PANDA_BINARY_ROOT}/runtime/entrypoints.yaml) 19add_custom_command(OUTPUT ${GEN_ENTRYPOINTS_YAML} 20 COMMENT "Merge yaml files: ${ENTRYPOINT_YAML_FILES}" 21 COMMAND ${PANDA_ROOT}/templates/concat_yamls.sh "${GEN_ENTRYPOINTS_YAML}" ${ENTRYPOINT_YAML_FILES} 22 DEPENDS ${ENTRYPOINT_YAML_FILES} 23) 24add_custom_target(entrypoints_yaml_merge DEPENDS ${GEN_ENTRYPOINTS_YAML}) 25 26panda_gen(DATA ${GEN_ENTRYPOINTS_YAML} 27 TARGET_NAME entrypoints_gen 28 TEMPLATES 29 entrypoints_gen.h.erb 30 entrypoints_gen.S.erb 31 entrypoints_compiler.inl.erb 32 SOURCE ${PANDA_ROOT}/runtime/entrypoints 33 DESTINATION ${PANDA_BINARY_ROOT}/runtime/include 34 REQUIRES 35 ${PANDA_ROOT}/templates/common.rb 36 ${PANDA_ROOT}/runtime/entrypoints/entrypoints.rb 37 EXTRA_DEPENDENCIES entrypoints_yaml_merge 38) 39 40panda_gen(DATA ${GEN_ENTRYPOINTS_YAML} 41 TARGET_NAME entrypoints_compiler_checksum_gen 42 TEMPLATES 43 entrypoints_compiler_checksum.inl.erb 44 SOURCE ${PANDA_ROOT}/runtime/entrypoints 45 DESTINATION ${PANDA_BINARY_ROOT}/runtime/include 46 REQUIRES 47 ${PANDA_ROOT}/templates/common.rb 48 ${PANDA_ROOT}/runtime/entrypoints/entrypoints.rb 49 EXTRA_DEPENDENCIES cross_values_generator ${GENERATED_CROSS_VALUES_HEADERS} 50 EXTRA_ARGV ${PANDA_BINARY_ROOT}/cross_values 51) 52