WS_ROOT=$(CURDIR)
BR=$(WS_ROOT)/build-root
CCACHE_DIR?=$(BR)/.ccache
-V?=0
GDB?=gdb
PLATFORM?=vpp
-MINIMAL_STARTUP_CONF="unix { interactive } dpdk { no-pci socket-mem 1024 }"
+MINIMAL_STARTUP_CONF="unix { interactive }"
GDB_ARGS= -ex "handle SIGUSR1 noprint nostop"
DEB_DEPENDS = curl build-essential autoconf automake bison libssl-dev ccache
-DEB_DEPENDS += debhelper dkms openjdk-7-jdk git libtool libganglia1-dev libapr1-dev
+DEB_DEPENDS += debhelper dkms openjdk-8-jdk git libtool libganglia1-dev libapr1-dev dh-systemd
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope
RPM_DEPENDS_GROUPS = 'Development Tools'
-RPM_DEPENDS = redhat-lsb glibc-static java-1.8.0-openjdk-devel
+RPM_DEPENDS = redhat-lsb glibc-static java-1.8.0-openjdk-devel yum-utils
RPM_DEPENDS += openssl-devel https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm apr-devel
EPEL_DEPENDS = libconfuse-devel ganglia-devel
-ifneq ("$(wildcard $(STARTUP_DIR)/startup.conf),"")
+ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf
endif
@echo " STARTUP_DIR = $(STARTUP_DIR)"
@echo " GDB = $(GDB)"
@echo " PLATFORM = $(PLATFORM)"
+ @echo " DPDK_VERSION = $(DPDK_VERSION)"
+
+# openjdk-8-jdk is not available in 14.04 repos by default
+define use_ppa_for_jdk8
+if [ "$(shell lsb_release -r | awk '{print $$2}')"=="14.04" ]; then \
+ sudo apt-get -y install software-properties-common; \
+ sudo add-apt-repository -y ppa:openjdk-r/ppa; \
+ sudo apt-get update; \
+fi;
+endef
$(BR)/.bootstrap.ok:
ifeq ("$(shell lsb_release -si)", "Ubuntu")
+ $(use_ppa_for_jdk8)
+
@MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \
if [ -n "$$MISSING" ] ; then \
echo "\nPlease install missing packages: \n$$MISSING\n" ; \
@echo 'export PATH=$(BR)/tools/ccache-bin:$$PATH' >> $(BR)/path_setup
@echo 'export PATH=$(BR)/tools/bin:$$PATH' >> $(BR)/path_setup
@echo 'export CCACHE_DIR=$(CCACHE_DIR)' >> $(BR)/path_setup
-
+
ifeq ("$(wildcard /usr/bin/ccache )","")
@echo "WARNING: Please install ccache AYEC and re-run this script"
else
install-dep:
ifeq ("$(shell lsb_release -si)", "Ubuntu")
+ $(use_ppa_for_jdk8)
@sudo apt-get -y install $(DEB_DEPENDS)
else ifneq ("$(wildcard /etc/redhat-release)","")
@sudo yum groupinstall -y $(RPM_DEPENDS_GROUPS)
@sudo yum install -y $(RPM_DEPENDS)
@sudo yum install -y --enablerepo=epel $(EPEL_DEPENDS)
+ @sudo debuginfo-install glibc-2.17-106.el7_2.4.x86_64 openssl-libs-1.0.1e-51.el7_2.4.x86_64 zlib-1.2.7-15.el7.x86_64
else
$(error "This option currently works only on Ubuntu or Centos systems")
endif
define make
- @make -C $(BR) V=$(V) PLATFORM=$(PLATFORM) TAG=$(1) $(2)
+ @make -C $(BR) PLATFORM=$(PLATFORM) TAG=$(1) $(2)
endef
build: $(BR)/.bootstrap.ok
cscope: cscope.files
@cscope -b -q -v
+