加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile.uk 17.50 KB
一键复制 编辑 原始数据 按行查看 历史
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 The TenonOS Authors
#
# 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.
################################################################################
# Library registration
################################################################################
$(eval $(call addlib_s,libpython_tflite_support,$(CONFIG_LIBPYTHON_TFLITE_SUPPORT)))
################################################################################
# Sources
################################################################################
LIBPYTHON_TFLITE_SUPPORT_VERSION=0.4.4
LIBPYTHON_TFLITE_SUPPORT_URL=https://github.com/tensorflow/tflite-support/archive/refs/tags/v$(LIBPYTHON_TFLITE_SUPPORT_VERSION).tar.gz
ifeq ($(CONFIG_LIBPYTHON_TFLITE_SUPPORT), y)
$(eval $(call fetch,libpython_tflite_support,$(LIBPYTHON_TFLITE_SUPPORT_URL)))
endif
$(LIBPYTHON_TFLITE_SUPPORT_BUILD)/.compiled: $(LIBPYTHON_TFLITE_SUPPORT_BUILD)/.origin
@if [ ! -f "$(LIBPYTHON_TFLITE_SUPPORT_BUILD)/.compiled" ]; then \
sh $(LIBPYTHON_TFLITE_SUPPORT_BASE)/scripts/generate.sh \
$(LIBPYTHON_TFLITE_SUPPORT_ORIGIN) $(LIBPYTHON_TFLITE_SUPPORT_VERSION) $(LIBPYTHON_TFLITE_SUPPORT_BASE); \
fi
UK_PREPARE += $(LIBPYTHON_TFLITE_SUPPORT_BUILD)/.compiled
################################################################################
# Helpers
################################################################################
LIBPYTHON_TFLITE_SUPPORT_SUBDIR=tflite-support-$(LIBPYTHON_TFLITE_SUPPORT_VERSION)
LIBPYTHON_TFLITE_SUPPORT_SRC = $(LIBPYTHON_TFLITE_SUPPORT_ORIGIN)/$(LIBPYTHON_TFLITE_SUPPORT_SUBDIR)
LIBPYTHON_TFLITE_SUPPORT_BSRC = $(LIBPYTHON_TFLITE_SUPPORT_SRC)/generated/
################################################################################
# Library includes
################################################################################
CXXINCLUDES-$(CONFIG_LIBPYTHON_TFLITE_SUPPORT) += -I$(LIBPYTHON_TFLITE_SUPPORT_SRC)
CXXINCLUDES-$(CONFIG_LIBPYTHON_TFLITE_SUPPORT) += -I$(LIBPYTHON_TFLITE_SUPPORT_BSRC)
CINCLUDES-$(CONFIG_LIBPYTHON_TFLITE_SUPPORT) += -I$(LIBPYTHON_TFLITE_SUPPORT_SRC)
CINCLUDES-$(CONFIG_LIBPYTHON_TFLITE_SUPPORT) += -I$(LIBPYTHON_TFLITE_SUPPORT_BSRC)
################################################################################
# Global flags
################################################################################
GCC_INSTALLDIR_FLAGS := -idirafter $(shell LC_ALL=C $(CC) -v 2>&1 | \
$(SED) -e '/^COLLECT_LTO_WRAPPER=\(.*\)\/lto-wrapper/!d' -e 's//\1/')/include
ifeq ($(CONFIG_ARCH_X86_64), y)
LIBPYTHON_TFLITE_SUPPORT_CFLAGS-$(CONFIG_ARCH_X86_64) += $(GCC_INSTALLDIR_FLAGS)
LIBPYTHON_TFLITE_SUPPORT_CXXFLAGS-$(CONFIG_ARCH_X86_64) += $(GCC_INSTALLDIR_FLAGS)
endif
ifeq ($(CONFIG_ARCH_ARM_64), y)
LIBPYTHON_TFLITE_SUPPORT_CFLAGS-$(CONFIG_ARCH_ARM_64) += $(GCC_INSTALLDIR_FLAGS)
LIBPYTHON_TFLITE_SUPPORT_CXXFLAGS-$(CONFIG_ARCH_ARM_64) += $(GCC_INSTALLDIR_FLAGS)
endif
################################################################################
# Library sources
################################################################################
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/port/default/tflite_wrapper.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/image_searcher.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/image_segmenter.cc|cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/image_classifier.cc|cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/object_detector.cc|cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/image_embedder.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/core/label_map_item.cc|vision
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/core/frame_buffer.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/core/classification_head.cc|vision
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/utils/score_calibration.cc|vision
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/utils/frame_buffer_common_utils.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/utils/image_tensor_specs.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/utils/libyuv_frame_buffer_utils.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/utils/frame_buffer_utils.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/vision/utils/image_utils.cc|vision
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/processor/embedding_searcher.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/processor/classification_postprocessor.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/processor/image_preprocessor.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/processor/search_postprocessor.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/processor/embedding_postprocessor.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/processor/processor.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/core/score_calibration.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/core/label_map_item.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/core/task_api_factory.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/core/error_reporter.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/core/task_utils.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/core/external_file_handler.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/core/tflite_engine.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/task/core/classification_head.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/cc/common.cc|cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/scann_ondevice/cc/index_builder.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/scann_ondevice/cc/index.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/scann_ondevice/cc/mem_writable_file.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/scann_ondevice/cc/python/index_builder_py_wrapper.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/scann_ondevice/cc/mem_random_access_file.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/scann_ondevice/cc/core/indexer.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/scann_ondevice/cc/core/searcher.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/scann_ondevice/cc/core/partitioner.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/scann_ondevice/cc/core/processor.cc|scann_ondevice
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/metadata/cc/metadata_populator.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/metadata/cc/metadata_extractor.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/metadata/cc/python/metadata_version.cc|python
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/metadata/cc/metadata_version.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/metadata/flatbuffers_lib/flatbuffers_lib.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/python/task/vision/core/pybinds/image_utils.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/python/task/vision/pybinds/_pywrap_object_detector.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/python/task/vision/pybinds/_pywrap_image_searcher.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/python/task/vision/pybinds/_pywrap_image_embedder.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/python/task/vision/pybinds/_pywrap_image_classifier.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/python/task/vision/pybinds/_pywrap_image_segmenter.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/python/task/core/pybinds/task_utils.cc|pybinds
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/c/common_utils.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/c/task/vision/image_segmenter.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/c/task/vision/image_classifier.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/c/task/vision/object_detector.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/c/task/vision/utils/frame_buffer_cpp_c_utils.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/c/task/processor/detection_result.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/c/task/processor/classification_result.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/c/task/processor/segmentation_result.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/c/task/processor/category.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/c/task/processor/utils/classification_options_utils.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/c/task/core/utils/base_options_utils.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_SRC)/tensorflow_lite_support/c/common.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/vision/proto/image_classifier_options.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/vision/proto/embeddings.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/vision/proto/classifications.pb.cc|vision
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/vision/proto/image_segmenter_options.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/vision/proto/segmentations.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/vision/proto/bounding_box.pb.cc|vision
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/vision/proto/object_detector_options.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/vision/proto/image_embedder_options.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/vision/proto/detections.pb.cc|vison
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/vision/proto/class.pb.cc|vision
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/vision/proto/image_searcher_options.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/clu.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/embedding.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/classifications.pb.cc|processor
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/classification_options.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/search_result.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/detection_options.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/bounding_box.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/qa_answers.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/detections.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/class.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/clu_annotation_options.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/search_options.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/embedding_options.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/processor/proto/segmentation_options.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/core/proto/classifications.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/core/proto/base_options.pb.cc|cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/core/proto/class.pb.cc|cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/cc/task/core/proto/external_file.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/scann_ondevice/cc/core/serialized_searcher.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/scann_ondevice/proto/index_config.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow_lite_support/python/task/core/proto/base_options.pb.cc
LIBPYTHON_TFLITE_SUPPORT_SRCS-y += $(LIBPYTHON_TFLITE_SUPPORT_BSRC)/tensorflow/lite/experimental/acceleration/configuration/configuration.pb.cc
################################################################################
# Root filesystem
################################################################################
ifeq ($(CONFIG_LIBPYTHON_TFLITE_SUPPORT),y)
# Install tflite-support lib into main python rootfs & cleanup non-python files
$(PYTHON_ROOTFS)/.tflite_support_done: $(PYTHON_ROOTFS)/.keep
. $(PYTHON_ROOTFS)/bin/activate && pip install tflite-support==0.4.4
_dir=`find "$(PYTHON_ROOTFS)" -maxdepth 4 -type d -name tensorflow_lite_support`; \
find "$$_dir" -type f -name '*.so' -delete; \
find "$$_dir" -type d -name '__pycache__' | xargs rm -rf; \
find "$$_dir" -type f | grep -v '\.py$$' | tr "\n" "\0" | xargs -0 rm; \
find "$(LIBPYTHON_TFLITE_SUPPORT_BASE)/importfix/tensorflow_lite_support" -mindepth 1 -maxdepth 3 | xargs $(CP) -rp -t "$$_dir"; \
_dir=`find "$(PYTHON_ROOTFS)" -maxdepth 4 -type d -name tflite_support`; \
find "$$_dir" -type f -name '*.so' -delete; \
find "$$_dir" -type d -name '__pycache__' | xargs rm -rf; \
find "$$_dir" -type f | grep -v '\.py$$' | tr "\n" "\0" | xargs -0 rm; \
$(CP) "$(LIBPYTHON_TFLITE_SUPPORT_BASE)/sourcefix/tflite_support/task/__init__.py" "$$_dir/task"
touch $@
# Add numpy rootfs to main python
python-rootfs: $(PYTHON_ROOTFS)/.tflite_support_done
endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化