api: split api generated files

Split generation of API message enum and the typedefs into
separate files, so that the type file can be included from
elsewhere.

Generate a C file for VPP that contains the API registration,
this was previously done via X macros by the C pre-
processor.

This allows deleting lots of skeleton/copy paste code
for each feature.

plugins/flowprobe
plugins/map
examples/sample-plugin
vnet/ipip
used as Guinea pigs.

Generate a C Test file for VAT, that does the same for VAT plugins.
Also add support for a per-message CLI option, that is currently
limited to VAT help text. option vat_help = "<help text>";

Type: refactor
Change-Id: I245e3104bb76f7e1fb69a59ab20cc7c8dfcdd460
Signed-off-by: Ole Troan <ot@cisco.com>
diff --git a/src/cmake/api.cmake b/src/cmake/api.cmake
index 693c55d..922c83a 100644
--- a/src/cmake/api.cmake
+++ b/src/cmake/api.cmake
@@ -26,7 +26,7 @@
   add_custom_command (OUTPUT ${output_name}
     COMMAND mkdir -p ${output_dir}
     COMMAND ${VPP_APIGEN}
-    ARGS ${includedir} --includedir ${CMAKE_SOURCE_DIR} --input ${CMAKE_CURRENT_SOURCE_DIR}/${file} --output ${output_name}
+    ARGS ${includedir} --includedir ${CMAKE_SOURCE_DIR} --input ${CMAKE_CURRENT_SOURCE_DIR}/${file} --outputdir ${output_dir} --output ${output_name}
     DEPENDS ${VPP_APIGEN} ${CMAKE_CURRENT_SOURCE_DIR}/${file}
     COMMENT "Generating API header ${output_name}"
   )
diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake
index 488687c..fd6c077 100644
--- a/src/cmake/library.cmake
+++ b/src/cmake/library.cmake
@@ -48,6 +48,8 @@
       get_filename_component(dir ${file} DIRECTORY)
       install(
 	FILES ${file} ${CMAKE_CURRENT_BINARY_DIR}/${file}.h
+	${CMAKE_CURRENT_BINARY_DIR}/${file}_enum.h
+	${CMAKE_CURRENT_BINARY_DIR}/${file}_types.h
 	DESTINATION include/${lib}/${dir}
 	COMPONENT vpp-dev
       )