git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
acl: add function to check build input parameters
[dpdk.git]
/
mk
/
rte.lib.mk
diff --git
a/mk/rte.lib.mk
b/mk/rte.lib.mk
index
a67c129
..
0d7482d
100644
(file)
--- a/
mk/rte.lib.mk
+++ b/
mk/rte.lib.mk
@@
-37,11
+37,14
@@
include $(RTE_SDK)/mk/internal/rte.depdirs-pre.mk
# VPATH contains at least SRCDIR
VPATH += $(SRCDIR)
# VPATH contains at least SRCDIR
VPATH += $(SRCDIR)
-
ifeq ($(RTE_BUILD_SHARED_LIB),y)
ifeq ($(RTE_BUILD_SHARED_LIB),y)
-LIB := $(patsubst %.a,%.so,$(LIB))
+
+LIB := $(patsubst %.a,%.so.$(LIBABIVER),$(LIB))
+CPU_LDFLAGS += --version-script=$(SRCDIR)/$(EXPORT_MAP)
+
endif
endif
+
_BUILD = $(LIB)
_INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
_CLEAN = doclean
_BUILD = $(LIB)
_INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
_CLEAN = doclean
@@
-62,7
+65,9
@@
exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
ifeq ($(LINK_USING_CC),1)
# Override the definition of LD here, since we're linking with CC
LD := $(CC) $(CPU_CFLAGS)
ifeq ($(LINK_USING_CC),1)
# Override the definition of LD here, since we're linking with CC
LD := $(CC) $(CPU_CFLAGS)
-CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS))
+_CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS))
+else
+_CPU_LDFLAGS := $(CPU_LDFLAGS)
endif
O_TO_A = $(AR) crus $(LIB) $(OBJS-y)
endif
O_TO_A = $(AR) crus $(LIB) $(OBJS-y)
@@
-74,7
+79,7
@@
O_TO_A_DO = @set -e; \
$(O_TO_A) && \
echo $(O_TO_A_CMD) > $(call exe2cmd,$(@))
$(O_TO_A) && \
echo $(O_TO_A_CMD) > $(call exe2cmd,$(@))
-O_TO_S = $(LD) $(
CPU_LDFLAGS) -shared $(OBJS-y
) -o $(LIB)
+O_TO_S = $(LD) $(
_CPU_LDFLAGS) -shared $(OBJS-y) -Wl,-soname,$(LIB
) -o $(LIB)
O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight
O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)"," LD $(@)")
O_TO_S_DO = @set -e; \
O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight
O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)"," LD $(@)")
O_TO_S_DO = @set -e; \
@@
-107,6
+112,10
@@
lib_dir = [ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib;
#
ifeq ($(RTE_BUILD_SHARED_LIB),y)
$(LIB): $(OBJS-y) $(DEP_$(LIB)) FORCE
#
ifeq ($(RTE_BUILD_SHARED_LIB),y)
$(LIB): $(OBJS-y) $(DEP_$(LIB)) FORCE
+ifeq ($(LIBABIVER),)
+ @echo "Must Specify a $(LIB) ABI version"
+ @false
+endif
@[ -d $(dir $@) ] || mkdir -p $(dir $@)
$(if $(D),\
@echo -n "$< -> $@ " ; \
@[ -d $(dir $@) ] || mkdir -p $(dir $@)
$(if $(D),\
@echo -n "$< -> $@ " ; \
@@
-120,6
+129,7
@@
$(LIB): $(OBJS-y) $(DEP_$(LIB)) FORCE
$(depfile_missing),\
$(depfile_newer)),\
$(O_TO_S_DO))
$(depfile_missing),\
$(depfile_newer)),\
$(O_TO_S_DO))
+
ifeq ($(RTE_BUILD_COMBINE_LIBS),y)
$(if $(or \
$(file_missing),\
ifeq ($(RTE_BUILD_COMBINE_LIBS),y)
$(if $(or \
$(file_missing),\
@@
-157,9
+167,13
@@
endif
# install lib in $(RTE_OUTPUT)/lib
#
$(RTE_OUTPUT)/lib/$(LIB): $(LIB)
# install lib in $(RTE_OUTPUT)/lib
#
$(RTE_OUTPUT)/lib/$(LIB): $(LIB)
+ $(eval LIBSONAME := $(basename $(LIB)))
@echo " INSTALL-LIB $(LIB)"
@[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
$(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
@echo " INSTALL-LIB $(LIB)"
@[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
$(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
+ifeq ($(RTE_BUILD_SHARED_LIB),y)
+ $(Q)ln -s -f $< $(RTE_OUTPUT)/lib/$(LIBSONAME)
+endif
#
# Clean all generated files
#
# Clean all generated files