Skip to content

Commit fa15266

Browse files
committed
Support libmctp as a zephyr module
Signed-off-by: Tom Burdick <[email protected]>
1 parent 2f1a1f6 commit fa15266

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

zephyr/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (c) 2024 Intel Corporation.
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
set(MCTP_SRC ${CMAKE_CURRENT_SOURCE_DIR}/..)
6+
7+
zephyr_interface_library_named(mctp)
8+
target_link_libraries(zephyr_interface INTERFACE mctp)
9+
target_include_directories(mctp INTERFACE ${MCTP_SRC})
10+
11+
zephyr_library_named(modules_mctp)
12+
zephyr_library_link_libraries(mctp)
13+
14+
zephyr_library_sources_ifdef(
15+
CONFIG_MCTP
16+
${MCTP_SRC}/alloc.c
17+
${MCTP_SRC}/crc32.c
18+
${MCTP_SRC}/core.c
19+
${MCTP_SRC}/log.c
20+
${MCTP_SRC}/libmctp.h
21+
${MCTP_SRC}/crc-16-ccitt.c
22+
)

zephyr/module.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: libmctp
2+
build:
3+
cmake: zephyr

0 commit comments

Comments
 (0)