X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=Makefile;h=1cce928aa1a2453356e24a672a1034d8a11137e3;hb=4f80b81d4a7ab537b7a6ede88abed26f278c0f26;hp=3ef236a6e344aea653c82ae75a3c4e3dfbce4a98;hpb=0dc3f191947a9b8e914fa188f4652f700ff06944;p=vpp.git diff --git a/Makefile b/Makefile index 3ef236a6e34..1cce928aa1a 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,25 @@ GDB?=gdb PLATFORM?=vpp SAMPLE_PLUGIN?=no -MINIMAL_STARTUP_CONF="unix { interactive }" +,:=, +define disable_plugins +$(if $(1), \ + "plugins {" \ + $(patsubst %,"plugin %_plugin.so { disable }",$(subst $(,), ,$(1))) \ + " }" \ + ,) +endef + +MINIMAL_STARTUP_CONF=" \ +unix { \ + interactive \ + cli-listen /run/vpp/cli.sock \ + gid $(shell id -g) \ + $(if $(wildcard startup.vpp),"exec startup.vpp",) \ +} \ +$(if $(DPDK_CONFIG), "dpdk { $(DPDK_CONFIG) }",) \ +$(call disable_plugins,$(DISABLED_PLUGINS)) \ +" GDB_ARGS= -ex "handle SIGUSR1 noprint nostop" @@ -37,8 +55,10 @@ else ifeq ($(filter rhel centos fedora opensuse,$(OS_ID)),$(OS_ID)) PKG=rpm endif +# +libganglia1-dev if building the gmond plugin + DEB_DEPENDS = curl build-essential autoconf automake bison libssl-dev ccache -DEB_DEPENDS += debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd +DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-systemd DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config DEB_DEPENDS += lcov chrpath autoconf nasm indent DEB_DEPENDS += python-all python-dev python-virtualenv python-pip libffi6 @@ -61,9 +81,16 @@ else RPM_DEPENDS += python-virtualenv RPM_DEPENDS_GROUPS = 'Development Tools' endif + +# +ganglia-devel if building the ganglia plugin + RPM_DEPENDS += chrpath libffi-devel rpm-build -RPM_DEPENDS += https://kojipkgs.fedoraproject.org//packages/nasm/2.12.02/2.fc26/x86_64/nasm-2.12.02-2.fc26.x86_64.rpm -EPEL_DEPENDS = libconfuse-devel ganglia-devel epel-rpm-macros +ifeq ($(OS_ID),fedora) + RPM_DEPENDS += nasm +else + RPM_DEPENDS += https://kojipkgs.fedoraproject.org//packages/nasm/2.12.02/2.fc26/x86_64/nasm-2.12.02-2.fc26.x86_64.rpm +endif +EPEL_DEPENDS = libconfuse-devel epel-rpm-macros ifeq ($(filter rhel centos,$(OS_ID)),$(OS_ID)) EPEL_DEPENDS += lcov else @@ -72,7 +99,7 @@ endif RPM_SUSE_DEPENDS = autoconf automake bison ccache chrpath distribution-release gcc6 glibc-devel-static RPM_SUSE_DEPENDS += java-1_8_0-openjdk-devel libopenssl-devel libtool lsb-release make openssl-devel -RPM_SUSE_DEPENDS += python-devel python-pip python-rpm-macros shadow +RPM_SUSE_DEPENDS += python-devel python-pip python-rpm-macros shadow nasm ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),) STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf @@ -139,16 +166,21 @@ help: @echo " test-checkstyle - check PEP8 compliance for test framework" @echo "" @echo "Make Arguments:" - @echo " V=[0|1] - set build verbosity level" - @echo " STARTUP_CONF= - startup configuration file" - @echo " (e.g. /etc/vpp/startup.conf)" - @echo " STARTUP_DIR= - startup drectory (e.g. /etc/vpp)" - @echo " It also sets STARTUP_CONF if" - @echo " startup.conf file is present" - @echo " GDB= - gdb binary to use for debugging" - @echo " PLATFORM= - target platform. default is vpp" - @echo " TEST= - apply filter to test set, see test-help" - @echo " SAMPLE_PLUGIN=yes - in addition build/run/debug sample plugin" + @echo " V=[0|1] - set build verbosity level" + @echo " STARTUP_CONF= - startup configuration file" + @echo " (e.g. /etc/vpp/startup.conf)" + @echo " STARTUP_DIR= - startup drectory (e.g. /etc/vpp)" + @echo " It also sets STARTUP_CONF if" + @echo " startup.conf file is present" + @echo " GDB= - gdb binary to use for debugging" + @echo " PLATFORM= - target platform. default is vpp" + @echo " TEST= - apply filter to test set, see test-help" + @echo " DPDK_CONFIG= - add specified dpdk config commands to" + @echo " autogenerated startup.conf" + @echo " (e.g. \"no-pci\" )" + @echo " SAMPLE_PLUGIN=yes - in addition build/run/debug sample plugin" + @echo " DISABLED_PLUGINS= - comma separated list of plugins which" + @echo " should not be loaded" @echo "" @echo "Current Argument Values:" @echo " V = $(V)" @@ -157,7 +189,9 @@ help: @echo " GDB = $(GDB)" @echo " PLATFORM = $(PLATFORM)" @echo " DPDK_VERSION = $(DPDK_VERSION)" + @echo " DPDK_CONFIG = $(DPDK_CONFIG)" @echo " SAMPLE_PLUGIN = $(SAMPLE_PLUGIN)" + @echo " DISABLED_PLUGINS = $(DISABLED_PLUGINS)" $(BR)/.bootstrap.ok: ifeq ($(findstring y,$(UNATTENDED)),y) @@ -244,12 +278,17 @@ DIST_FILE = $(BR)/vpp-$(shell src/scripts/version).tar DIST_SUBDIR = vpp-$(shell src/scripts/version|cut -f1 -d-) dist: - @git archive \ - --prefix=$(DIST_SUBDIR)/ \ - --format=tar \ - -o $(DIST_FILE) \ - HEAD - @git describe > $(BR)/.version + @if git rev-parse 2> /dev/null ; then \ + git archive \ + --prefix=$(DIST_SUBDIR)/ \ + --format=tar \ + -o $(DIST_FILE) \ + HEAD ; \ + git describe > $(BR)/.version ; \ + else \ + (cd .. ; tar -cf $(DIST_FILE) $(DIST_SUBDIR) --exclude=*.tar) ; \ + src/scripts/version > $(BR)/.version ; \ + fi @tar --append \ --file $(DIST_FILE) \ --transform='s,.*/.version,$(DIST_SUBDIR)/src/scripts/.version,' \ @@ -396,6 +435,9 @@ pkg-deb: pkg-rpm: dist make -C extras/rpm +pkg-srpm: dist + make -C extras/rpm srpm + dpdk-install-dev: make -C dpdk install-$(PKG)