From: Bruce Richardson Date: Fri, 15 May 2015 15:56:45 +0000 (+0100) Subject: mk: use relative rather than absolute pmd paths X-Git-Tag: spdx-start~9175 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=641a81b2744ec9ba77ae5bac70023911ffc40297;p=dpdk.git mk: use relative rather than absolute pmd paths In the Makefiles for the PMDs, the paths to the files are often specified using the full path from $(RTE_SDK) variable. These paths can be shortened, and make more flexible in case of a future path change by specifying the paths using $(SRCDIR) instead. Signed-off-by: Bruce Richardson Acked-by: John McNamara --- diff --git a/lib/librte_pmd_e1000/Makefile b/lib/librte_pmd_e1000/Makefile index 8c8fed85fe..158bc81db9 100644 --- a/lib/librte_pmd_e1000/Makefile +++ b/lib/librte_pmd_e1000/Makefile @@ -60,10 +60,10 @@ endif # Add extra flags for base driver files (also known as shared code) # to disable warnings in them # -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_e1000/e1000/*.c))) +BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/e1000/*.c))) $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) -VPATH += $(RTE_SDK)/lib/librte_pmd_e1000/e1000 +VPATH += $(SRCDIR)/e1000 # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_enic/Makefile b/lib/librte_pmd_enic/Makefile index 251a898cd7..bfc0994e7c 100644 --- a/lib/librte_pmd_enic/Makefile +++ b/lib/librte_pmd_enic/Makefile @@ -41,12 +41,12 @@ EXPORT_MAP := rte_pmd_enic_version.map LIBABIVER := 1 -CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/vnic/ -CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/ +CFLAGS += -I$(SRCDIR)/vnic/ +CFLAGS += -I$(SRCDIR) CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -Wno-strict-aliasing -VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src +VPATH += $(SRCDIR)/src # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile index 7516d37261..7395933f9b 100644 --- a/lib/librte_pmd_fm10k/Makefile +++ b/lib/librte_pmd_fm10k/Makefile @@ -76,10 +76,10 @@ endif # # Add extra flags for base driver source files to disable warnings in them # -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_fm10k/base/*.c))) +BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))) $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) -VPATH += $(RTE_SDK)/lib/librte_pmd_fm10k/base +VPATH += $(SRCDIR)/base # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile index 4a5635bc10..f5cfec7c0e 100644 --- a/lib/librte_pmd_i40e/Makefile +++ b/lib/librte_pmd_i40e/Makefile @@ -77,10 +77,10 @@ endif CFLAGS_i40e_lan_hmc.o += -Wno-error endif -OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c))) +OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/i40e/*.c))) $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) -VPATH += $(RTE_SDK)/lib/librte_pmd_i40e/i40e +VPATH += $(SRCDIR)/i40e # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile index fbf6966980..e0f89168b8 100644 --- a/lib/librte_pmd_ixgbe/Makefile +++ b/lib/librte_pmd_ixgbe/Makefile @@ -82,10 +82,10 @@ endif # Add extra flags for base driver files (also known as shared code) # to disable warnings in them # -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_ixgbe/ixgbe/*.c))) +BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/ixgbe/*.c))) $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) -VPATH += $(RTE_SDK)/lib/librte_pmd_ixgbe/ixgbe +VPATH += $(SRCDIR)/ixgbe # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_vmxnet3/Makefile b/lib/librte_pmd_vmxnet3/Makefile index fc616c42c6..48177a382f 100644 --- a/lib/librte_pmd_vmxnet3/Makefile +++ b/lib/librte_pmd_vmxnet3/Makefile @@ -64,7 +64,7 @@ CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args endif -VPATH += $(RTE_SDK)/lib/librte_pmd_vmxnet3/vmxnet3 +VPATH += $(SRCDIR)/vmxnet3 EXPORT_MAP := rte_pmd_vmxnet3_version.map