diff options
| author | root <[email protected]> | 2015-09-21 11:31:57 +0800 |
|---|---|---|
| committer | root <[email protected]> | 2015-09-21 11:31:57 +0800 |
| commit | 34d1f28b5acae43e8009eb89c9f461c37c64ab4f (patch) | |
| tree | de4f1f92814e32a81f40155396d75ecffec3190f | |
| parent | a3c39accd56e17304f9bc8dced7b6aa09ef7f2cf (diff) | |
修改内部Makefile,增加读取DPDK版本的功能。判断版本号大于2.1.0,修改
链接的库的名称。
| -rw-r--r-- | mk/config.mk | 16 | ||||
| -rw-r--r-- | mk/debug-vars.mk | 10 |
2 files changed, 25 insertions, 1 deletions
diff --git a/mk/config.mk b/mk/config.mk index a9bd8b0..dc07036 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -36,6 +36,16 @@ DPDK_INCLUDE = $(RTE_SDK)/$(RTE_TARGET)/include DPDK_LIB_DIR = $(RTE_SDK)/$(RTE_TARGET)/lib DPDK_CONFIG = $(RTE_SDK)/$(RTE_TARGET)/include/rte_config.h +# DPDK Version +DPDK_VERSION_FILE = $(RTE_SDK)/$(RTE_TARGET)/include/rte_version.h +DPDK_MAJOR_VER = $(shell grep "define RTE_VER_MAJOR" $(DPDK_VERSION_FILE) | awk '{print $$3}') +DPDK_MINOR_VER = $(shell grep "define RTE_VER_MINOR" $(DPDK_VERSION_FILE) | awk '{print $$3}') + +# Version Tag : 2.1.0 +ifeq ($(DPDK_MAJOR_VER)$(DPDK_MINOR_VER),21) +DPDK_VERSION_TAG_2_1_0 = 21 +endif + DPDK_LIB = --whole-archive DPDK_LIB += --start-group @@ -184,7 +194,11 @@ ifeq ($(CONFIG_RTE_LIBRTE_VMXNET3_PMD),y) DPDK_LIB += -lrte_pmd_vmxnet3_uio endif -ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD)$(CONFIG_RTE_LIBRTE_RSYS),y) +ifdef ($(DPDK_VERSION_TAG_2_1_0)) +DPDK_LIB += -lrte_pmd_virtio +endif + +ifeq ($(DPDK_VERSION_TAG_2_1_0)$(CONFIG_RTE_LIBRTE_VIRTIO_PMD)$(CONFIG_RTE_LIBRTE_RSYS),y) DPDK_LIB += -lrte_pmd_virtio_uio endif diff --git a/mk/debug-vars.mk b/mk/debug-vars.mk new file mode 100644 index 0000000..a01e1de --- /dev/null +++ b/mk/debug-vars.mk @@ -0,0 +1,10 @@ + + +%: + @echo '$*=$($*)' +d-%: + @echo '$*=$($*)' + @echo ' origin = $(origin $*)' + @echo ' value = $(value $*)' + @echo ' flavor = $(flavor $*)' + |
