X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=Makefile;h=55e2b10a1deba1f6b1866873f6ec9df5362164e8;hb=7c922dc404c2c0a2d67d53ca05db1c1ae1598f44;hp=1eb1f0cef2249799b0e43df8b7a68a06548f581a;hpb=e9be71534be452a34028ed85475a2975e03b6215;p=vpp.git diff --git a/Makefile b/Makefile index 1eb1f0cef22..55e2b10a1de 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,14 @@ CCACHE_DIR?=$(BR)/.ccache GDB?=gdb PLATFORM?=vpp SAMPLE_PLUGIN?=no +STARTUP_DIR?=$(PWD) MACHINE=$(shell uname -m) SUDO?=sudo +ifeq ($(findstring $(MAKECMDGOALS),verify pkg-deb pkg-rpm test test-debug),) +export vpp_uses_cmake?=yes +endif + ,:=, define disable_plugins $(if $(1), \ @@ -53,7 +58,7 @@ endif ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID)) PKG=deb -else ifeq ($(filter rhel centos fedora opensuse,$(OS_ID)),$(OS_ID)) +else ifeq ($(filter rhel centos fedora opensuse opensuse-leap opensuse-tumbleweed,$(OS_ID)),$(OS_ID)) PKG=rpm endif @@ -65,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 @@ -75,7 +81,7 @@ else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8) else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-9) DEB_DEPENDS += default-jdk-headless DEB_DEPENDS += libssl1.0-dev -else +else DEB_DEPENDS += default-jdk-headless DEB_DEPENDS += libssl-dev endif @@ -115,7 +121,7 @@ RPM_DEPENDS += chrpath libffi-devel rpm-build SUSE_NAME= $(shell grep '^NAME=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2) SUSE_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2) RPM_SUSE_BUILDTOOLS_DEPS = autoconf automake ccache check-devel chrpath -RPM_SUSE_BUILDTOOLS_DEPS += clang indent libtool make python-ply +RPM_SUSE_BUILDTOOLS_DEPS += clang cmake indent libtool make ninja python-ply RPM_SUSE_DEVEL_DEPS = glibc-devel-static java-1_8_0-openjdk-devel libnuma-devel RPM_SUSE_DEVEL_DEPS += libopenssl-devel openssl-devel mbedtls-devel @@ -128,17 +134,24 @@ RPM_SUSE_PLATFORM_DEPS = distribution-release shadow rpm-build ifeq ($(OS_ID),opensuse) ifeq ($(SUSE_NAME),Tumbleweed) RPM_SUSE_DEVEL_DEPS = libboost_headers-devel libboost_thread-devel gcc - RPM_SUSE_PYTHON_DEPS += python2-virtualenv + RPM_SUSE_PYTHON_DEPS += python2-ply python2-virtualenv endif ifeq ($(SUSE_ID),15.0) RPM_SUSE_DEVEL_DEPS = libboost_headers-devel libboost_thread-devel gcc6 - RPM_SUSE_PYTHON_DEPS += python2-virtualenv + RPM_SUSE_PYTHON_DEPS += python2-ply python2-virtualenv else RPM_SUSE_DEVEL_DEPS += boost_1_61-devel gcc6 RPM_SUSE_PYTHON_DEPS += python-virtualenv endif endif +ifeq ($(OS_ID),opensuse-leap) +ifeq ($(SUSE_ID),15.0) + RPM_SUSE_DEVEL_DEPS = libboost_headers-devel libboost_thread-devel gcc6 + RPM_SUSE_PYTHON_DEPS += python2-ply python2-virtualenv +endif +endif + RPM_SUSE_DEPENDS += $(RPM_SUSE_BUILDTOOLS_DEPS) $(RPM_SUSE_DEVEL_DEPS) $(RPM_SUSE_PYTHON_DEPS) $(RPM_SUSE_PLATFORM_DEPS) ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),) @@ -180,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" @@ -277,6 +291,12 @@ else ifneq ("$(wildcard /etc/redhat-release)","") @sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS) @sudo -E yum install $(CONFIRM) $(RPM_DEPENDS) @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib +else ifeq ($(filter opensuse-tumbleweed,$(OS_ID)),$(OS_ID)) + @sudo -E zypper refresh + @sudo -E zypper install -y $(RPM_SUSE_DEPENDS) +else ifeq ($(filter opensuse-leap,$(OS_ID)),$(OS_ID)) + @sudo -E zypper refresh + @sudo -E zypper install -y $(RPM_SUSE_DEPENDS) else ifeq ($(filter opensuse,$(OS_ID)),$(OS_ID)) @sudo -E zypper refresh @sudo -E zypper install -y $(RPM_SUSE_DEPENDS) @@ -369,6 +389,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) @@ -410,7 +435,6 @@ retest: retest-debug: $(call test,vpp,vpp_debug,retest) -STARTUP_DIR ?= $(PWD) ifeq ("$(wildcard $(STARTUP_CONF))","") define run @echo "WARNING: STARTUP_CONF not defined or file doesn't exist." @@ -441,7 +465,7 @@ run-release: debug: $(call run, $(BR)/install-$(PLATFORM)_debug-native,$(GDB) $(GDB_ARGS) --args) -build-coverity: +build-coverity: $(call make,$(PLATFORM)_coverity,install-packages) debug-release: @@ -517,6 +541,10 @@ 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") @make pkg-$(PKG) ifeq ($(OS_ID)-$(OS_VERSION_ID),ubuntu-16.04)