diff options
author | Sridhar K. N. Rao <srao@linuxfoundation.org> | 2022-10-01 19:03:06 +0530 |
---|---|---|
committer | Sridhar K. N. Rao <srao@linuxfoundation.org> | 2022-10-01 19:04:42 +0530 |
commit | 98177ae9f931901646403485aadbed6f6813cad0 (patch) | |
tree | 22791ebd846188ef25d2b497a138e41a419afb66 /src/ovs | |
parent | eb7d834d3e8a2dd7d133337f7017782320292b46 (diff) |
DPDK: Default to Meson-Build of DPDK.
This patch makes meson based build as default.
Signed-off-by: Sridhar K. N. Rao <srao@linuxfoundation.org>
Change-Id: Ie41748342a76cf157a1afcb2e1866d8f9e01c6f2
Diffstat (limited to 'src/ovs')
-rw-r--r-- | src/ovs/Makefile | 19 | ||||
-rw-r--r-- | src/ovs/Makefile.legacy (renamed from src/ovs/Makefile.ovs_dpdk_meson) | 20 |
2 files changed, 23 insertions, 16 deletions
diff --git a/src/ovs/Makefile b/src/ovs/Makefile index e3adc2f8..2c0c0076 100644 --- a/src/ovs/Makefile +++ b/src/ovs/Makefile @@ -1,7 +1,7 @@ # makefile to manage ovs package # -# Copyright 2015 OPNFV +# Copyright 2022 Anuket # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ # # Contributors: # Aihua Li, Huawei Technologies. +# Sridhar Rao, The Linux Foundation include ../mk/master.mk include ../package-list.mk @@ -48,10 +49,16 @@ ifeq ($(DPDK_DIR),) DPDK_DIR = ../../dpdk/dpdk endif -ifeq ($(DPDK_TARGET),) -DPDK_TARGET = x86_64-native-linuxapp-gcc -endif -CONFIG_CMD += --with-dpdk=$(DPDK_DIR)/$(DPDK_TARGET) +DPDK_LIB = $(DPDK_DIR)/build/lib/x86_64-linux-gnu +LD_CONFIG_PATH := $(DPDK_LIB)/:$(LD_CONFIG_PATH) +PKG_CONFIG_PATH := $(DPDK_LIB)/pkgconfig/:$(PKG_CONFIG_PATH) + +export LD_CONFIG_PATH +export PKG_CONFIG_PATH + +# echo $$ENV{LD_CONFIG_PATH} + +CONFIG_CMD += --with-dpdk=shared CONFIG_CMD += CFLAGS="-g -O2 -Wno-cast-align" endif # Kernel vs. DPDK @@ -65,7 +72,7 @@ all: force_make @echo "Finished making $(WORK_DIR) " config $(WORK_DIR)/Makefile: $(WORK_DIR)/configure - $(AT)cd $(WORK_DIR); $(CONFIG_CMD) + $(AT)cd $(WORK_DIR); LD_LIBRARY_PATH=$(DPDK_LIB) PKG_CONFIG_PATH=$(DPDK_LIB)/pkgconfig/ $(CONFIG_CMD) @echo "Configure done" INSTALL_TARGET = force_install force_make diff --git a/src/ovs/Makefile.ovs_dpdk_meson b/src/ovs/Makefile.legacy index 4b4d997d..e3adc2f8 100644 --- a/src/ovs/Makefile.ovs_dpdk_meson +++ b/src/ovs/Makefile.legacy @@ -1,7 +1,7 @@ # makefile to manage ovs package # -# Copyright 2022 Anuket +# Copyright 2015 OPNFV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ # # Contributors: # Aihua Li, Huawei Technologies. -# Sridhar Rao, The Linux Foundation include ../mk/master.mk include ../package-list.mk @@ -44,14 +43,15 @@ else # Building with DPDK # it can be passed in from Makefile command # if it is not set, try to read it in from environment # if it is still not set, then set it using relative path -PKG_CONFIG_PATH := ../dpdk/dpdk/build/meson-private -LD_CONFIG_PATH := ../dpdk/dpdk/build/lib -export LD_CONFIG_PATH -export PKG_CONFIG_PATH - -# echo $$ENV{LD_CONFIG_PATH} +DPDK_DIR ?= $(shell echo $$DPDK_DIR) +ifeq ($(DPDK_DIR),) +DPDK_DIR = ../../dpdk/dpdk +endif -CONFIG_CMD += --with-dpdk=shared +ifeq ($(DPDK_TARGET),) +DPDK_TARGET = x86_64-native-linuxapp-gcc +endif +CONFIG_CMD += --with-dpdk=$(DPDK_DIR)/$(DPDK_TARGET) CONFIG_CMD += CFLAGS="-g -O2 -Wno-cast-align" endif # Kernel vs. DPDK @@ -65,7 +65,7 @@ all: force_make @echo "Finished making $(WORK_DIR) " config $(WORK_DIR)/Makefile: $(WORK_DIR)/configure - $(AT)cd $(WORK_DIR); LD_CONFIG_PATH=../../dpdk/dpdk/build/lib PKG_CONFIG_PATH=../../dpdk/dpdk/build/meson-private $(CONFIG_CMD) + $(AT)cd $(WORK_DIR); $(CONFIG_CMD) @echo "Configure done" INSTALL_TARGET = force_install force_make |