X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=build%2Fexternal%2FMakefile;h=c5e6f634dd739b0dbdbb4a76ea4885fe4061efc7;hb=b077d6678cc32c7f65d631b76fba5759692f880c;hp=b036313afee673c1b7d15b519af963a108541aa9;hpb=4e939ced65143fcfe9342dcccf3418a1018c8b0f;p=vpp.git diff --git a/build/external/Makefile b/build/external/Makefile index b036313afee..c5e6f634dd7 100644 --- a/build/external/Makefile +++ b/build/external/Makefile @@ -12,15 +12,15 @@ # limitations under the License. # Scripts require non-POSIX parts of bash -SHELL := /bin/bash +SHELL := $(shell which bash) DL_CACHE_DIR = $(HOME)/Downloads -MAKE ?= make MAKE_ARGS ?= -j BUILD_DIR ?= $(CURDIR)/_build INSTALL_DIR ?= $(CURDIR)/_install PKG_VERSION ?= $(shell git describe --abbrev=0 --match 'v[0-9]*' | cut -d- -f1 | cut -dv -f2 | cut -d. -f1,2) PKG_SUFFIX ?= $(shell git log --oneline v$(PKG_VERSION)-rc0.. . | wc -l) +SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=%ct .) JOBS := $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo),\ $(shell grep -c ^processor /proc/cpuinfo), 2) @@ -34,23 +34,35 @@ CMAKE?=cmake endif ARCH_X86_64=$(filter x86_64,$(shell uname -m)) +AARCH64=$(filter aarch64,$(shell uname -m)) include packages.mk include packages/ipsec-mb.mk include packages/quicly.mk +ifneq ($(shell uname), FreeBSD) include packages/rdma-core.mk include packages/dpdk.mk -include packages/libbpf.mk +include packages/xdp-tools.mk +include packages/octeon-roc.mk +endif # FreeBSD .PHONY: clean clean: @rm -rf $(B) $(I) .PHONY: install -install: $(if $(ARCH_X86_64), ipsec-mb-install) dpdk-install rdma-core-install quicly-install libbpf-install +ifeq ($(shell uname), FreeBSD) +install: $(if $(ARCH_X86_64), ipsec-mb-install) quicly-install +else +install: $(if $(ARCH_X86_64), ipsec-mb-install) dpdk-install rdma-core-install quicly-install xdp-tools-install $(if $(AARCH64), octeon-roc-install) +endif # FreeBSD .PHONY: config +ifeq ($(shell uname), FreeBSD) +config: $(if $(ARCH_X86_64), ipsec-mb-config) quicly-build +else config: $(if $(ARCH_X86_64), ipsec-mb-config) dpdk-config rdma-core-config quicly-build +endif # FreeBSD ############################################################################## # .deb packaging @@ -68,7 +80,7 @@ deb/debian/changelog: Makefile @echo "" >> $@ @echo " * Version $(DEB_VER)" >> $@ @echo "" >> $@ - @echo " -- VPP Dev $(shell date -R)" >> $@ + @echo " -- VPP Dev $(shell date -R --date=@${SOURCE_DATE_EPOCH})" >> $@ $(DEV_DEB): deb/debian/changelog @cd deb && dpkg-buildpackage -b -uc -us @@ -156,17 +168,17 @@ ifeq ($(INSTALLED_VER)$(INSTALLED_RPM_VER),) @echo "development package by invoking 'make install-ext-deps'" @echo "from the top level directory" @echo "==========================================================" - make config + $(MAKE) config else ifneq ($(INSTALLED_VER),) make check-deb endif ifneq ($(INSTALLED_RPM_VER),) - make check-rpm + $(MAKE) check-rpm endif endif ebuild-install: ifeq ($(INSTALLED_VER)$(INSTALLED_RPM_VER),) - make install + $(MAKE) install endif