1# Copyright (c) 2020 PHYTEC Messtechnik GmbH 2# SPDX-License-Identifier: Apache-2.0 3 4if(CONFIG_MODBUS) 5 zephyr_library() 6 7 zephyr_include_directories(${ZEPHYR_BASE}/subsys/modbus) 8 9 zephyr_library_sources( 10 modbus_core.c 11 ) 12 13 zephyr_library_sources_ifdef( 14 CONFIG_MODBUS_SERIAL 15 modbus_serial.c 16 ) 17 18 zephyr_library_sources_ifdef( 19 CONFIG_MODBUS_RAW_ADU 20 modbus_raw.c 21 ) 22 23 zephyr_library_sources_ifdef( 24 CONFIG_MODBUS_SERVER 25 modbus_server.c 26 ) 27 28 zephyr_library_sources_ifdef( 29 CONFIG_MODBUS_CLIENT 30 modbus_client.c 31 ) 32endif() 33