nat: ipfix logging separation & refactor
[vpp.git] / src / plugins / nat / CMakeLists.txt
index a1a0178..47a84cb 100644 (file)
@@ -15,9 +15,11 @@ set(CMAKE_VERBOSE_MAKEFILE ON)
 
 add_vpp_library(nat
   SOURCES
+  lib/ipfix_logging.c
   lib/alloc.c
 
   INSTALL_HEADERS
+  lib/ipfix_logging.h
   lib/alloc.h
 )
 
@@ -29,24 +31,11 @@ add_vpp_plugin(nat
   in2out_ed.c
   out2in.c
   out2in_ed.c
-  nat_ipfix_logging.c
-  nat_det.c
-  nat_det_in2out.c
-  nat_det_out2in.c
   nat_dpo.c
   nat44_cli.c
   nat44_handoff.c
   nat44_hairpinning.c
   nat44_classify.c
-  nat64.c
-  nat64_cli.c
-  nat64_in2out.c
-  nat64_out2in.c
-  nat64_db.c
-  nat66.c
-  nat66_cli.c
-  nat66_in2out.c
-  nat66_out2in.c
   nat_affinity.c
   nat_format.c
   nat_syslog.c
@@ -58,17 +47,12 @@ add_vpp_plugin(nat
   nat44_classify.c
   nat44_hairpinning.c
   nat44_handoff.c
-  nat64_in2out.c
-  nat64_out2in.c
-  nat66_in2out.c
-  nat66_out2in.c
-  nat_det_in2out.c
-  nat_det_out2in.c
   out2in.c
   out2in_ed.c
 
   API_FILES
   nat.api
+  nat_types.api
 
   API_TEST_SOURCES
   nat_test.c
@@ -76,11 +60,12 @@ add_vpp_plugin(nat
   INSTALL_HEADERS
   nat_all_api_h.h
   nat_msg_enum.h
+
+  LINK_LIBRARIES nat
 )
 
 add_vpp_plugin(dslite
   SOURCES
-  nat_format.c
   nat_syslog.c
   dslite/dslite_api.c
   dslite/dslite_dpo.c
@@ -102,3 +87,63 @@ add_vpp_plugin(dslite
 
   LINK_LIBRARIES nat
 )
+
+add_vpp_plugin(nat66
+  SOURCES
+  nat_syslog.c
+  nat66/nat66.c
+  nat66/nat66_cli.c
+  nat66/nat66_api.c
+  nat66/nat66_in2out.c
+  nat66/nat66_out2in.c
+
+  MULTIARCH_SOURCES
+  nat66/nat66_in2out.c
+  nat66/nat66_out2in.c
+
+  API_FILES
+  nat66/nat66.api
+  nat_types.api
+
+  LINK_LIBRARIES nat
+)
+
+add_vpp_plugin(det44
+  SOURCES
+  det44/det44.c
+  det44/det44_cli.c
+  det44/det44_api.c
+  det44/det44_in2out.c
+  det44/det44_out2in.c
+
+  MULTIARCH_SOURCES
+  det44/det44_in2out.c
+  det44/det44_out2in.c
+
+  API_FILES
+  det44/det44.api
+  nat_types.api
+
+  LINK_LIBRARIES nat
+)
+
+add_vpp_plugin(nat64
+  SOURCES
+  nat_syslog.c
+  nat64/nat64.c
+  nat64/nat64_db.c
+  nat64/nat64_cli.c
+  nat64/nat64_api.c
+  nat64/nat64_in2out.c
+  nat64/nat64_out2in.c
+
+  MULTIARCH_SOURCES
+  nat64/nat64_in2out.c
+  nat64/nat64_out2in.c
+
+  API_FILES
+  nat64/nat64.api
+  nat_types.api
+
+  LINK_LIBRARIES nat
+)