Clean up for vcl.am, making vppcom.h C++ aware 01/10401/4
authorKeith Burns (alagalah) <alagalah@gmail.com>
Fri, 2 Feb 2018 16:21:56 +0000 (08:21 -0800)
committerDave Wallace <dwallacelf@gmail.com>
Fri, 2 Feb 2018 22:08:06 +0000 (22:08 +0000)
Change-Id: I2548ebd37e16bed50b5c8046b728415a341413e3
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
src/vcl.am
src/vcl/vppcom.h

index 642cb35..eac3d7e 100644 (file)
@@ -16,28 +16,27 @@ lib_LTLIBRARIES += libvppcom.la libvcl_ldpreload.la
 libvppcom_la_SOURCES =
 libvcl_ldpreload_la_SOURCES =
 libvppcom_la_DEPENDENCIES =    \
-       libvppinfra.la          \
-       libvlib.la              \
        libsvm.la               \
        libvlibmemoryclient.la
 
-libvppcom_la_LIBADD = $(libvppcom_la_DEPENDENCIES) -lpthread -lrt
-libvcl_ldpreload_la_LIBADD = -lpthread -lrt -ldl
+libvppcom_la_LIBADD = $(libvppcom_la_DEPENDENCIES) -lpthread -lrt -ldl
 
 libvppcom_la_SOURCES +=                                \
-  vcl/vppcom.c
+  vcl/vppcom.c                                 \
+  $(libvppinfra_la_SOURCES)                    \
+  $(libvlib_la_SOURCES)                                \
+  $(libsvm_la_SOURCES)                         \
+  $(libvlibmemoryclient_la_SOURCES)
 
 nobase_include_HEADERS +=                      \
   vcl/vppcom.h
 
+libvcl_ldpreload_la_LIBADD =  $(libvppcom_la_DEPENDENCIES) -lpthread -lrt -ldl
+
 libvcl_ldpreload_la_SOURCES +=                 \
   vcl/vcom_socket_wrapper.c                    \
   vcl/vcom.c                                   \
-  $(libvppcom_la_SOURCES)                      \
-  $(libvppinfra_la_SOURCES)                    \
-  $(libvlib_la_SOURCES)                                \
-  $(libsvm_la_SOURCES)                         \
-  $(libvlibmemoryclient_la_SOURCES)
+  $(libvppcom_la_SOURCES)
 
 nobase_include_HEADERS +=                      \
   vcl/vcom_socket_wrapper.h                    \
index 208b371..c79b90c 100644 (file)
 #include <sys/poll.h>
 #include <sys/epoll.h>
 
+/* *INDENT-OFF* */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* *INDENT-ON* */
+
 /*
  * VPPCOM Public API Definitions, Enums, and Data Structures
  */
@@ -244,6 +251,12 @@ extern int vppcom_session_sendto (uint32_t session_index, void *buffer,
 extern int vppcom_poll (vcl_poll_t * vp, uint32_t n_sids,
                        double wait_for_time);
 
+/* *INDENT-OFF* */
+#ifdef __cplusplus
+}
+#endif
+/* *INDENT-ON* */
+
 #endif /* included_vppcom_h */
 
 /*