summaryrefslogtreecommitdiffstats
path: root/src/plugins/dev_octeon/CMakeLists.txt
blob: b7c25fe0404e753f145c7bc0adbae39132e9fa6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# SPDX-License-Identifier: Apache-2.0
# Copyright(c) 2022 Cisco Systems, Inc.

if (NOT VPP_PLATFORM_NAME STREQUAL "octeon10")
  return()
endif()

# Find OCTEON roc files
vpp_find_path(OCTEON_ROC_DIR PATH_SUFFIXES octeon-roc NAMES platform.h)
vpp_plugin_find_library(dev-octeon OCTEON_ROC_LIB "libocteon-roc.a")

if (NOT OCTEON_ROC_DIR)
  message("OCTEON ROC files not found - Marvell OCTEON device plugin disabled")
  return()
endif()

if (NOT OCTEON_ROC_LIB)
  message("OCTEON ROC library (libocteon-roc.a) not found - Marvell OCTEON device plugin disabled")
  return ()
endif()

include_directories (${OCTEON_ROC_DIR}/)

add_vpp_plugin(dev_octeon
  SOURCES
  init.c
  format.c
  port.c
  queue.c
  roc_helper.c
  rx_node.c
  tx_node.c

  MULTIARCH_SOURCES
  rx_node.c
  tx_node.c

  LINK_LIBRARIES
  ${OCTEON_ROC_LIB}
)