diff options
author | Damjan Marion <damarion@cisco.com> | 2018-07-30 12:45:07 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-08-17 22:14:39 +0000 |
commit | 612dd6a955e44d2c0fed1801fb8de585ca695c63 (patch) | |
tree | a49c3004a7122077a884dce483daebc280199761 /src/plugins | |
parent | 5d82d2f1495e189c4687a6462850cbbb3ea38b17 (diff) |
CMake as an alternative to autotools (experimental)
Change-Id: Ibc59323e849810531dd0963e85493efad3b86857
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins')
32 files changed, 885 insertions, 0 deletions
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt new file mode 100644 index 00000000000..34d956d4f77 --- /dev/null +++ b/src/plugins/CMakeLists.txt @@ -0,0 +1,63 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +include_directories ( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +) + +macro(add_vpp_plugin plugin_name) + set(api_headers) + foreach(f ${ARGN}) + if(${f} MATCHES ".*\.api$") + vpp_generate_api_header(${f}) + list(APPEND api_headers ${f}.h) + endif() + endforeach() + add_library(${plugin_name} SHARED ${ARGN} ${api_headers}) + add_dependencies(${plugin_name} vpp_version_h api_headers) + set_target_properties(${plugin_name} PROPERTIES + PREFIX "" + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/vpp_plugins) + install(TARGETS ${plugin_name} DESTINATION lib/vpp_plugins COMPONENT plugins) +endmacro() + +macro(add_vpp_api_test_plugin plugin_name) + set(api_headers) + foreach(f ${ARGN}) + if(${f} MATCHES ".*\.api$") + vpp_generate_api_header(${f}) + list(APPEND api_headers ${f}.h) + endif() + endforeach() + add_library(${plugin_name} SHARED ${ARGN} ${api_headers}) + add_dependencies(${plugin_name} api_headers) + set_target_properties(${plugin_name} PROPERTIES PREFIX "") + set_target_properties(${plugin_name} PROPERTIES + PREFIX "" + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}//vpp_api_test_plugins) + install(TARGETS ${plugin_name} DESTINATION lib/vpp_api_test_plugins COMPONENT + plugins) +endmacro() + +############################################################################## +# find and add all plugin subdirs +############################################################################ +FILE(GLOB files RELATIVE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*/CMakeLists.txt +) +foreach (f ${files}) + get_filename_component(dir ${f} DIRECTORY) + add_subdirectory(${dir}) +endforeach() diff --git a/src/plugins/abf/CMakeLists.txt b/src/plugins/abf/CMakeLists.txt new file mode 100644 index 00000000000..2bb90e272ee --- /dev/null +++ b/src/plugins/abf/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(abf_plugin + abf.api + abf_api.c + abf_itf_attach.c + abf_policy.c +) diff --git a/src/plugins/acl/CMakeLists.txt b/src/plugins/acl/CMakeLists.txt new file mode 100644 index 00000000000..2040522affd --- /dev/null +++ b/src/plugins/acl/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(acl_plugin + acl.api + acl.c + hash_lookup.c + lookup_context.c + sess_mgmt_node.c + dataplane_node.c +) diff --git a/src/plugins/avf/CMakeLists.txt b/src/plugins/avf/CMakeLists.txt new file mode 100644 index 00000000000..8f8798bc8ed --- /dev/null +++ b/src/plugins/avf/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(avf_plugin + cli.c + device.c + format.c + input.c + output.c + plugin.c + avf_api.c + avf.api +) + +vpp_library_set_multiarch_sources(avf_plugin + input.c + output.c +) diff --git a/src/plugins/cdp/CMakeLists.txt b/src/plugins/cdp/CMakeLists.txt new file mode 100644 index 00000000000..036833f5315 --- /dev/null +++ b/src/plugins/cdp/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(cdp_plugin + cdp.api + cdp.c + cdp_input.c + cdp_node.c + cdp_periodic.c +) + +add_vpp_api_test_plugin(cdp_test_plugin + cdp.api + cdp_test.c +) + diff --git a/src/plugins/dpdk/CMakeLists.txt b/src/plugins/dpdk/CMakeLists.txt new file mode 100644 index 00000000000..e1494492628 --- /dev/null +++ b/src/plugins/dpdk/CMakeLists.txt @@ -0,0 +1,100 @@ +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +############################################################################## +# Find lib and include files +############################################################################## +find_path(DPDK_INCLUDE_DIR PATH_SUFFIXES dpdk NAMES rte_config.h HINTS + ${DPDK_INCLUDE_DIR_HINT}) +find_library(DPDK_LIB NAMES libdpdk.a HINTS ${DPDK_LIB_DIR_HINT}) + +############################################################################## +# Find DPDK Version +############################################################################## +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dpdk_version.c +" +#include <stdio.h> +#include <rte_version.h> +int main() +{ + puts(strchr(rte_version(), ' ') + 1); + return 0; +} +") + +try_compile(DPDK_VERSION_COMPILED + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/dpdk_version.c + CMAKE_FLAGS + -DINCLUDE_DIRECTORIES=${DPDK_INCLUDE_DIR} + COPY_FILE ${CMAKE_CURRENT_BINARY_DIR}/dpdk_version.bin +) + +if(DPDK_VERSION_COMPILED) + execute_process( + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ./dpdk_version.bin + OUTPUT_VARIABLE DPDK_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +endif() + +file(REMOVE + ${CMAKE_CURRENT_BINARY_DIR}/dpdk_version.c + ${CMAKE_CURRENT_BINARY_DIR}/dpdk_version.bin +) + + +############################################################################## +# DPDK plugin +############################################################################## +if(DPDK_INCLUDE_DIR AND DPDK_LIB) + include_directories (${DPDK_INCLUDE_DIR}) + add_vpp_plugin(dpdk_plugin + buffer.c + main.c + thread.c + api/dpdk_api.c + api/dpdk_test.c + device/cli.c + device/common.c + device/device.c + device/flow.c + device/format.c + device/init.c + device/node.c + hqos/hqos.c + ipsec/cli.c + ipsec/crypto_node.c + ipsec/esp_decrypt.c + ipsec/esp_encrypt.c + ipsec/ipsec.c + api/dpdk.api + ) + + vpp_library_set_multiarch_sources(dpdk_plugin + buffer.c + device/device.c + device/node.c + ) + + get_filename_component(DPDK_LIB_DIR ${DPDK_LIB} DIRECTORY) + set(DPDK_LINK_FLAGS "-L${DPDK_LIB_DIR} -Wl,--whole-archive,${DPDK_LIB},--no-whole-archive") + set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,--exclude-libs,libIPSec_MB.a,-l:libIPSec_MB.a") + set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lnuma") + set_target_properties(dpdk_plugin PROPERTIES LINK_FLAGS "${DPDK_LINK_FLAGS}") + message("-- Found DPDK ${DPDK_VERSION}: ${DPDK_INCLUDE_DIR} ${DPDK_LIB}") +else() + message("-- DPDK not found - dpdk_plugin disabled") +endif() + diff --git a/src/plugins/flowprobe/CMakeLists.txt b/src/plugins/flowprobe/CMakeLists.txt new file mode 100644 index 00000000000..df803a8d668 --- /dev/null +++ b/src/plugins/flowprobe/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(flowprobe_plugin + flowprobe.api + flowprobe.c + node.c +) + +add_vpp_api_test_plugin(flowprobe_test_plugin + flowprobe.api + flowprobe_test.c +) + diff --git a/src/plugins/gbp/CMakeLists.txt b/src/plugins/gbp/CMakeLists.txt new file mode 100644 index 00000000000..a9e9bd62692 --- /dev/null +++ b/src/plugins/gbp/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(gbp_plugin + gbp.api + gbp_subnet.c + gbp_contract.c + gbp_endpoint.c + gbp_endpoint_group.c + gbp_classify.c + gbp_recirc.c + gbp_policy.c + gbp_policy_dpo.c + gbp_fwd.c + gbp_fwd_dpo.c + gbp_api.c +) diff --git a/src/plugins/gtpu/CMakeLists.txt b/src/plugins/gtpu/CMakeLists.txt new file mode 100644 index 00000000000..1633d43cc31 --- /dev/null +++ b/src/plugins/gtpu/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(gtpu_plugin + gtpu.api + gtpu.c + gtpu_api.c + gtpu_decap.c + gtpu_encap.c +) + +add_vpp_api_test_plugin(gtpu_test_plugin + gtpu.api + gtpu_test.c +) + diff --git a/src/plugins/igmp/CMakeLists.txt b/src/plugins/igmp/CMakeLists.txt new file mode 100644 index 00000000000..a3f976cbc57 --- /dev/null +++ b/src/plugins/igmp/CMakeLists.txt @@ -0,0 +1,29 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(igmp_plugin + igmp.api + igmp.c + igmp_query.c + igmp_report.c + igmp_group.c + igmp_src.c + igmp_config.c + igmp_cli.c + igmp_api.c + igmp_input.c + igmp_timer.c + igmp_pkt.c + igmp_ssm_range.c + igmp_format.c +) diff --git a/src/plugins/ila/CMakeLists.txt b/src/plugins/ila/CMakeLists.txt new file mode 100644 index 00000000000..2aa1892cf47 --- /dev/null +++ b/src/plugins/ila/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(ila_plugin ila.c) + diff --git a/src/plugins/ioam/CMakeLists.txt b/src/plugins/ioam/CMakeLists.txt new file mode 100644 index 00000000000..ed8bd196aba --- /dev/null +++ b/src/plugins/ioam/CMakeLists.txt @@ -0,0 +1,99 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(ioam_plugin + # iOAM Proof of Transit + lib-pot/pot.api + lib-pot/pot_util.c + encap/ip6_ioam_pot.c + lib-pot/pot_api.c + + # iOAM trace export for IPv6 + export/ioam_export.api + export/ioam_export.c + export/node.c + export/ioam_export_thread.c + + # iOAM Trace + lib-trace/trace.api + lib-trace/trace_util.c + encap/ip6_ioam_trace.c + lib-trace/trace_api.c + + # VxLAN-GPE + lib-vxlan-gpe/ioam_vxlan_gpe.api + lib-vxlan-gpe/ioam_encap.c + lib-vxlan-gpe/ioam_decap.c + lib-vxlan-gpe/ioam_transit.c + lib-vxlan-gpe/ioam_pop.c + lib-vxlan-gpe/vxlan_gpe_api.c + lib-vxlan-gpe/vxlan_gpe_ioam_trace.c + lib-vxlan-gpe/vxlan_gpe_ioam.c + export-vxlan-gpe/vxlan_gpe_ioam_export.api + export-vxlan-gpe/vxlan_gpe_ioam_export.c + export-vxlan-gpe/vxlan_gpe_node.c + export-vxlan-gpe/vxlan_gpe_ioam_export_thread.c + + # iOAM E2E + encap/ip6_ioam_e2e.c + encap/ip6_ioam_seqno.c + lib-e2e/ioam_seqno_lib.c + + # ipfix collector + ipfixcollector/ipfixcollector.c + ipfixcollector/node.c + + # iOAM Analyse + analyse/ip6/ip6_ioam_analyse.c + analyse/ip6/node.c + analyse/ioam_summary_export.c + + # iOAM record cache and rewrite + ip6/ioam_cache.api + ip6/ioam_cache.c + ip6/ioam_cache_node.c + ip6/ioam_cache_tunnel_select_node.c + + # udp ping + udp-ping/udp_ping.api + udp-ping/udp_ping_node.c + udp-ping/udp_ping_util.c + udp-ping/udp_ping_export.c + udp-ping/udp_ping_api.c +) + +add_vpp_api_test_plugin(ioam_pot_test_plugin + lib-pot/pot.api + lib-pot/pot_test.c +) + +add_vpp_api_test_plugin(ioam_export_test_plugin + export/ioam_export.api + export/ioam_export_test.c +) + +add_vpp_api_test_plugin(ioam_trace_test_plugin + lib-trace/trace.api + lib-trace/trace_test.c +) + +add_vpp_api_test_plugin(ioam_vxlan_gpe_test_plugin + lib-vxlan-gpe/ioam_vxlan_gpe.api + lib-vxlan-gpe/vxlan_gpe_test.c +) + +add_vpp_api_test_plugin(ioam_udp_ping_test_plugin + udp-ping/udp_ping.api + udp-ping/udp_ping_test.c +) + diff --git a/src/plugins/ixge/CMakeLists.txt b/src/plugins/ixge/CMakeLists.txt new file mode 100644 index 00000000000..bd3454d3de8 --- /dev/null +++ b/src/plugins/ixge/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(ixge_plugin + ixge.c +) diff --git a/src/plugins/l2e/CMakeLists.txt b/src/plugins/l2e/CMakeLists.txt new file mode 100644 index 00000000000..ba9cc6a5cbd --- /dev/null +++ b/src/plugins/l2e/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(l2e_plugin + l2e.api + l2e_api.c + l2e.c +) diff --git a/src/plugins/lacp/CMakeLists.txt b/src/plugins/lacp/CMakeLists.txt new file mode 100644 index 00000000000..0bd79e9800a --- /dev/null +++ b/src/plugins/lacp/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(lacp_plugin + lacp.api + lacp.c + lacp_api.c + selection.c + rx_machine.c + tx_machine.c + mux_machine.c + ptx_machine.c + cli.c + input.c + node.c +) + +add_vpp_api_test_plugin(lacp_test_plugin + lacp.api + lacp_test.c +) + diff --git a/src/plugins/lb/CMakeLists.txt b/src/plugins/lb/CMakeLists.txt new file mode 100644 index 00000000000..4df9dae4a08 --- /dev/null +++ b/src/plugins/lb/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(lb_plugin + lb.api + api.c + cli.c + lb.c + node.c + util.c +) + +add_vpp_api_test_plugin(lb_test_plugin + lb.api + lb_test.c +) + diff --git a/src/plugins/mactime/CMakeLists.txt b/src/plugins/mactime/CMakeLists.txt new file mode 100644 index 00000000000..5f82f4c0fb9 --- /dev/null +++ b/src/plugins/mactime/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(mactime_plugin + mactime.api + mactime.c + node.c +) + +add_vpp_api_test_plugin(mactime_test_plugin + mactime.api + mactime_test.c +) + diff --git a/src/plugins/map/CMakeLists.txt b/src/plugins/map/CMakeLists.txt new file mode 100644 index 00000000000..1dc1bedb51c --- /dev/null +++ b/src/plugins/map/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(map_plugin + map.api + ip4_map.c + ip4_map_t.c + ip6_map.c + ip6_map_t.c + map_api.c + map.c + map_dpo.c +) diff --git a/src/plugins/examples/gen-rules.py b/src/plugins/map/examples/gen-rules.py index 7964aa9a359..7964aa9a359 100755 --- a/src/plugins/examples/gen-rules.py +++ b/src/plugins/map/examples/gen-rules.py diff --git a/src/plugins/examples/health_check.c b/src/plugins/map/examples/health_check.c index 5f0d85fec08..5f0d85fec08 100644 --- a/src/plugins/examples/health_check.c +++ b/src/plugins/map/examples/health_check.c diff --git a/src/plugins/examples/test_map.py b/src/plugins/map/examples/test_map.py index 21388d49526..21388d49526 100755 --- a/src/plugins/examples/test_map.py +++ b/src/plugins/map/examples/test_map.py diff --git a/src/plugins/marvell/CMakeLists.txt b/src/plugins/marvell/CMakeLists.txt new file mode 100644 index 00000000000..283a1aa000d --- /dev/null +++ b/src/plugins/marvell/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +message("-- Looking for Marvell musdk") +find_path(MUSDK_INCLUDE_DIR NAMES marvell/pp2/pp2.h) +find_library(MUSDK_LIB NAMES musdk) + +if(MUSDK_INCLUDE_DIR AND MUSDK_LIB) + add_vpp_plugin(marvell_plugin + marvell.api + plugin.c + pp2/cli.c + pp2/format.c + pp2/input.c + pp2/output.c + pp2/pp2.c + ) + include_directories(${MUSDK_INCLUDE_DIR}) + message("-- Looking for Marvell musdk - found") +else() + message("-- Looking for Marvell musdk - not found - marvell_plugin disabled") +endif() diff --git a/src/plugins/memif/CMakeLists.txt b/src/plugins/memif/CMakeLists.txt new file mode 100644 index 00000000000..54d0befe29e --- /dev/null +++ b/src/plugins/memif/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(memif_plugin + memif.api + memif.c + memif_api.c + cli.c + node.c + device.c + socket.c +) + +vpp_library_set_multiarch_sources(memif_plugin + device.c + node.c +) diff --git a/src/plugins/nat/CMakeLists.txt b/src/plugins/nat/CMakeLists.txt new file mode 100644 index 00000000000..931fa2c7984 --- /dev/null +++ b/src/plugins/nat/CMakeLists.txt @@ -0,0 +1,41 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(nat_plugin + nat.api + nat.c + nat_api.c + in2out.c + out2in.c + nat_ipfix_logging.c + nat_det.c + nat_reass.c + nat_dpo.c + nat44_cli.c + nat64.c + nat64_cli.c + nat64_in2out.c + nat64_out2in.c + nat64_db.c + dslite_dpo.c + dslite.c + dslite_in2out.c + dslite_out2in.c + dslite_cli.c + dslite_ce_encap.c + dslite_ce_decap.c + nat66.c + nat66_cli.c + nat66_in2out.c + nat66_out2in.c +) diff --git a/src/plugins/pppoe/CMakeLists.txt b/src/plugins/pppoe/CMakeLists.txt new file mode 100644 index 00000000000..fca210211db --- /dev/null +++ b/src/plugins/pppoe/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(pppoe_plugin + pppoe.api + pppoe_api.c + pppoe.c + pppoe_cp.c + pppoe_cp_node.c + pppoe_decap.c +) + +add_vpp_api_test_plugin(pppoe_test_plugin + pppoe.api + pppoe_test.c +) + diff --git a/src/plugins/srv6-ad/CMakeLists.txt b/src/plugins/srv6-ad/CMakeLists.txt new file mode 100644 index 00000000000..29959a150b4 --- /dev/null +++ b/src/plugins/srv6-ad/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(srv6ad_plugin + ad.c + node.c +) diff --git a/src/plugins/srv6-am/CMakeLists.txt b/src/plugins/srv6-am/CMakeLists.txt new file mode 100644 index 00000000000..995db98b47d --- /dev/null +++ b/src/plugins/srv6-am/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(srv6am_plugin + am.c + node.c +) diff --git a/src/plugins/srv6-as/CMakeLists.txt b/src/plugins/srv6-as/CMakeLists.txt new file mode 100644 index 00000000000..42b23f3ecf5 --- /dev/null +++ b/src/plugins/srv6-as/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(srv6as_plugin + as.c + node.c +) diff --git a/src/plugins/stn/CMakeLists.txt b/src/plugins/stn/CMakeLists.txt new file mode 100644 index 00000000000..c29cf5f0c5c --- /dev/null +++ b/src/plugins/stn/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(stn_plugin + stn.api + stn.c + stn_api.c +) + +add_vpp_api_test_plugin(stn_test_plugin + stn.api + stn_test.c +) + diff --git a/src/plugins/tlsmbedtls/CMakeLists.txt b/src/plugins/tlsmbedtls/CMakeLists.txt new file mode 100644 index 00000000000..af77c248cb3 --- /dev/null +++ b/src/plugins/tlsmbedtls/CMakeLists.txt @@ -0,0 +1,30 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +message("-- Looking for mbedTLS") +find_path(MBEDTLS_INCLUDE_DIR NAMES mbedtls/ssl.h) +find_library(MBEDTLS_LIB1 NAMES mbedtls) +find_library(MBEDTLS_LIB2 NAMES mbedx509) +find_library(MBEDTLS_LIB3 NAMES mbedcrypto) + +set (MBEDTLS_LIB ${MBEDTLS_LIB1} ${MBEDTLS_LIB2} ${MBEDTLS_LIB3}) + +if(MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIB) + include_directories(${MBEDTLS_INCLUDE_DIR}) + add_vpp_plugin(tlsmbedtls_plugin tls_mbedtls.c) + target_link_libraries(tlsmbedtls_plugin ${MBEDTLS_LIB}) + message("-- Found mbedTLS: ${MBEDTLS_INCLUDE_DIR} ${MBEDTLS_LIB}") +else() + message("-- mbedTLS not found - tlsmbedtls_plugin disabled") +endif() + diff --git a/src/plugins/tlsopenssl/CMakeLists.txt b/src/plugins/tlsopenssl/CMakeLists.txt new file mode 100644 index 00000000000..7659cc0feaf --- /dev/null +++ b/src/plugins/tlsopenssl/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if(OPENSSL_FOUND) + add_vpp_plugin(tlsopenssl_plugin tls_openssl.c tls_async.c) + target_link_libraries(tlsopenssl_plugin ${OPENSSL_LIBRARIES}) +endif() + diff --git a/src/plugins/unittest/CMakeLists.txt b/src/plugins/unittest/CMakeLists.txt new file mode 100644 index 00000000000..eba6e230d16 --- /dev/null +++ b/src/plugins/unittest/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_vpp_plugin(unittest_plugin + unittest.c + tcp_test.c + bihash_test.c +) |