VPP-30 sr_replicate requires DPDK
[vpp.git] / dpdk / Makefile
index 316efc0..fadbb26 100644 (file)
@@ -23,15 +23,22 @@ DPDK_DEBUG            ?= n
 
 B := $(DPDK_BUILD_DIR)
 I := $(DPDK_INSTALL_DIR)
-DPDK_VERSION ?= 2.2.0
+DPDK_VERSION ?= 16.04
 DPDK_BASE_URL ?= http://dpdk.org/browse/dpdk/snapshot
 DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.gz
 DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)
 DPDK_2.1.0_TARBALL_MD5_CKSUM := 205a0d12bfd6eb717d57506272f43519
 DPDK_2.2.0_TARBALL_MD5_CKSUM := 22e2fd68cd5504f43fe9a5a6fd6dd938
-DPDK_16.04-rc2_TARBALL_MD5_CKSUM := a642985d2694d8cf8fdfdf0723be3406
+DPDK_16.04_TARBALL_MD5_CKSUM := 0728d506d7f56eb64233e824fa3c098a
 DPDK_SOURCE := $(B)/dpdk-$(DPDK_VERSION)
-DPDK_TARGET := x86_64-native-linuxapp-gcc
+
+ifneq (,$(findstring clang,$(CC)))
+DPDK_CC=clang
+else
+DPDK_CC=gcc
+endif
+
+DPDK_TARGET := x86_64-native-linuxapp-$(DPDK_CC)
 JOBS := $(shell grep processor /proc/cpuinfo | wc -l)
 
 # compiler/linker custom arguments
@@ -40,9 +47,9 @@ DPDK_CPU_LDFLAGS :=
 DPDK_EXTRA_LDFLAGS := -g
 
 ifeq ($(DPDK_DEBUG),n)
-DPDK_EXTRA_CFLAGS := -g 
+DPDK_EXTRA_CFLAGS := -g
 else
-DPDK_EXTRA_CFLAGS := -g -O0 
+DPDK_EXTRA_CFLAGS := -g -O0
 endif
 
 # translate gcc march values to DPDK arch
@@ -82,14 +89,9 @@ endef
 all: build
 
 $(B)/custom-config: $(B)/.patch.ok Makefile
-       @echo --- generating custom config from $(DPDK_SOURCE)/config/common_linuxapp ---
-       @cpp -undef -ffreestanding -x assembler-with-cpp $(DPDK_SOURCE)/config/common_linuxapp $@
+       @echo --- generating custom config from $(DPDK_SOURCE)/config/defconfig_$(DPDK_TARGET) ---
+       @cpp -undef -ffreestanding -x assembler-with-cpp $(DPDK_SOURCE)/config/defconfig_$(DPDK_TARGET) $@
        $(call set,RTE_MACHINE,$(DPDK_MACHINE))
-       $(call set,RTE_ARCH,"x86_64")
-       $(call set,RTE_ARCH_X86_64,y)
-       $(call set,RTE_ARCH_64,y)
-       $(call set,RTE_TOOLCHAIN_GCC,y)
-       $(call set,RTE_TOOLCHAIN,"gcc")
        @# modify options
        $(call set,RTE_MAX_LCORE,256)
        $(call set,RTE_PKTMBUF_HEADROOM,$(DPDK_PKTMBUF_HEADROOM))