CMake as an alternative to autotools (experimental)
[vpp.git] / Makefile
index afbe6f9..09a3108 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,10 @@ STARTUP_DIR?=$(PWD)
 MACHINE=$(shell uname -m)
 SUDO?=sudo
 
+ifeq ($(findstring $(MAKECMDGOALS),verify pkg-deb pkg-rpm test),)
+export vpp_uses_cmake?=yes
+endif
+
 ,:=,
 define disable_plugins
 $(if $(1), \
@@ -66,6 +70,7 @@ DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
 DEB_DEPENDS += lcov chrpath autoconf indent clang-format libnuma-dev
 DEB_DEPENDS += python-all python-dev python-virtualenv python-pip libffi6 check
 DEB_DEPENDS += libboost-all-dev libffi-dev python-ply libmbedtls-dev
+DEB_DEPENDS += cmake ninja-build
 ifeq ($(OS_VERSION_ID),14.04)
        DEB_DEPENDS += openjdk-8-jdk-headless
        DEB_DEPENDS += libssl-dev
@@ -188,6 +193,7 @@ help:
        @echo " test-debug          - build and run (basic) functional tests (debug build)"
        @echo " test-all            - build and run (all) functional tests"
        @echo " test-all-debug      - build and run (all) functional tests (debug build)"
+       @echo " test-ext            - build and run 'extras' functional tests"
        @echo " test-shell          - enter shell with test environment"
        @echo " test-shell-debug    - enter shell with test environment (debug build)"
        @echo " test-wipe           - wipe files generated by unit tests"
@@ -354,7 +360,7 @@ export VPP_PYTHON_PREFIX ?= $(BR)/python
 libexpand = $(subst $(subst ,, ),:,$(foreach lib,$(1),$(BR)/install-$(2)-native/vpp/$(lib)/$(3)))
 
 define test
-       $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-install vom-install,)
+       $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-install,)
        $(eval libs:=lib lib64)
        make -C test \
          TEST_DIR=$(WS_ROOT)/test \
@@ -380,6 +386,11 @@ test-all:
        $(eval EXTENDED_TESTS=yes)
        $(call test,vpp,vpp,test)
 
+test-ext:
+       $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=vpp TAG=vpp_debug vom-install japi-install,)
+       $(eval EXTENDED_TESTS=yes)
+       $(call test,vpp,vpp_debug,test-ext)
+
 test-all-debug:
        $(eval EXTENDED_TESTS=yes)
        $(call test,vpp,vpp_debug,test)
@@ -527,6 +538,8 @@ verify: install-dep $(BR)/.deps.ok dpdk-install-dev
        @make -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install
        $(call banner,"Building libmemif")
        @make -C build-root PLATFORM=vpp TAG=vpp libmemif-install
+       $(call banner,"Building JAPI")
+       @make -C build-root PLATFORM=vpp TAG=vpp japi-install
        $(call banner,"Building VOM")
        @make -C build-root PLATFORM=vpp TAG=vpp vom-install
        $(call banner,"Building $(PKG) packages")