octeon: native driver for Marvell Octeon SoC
[vpp.git] / src / plugins / dev_octeon / CMakeLists.txt
1 # SPDX-License-Identifier: Apache-2.0
2 # Copyright(c) 2022 Cisco Systems, Inc.
3
4 if (NOT VPP_PLATFORM_NAME STREQUAL "octeon10")
5   return()
6 endif()
7
8 # Find OCTEON roc files
9 vpp_find_path(OCTEON_ROC_DIR PATH_SUFFIXES octeon-roc NAMES platform.h)
10 vpp_plugin_find_library(dev-octeon OCTEON_ROC_LIB "libocteon-roc.a")
11
12 if (NOT OCTEON_ROC_DIR)
13   message("OCTEON ROC files not found - Marvell OCTEON device plugin disabled")
14   return()
15 endif()
16
17 if (NOT OCTEON_ROC_LIB)
18   message("OCTEON ROC library (libocteon-roc.a) not found - Marvell OCTEON device plugin disabled")
19   return ()
20 endif()
21
22 include_directories (${OCTEON_ROC_DIR}/)
23
24 add_vpp_plugin(dev_octeon
25   SOURCES
26   init.c
27   format.c
28   port.c
29   queue.c
30   roc_helper.c
31   rx_node.c
32   tx_node.c
33
34   MULTIARCH_SOURCES
35   rx_node.c
36   tx_node.c
37
38   LINK_LIBRARIES
39   ${OCTEON_ROC_LIB}
40 )
41