summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2019-02-12 17:24:17 +0100
committerDamjan Marion <dmarion@me.com>2019-02-14 17:21:59 +0000
commit752f5b4302317e2ccfbd1903d31d3e857d719c4d (patch)
tree2f6fbd834ed54cf31c232166c833eda076342af6
parent364b1cad183cd8c0dbda4011cb4117ef0e6508a0 (diff)
deb-pkg: Add libvom package support
Change-Id: I370a5198ea5b768d8c505679662a19797bd2740d Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
-rw-r--r--Makefile9
-rw-r--r--build-data/packages/vom.mk4
-rw-r--r--extras/vom/vom/CMakeLists.txt16
3 files changed, 18 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index d83cc4f4eeb..da85e9b3e94 100644
--- a/Makefile
+++ b/Makefile
@@ -204,6 +204,7 @@ help:
@echo " test-help - show help on test framework"
@echo " run-vat - run vpp-api-test tool"
@echo " pkg-deb - build DEB packages"
+ @echo " vom-pkg-deb - build vom DEB packages"
@echo " pkg-rpm - build RPM packages"
@echo " install-ext-deps - install external development dependencies"
@echo " ctags - (re)generate ctags database"
@@ -494,9 +495,17 @@ run-vat:
pkg-deb:
$(call make,$(PLATFORM),vpp-package-deb)
+vom-pkg-deb:
+ $(call make,$(PLATFORM),vpp-package-deb)
+ $(call make,$(PLATFORM),vom-package-deb)
+
pkg-deb-debug:
$(call make,$(PLATFORM)_debug,vpp-package-deb)
+vom-pkg-deb-debug:
+ $(call make,$(PLATFORM)_debug,vpp-package-deb)
+ $(call make,$(PLATFORM)_debug,vom-package-deb)
+
pkg-rpm: dist
make -C extras/rpm
diff --git a/build-data/packages/vom.mk b/build-data/packages/vom.mk
index e7e02282db4..fefd49ac841 100644
--- a/build-data/packages/vom.mk
+++ b/build-data/packages/vom.mk
@@ -39,3 +39,7 @@ vom_configure = \
vom_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- $(MAKE_PARALLEL_FLAGS)
vom_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install
+
+vom-package-deb: vom-install
+ @$(CMAKE) --build $(PACKAGE_BUILD_DIR)/vom -- package
+ @find $(PACKAGE_BUILD_DIR)/vom -name '*.deb' -exec mv {} $(CURDIR) \;
diff --git a/extras/vom/vom/CMakeLists.txt b/extras/vom/vom/CMakeLists.txt
index 8c87167218c..cebf152d1f8 100644
--- a/extras/vom/vom/CMakeLists.txt
+++ b/extras/vom/vom/CMakeLists.txt
@@ -282,17 +282,11 @@ list(APPEND VOM_HEADERS
)
add_definitions(-Wall -Werror -std=gnu++11)
-
-add_vpp_library(vom
- SOURCES ${VOM_SOURCES}
-
- INSTALL_HEADERS ${VOM_HEADERS}
-
- LINK_LIBRARIES ${VPPAPICLIENT_LIB} ${VAPICLIENT_LIB} Threads::Threads
- ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} m rt
-
- COMPONENT libvom
-)
+add_library(vom SHARED ${VOM_SOURCES})
+target_link_libraries(vom ${VPPAPICLIENT_LIB} ${VAPICLIENT_LIB} Threads::Threads
+ ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} m rt)
+install(TARGETS vom DESTINATION lib COMPONENT vom)
+install(FILES ${VOM_HEADERS} DESTINATION include/vom COMPONENT vom)
if (Boost_FOUND)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
old } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright (c) 2015 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.
 */
/*
  Copyright (c) 2001-2005 Eliot Dresselhaus

  Permission is hereby granted, free of charge, to any person obtaining
  a copy of this software and associated documentation files (the
  "Software"), to deal in the Software without restriction, including
  without limitation the rights to use, copy, modify, merge, publish,
  distribute, sublicense, and/or sell copies of the Software, and to
  permit persons to whom the Software is furnished to do so, subject to
  the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#ifndef included_os_h
#define included_os_h

#include <vppinfra/clib.h>
#include <vppinfra/types.h>

/* External panic function. */
void os_panic (void);

/* External exit function analagous to unix exit. */
void os_exit (int code);

/* External function to print a line. */
void os_puts (u8 * string, uword length, uword is_error);

/* External function to handle out of memory. */
void os_out_of_memory (void);

/* Estimate, measure or divine CPU timestamp clock frequency. */
f64 os_cpu_clock_frequency (void);

extern __thread uword __os_thread_index;

static_always_inline uword
os_get_thread_index (void)
{
  return __os_thread_index;
}

static_always_inline uword
os_get_cpu_number (void) __attribute__ ((deprecated));

static_always_inline uword
os_get_cpu_number (void)
{
  return __os_thread_index;
}

uword os_get_nthreads (void);

#include <vppinfra/smp.h>

#endif /* included_os_h */

/*
 * fd.io coding-style-patch-verification: ON
 *
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */