From ed537580a180840c9849d78012c86946ea630d62 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 5 Sep 2018 12:58:01 -0700 Subject: [PATCH] build: fix shared library dependencies When --with-shared is specified, we need to make sure the shared libraries have been built before we start linking applications. Signed-off-by: Jim Harris Change-Id: I98510b29cca67e09f0c33ac9c8e823e61ac5dc8d Reviewed-on: https://review.gerrithub.io/424722 Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Lance Hartmann Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto Tested-by: SPDK CI Jenkins --- Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2bb661a83..6dfb92f88 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,12 @@ endif endif endif +ifeq ($(CONFIG_SHARED),y) +LIB = shared_lib +else +LIB = lib +endif + all: $(DIRS-y) clean: $(DIRS-y) $(Q)rm -f mk/cc.mk @@ -62,9 +68,9 @@ install: all shared_lib: lib lib: $(DPDKBUILD) -app: lib -test: lib -examples: lib +app: $(LIB) +test: $(LIB) +examples: $(LIB) pkgdep: sh ./scripts/pkgdep.sh