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 <james.r.harris@intel.com>
Change-Id: I98510b29cca67e09f0c33ac9c8e823e61ac5dc8d

Reviewed-on: https://review.gerrithub.io/424722
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Jim Harris 2018-09-05 12:58:01 -07:00
parent 4a3458d018
commit ed537580a1

View File

@ -52,6 +52,12 @@ endif
endif endif
endif endif
ifeq ($(CONFIG_SHARED),y)
LIB = shared_lib
else
LIB = lib
endif
all: $(DIRS-y) all: $(DIRS-y)
clean: $(DIRS-y) clean: $(DIRS-y)
$(Q)rm -f mk/cc.mk $(Q)rm -f mk/cc.mk
@ -62,9 +68,9 @@ install: all
shared_lib: lib shared_lib: lib
lib: $(DPDKBUILD) lib: $(DPDKBUILD)
app: lib app: $(LIB)
test: lib test: $(LIB)
examples: lib examples: $(LIB)
pkgdep: pkgdep:
sh ./scripts/pkgdep.sh sh ./scripts/pkgdep.sh