The raw/ntb driver library was added to the linker flags of both the
shared and static targets. For static linking, it is already part of
the libdpdk pkg-config output, so only add it to the shared target,
as done in other examples.
Fixes: 5ce50c234ad1 ("raw/ntb: generalize framework for multiple vendors")
Signed-off-by: Raghavendra Ningoji <[email protected]>
---
examples/ntb/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/ntb/Makefile b/examples/ntb/Makefile
index 6c0307c697..a074251646 100644
--- a/examples/ntb/Makefile
+++ b/examples/ntb/Makefile
@@ -23,11 +23,12 @@ static: build/$(APP)-static
ln -sf $(APP)-static build/$(APP)
CFLAGS += -D_FILE_OFFSET_BITS=64
-LDFLAGS += -pthread -lrte_raw_ntb
+LDFLAGS += -pthread
PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -I build/
LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
+LDFLAGS_SHARED += -lrte_raw_ntb
LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
build/commands.h: commands.list Makefile
--
2.34.1