1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright (C) 2022 Intel Corporation. 3# All rights reserved. 4# 5 6SPDK_ROOT_DIR := $(abspath $(CURDIR)/..) 7include $(SPDK_ROOT_DIR)/mk/spdk.common.mk 8 9# Location where the python generated code is placed 10pydir=$(SPDK_ROOT_DIR)/python/spdk/sma/proto 11protodefs = $(wildcard *.proto) 12protopy = $(foreach proto,$(basename $(protodefs)),$(addprefix $(pydir)/$(proto),_pb2.py _pb2_grpc.py)) 13 14all: $(protopy) 15 16clean: 17 $(Q)$(RM) $(protopy) 18 19install: 20uninstall: 21 22$(pydir)/%_pb2.py $(pydir)/%_pb2_grpc.py: %.proto 23 $(Q)python3 -m grpc_tools.protoc --proto_path=. --python_out=$(pydir) \ 24 --grpc_python_out=$(pydir) $^ 25 26.PHONY: all clean install uninstall 27