From b792c1f27d58040f3a815da18183d329bd6bd84b Mon Sep 17 00:00:00 2001 From: Konstantin Ananyev Date: Thu, 30 Sep 2021 10:05:39 +0000 Subject: tldk: swtich to use DPDK 20.11 LTS As in DPDK 20.11 'make' is not supported any more, switch to use pkg-conf approach. Note that RTE_SDK now should point to your DPDK package installation path. Signed-off-by: Konstantin Ananyev Change-Id: I4a3c394758e183a3ddcdb45a0562a81583daaab6 Signed-off-by: Konstantin Ananyev --- mk/tle.var.mk | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 mk/tle.var.mk (limited to 'mk/tle.var.mk') diff --git a/mk/tle.var.mk b/mk/tle.var.mk new file mode 100644 index 0000000..673c1d0 --- /dev/null +++ b/mk/tle.var.mk @@ -0,0 +1,58 @@ +# Copyright (c) 2021 Intel Corporation. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ifeq ($(RTE_SDK),) +$(error "Please define RTE_SDK environment variable") +endif + +# Default target, can be overwritten by command line or environment +RTE_TARGET ?= x86_64-native-linuxapp-gcc +RTE_OUTPUT ?= $(O) +RTE_SRCDIR ?= $(S) + +RTE_PKGCONF ?= $(RTE_SDK)/lib/x86_64-linux-gnu/pkgconfig + +PKGCONF = export PKG_CONFIG_PATH=$(RTE_PKGCONF); \ + pkg-config +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) +$(error "no installation of DPDK found") +endif + +CFLAGS += -O3 +CFLAGS += -fPIC +CFLAGS += -m64 -pthread +CFLAGS += -DALLOW_EXPERIMENTAL_API +CFLAGS += -I$(RTE_OUTPUT)/include + +# compiler errors/warnings +ifeq ($(CC), clang) +CFLAGS += -Wall -Wextra -Werror +CFLAGS += -Wno-missing-field-initializers -Wno-implicit-fallthrough +CFLAGS += -Wno-address-of-packed-member -Wno-gnu-alignof-expression +CFLAGS += -Wno-constant-conversion +else +CFLAGS += -Wall -Wextra -Werror +CFLAGS += -Wno-missing-field-initializers -Wimplicit-fallthrough=2 +CFLAGS += -Wno-format-truncation -Wno-address-of-packed-member +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) +CFLAGS += $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) + +ifneq ($(APP_NAME),) + BDIR := $(RTE_OUTPUT)/build/$(APP_NAME) +else + BDIR := $(RTE_OUTPUT)/build/$(LIB_NAME) +endif -- cgit 1.2.3-korg