ixgbe/base: move phy sfp detection in a function
[dpdk.git] / lib / librte_pmd_ixgbe / Makefile
index b48d0b7..00ccedb 100644 (file)
@@ -43,7 +43,15 @@ ifeq ($(CC), icc)
 #
 # CFLAGS for icc
 #
-CFLAGS_LAD = -wd174 -wd593 -wd869 -wd981 -wd2259
+CFLAGS_BASE_DRIVER = -wd174 -wd593 -wd869 -wd981 -wd2259
+
+else ifeq ($(CC), clang)
+#
+# CFLAGS for clang
+#
+CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value
+CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args
+
 else
 #
 # CFLAGS for gcc
@@ -51,8 +59,8 @@ else
 ifneq ($(shell test $(GCC_MAJOR_VERSION) -le 4 -a $(GCC_MINOR_VERSION) -le 3 && echo 1), 1)
 CFLAGS     += -Wno-deprecated
 endif
-CFLAGS_LAD = -Wno-unused-parameter -Wno-unused-value
-CFLAGS_LAD += -Wno-strict-aliasing -Wno-format-extra-args
+CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value
+CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args
 
 ifeq ($(shell test $(GCC_MAJOR_VERSION) -ge 4 -a $(GCC_MINOR_VERSION) -ge 6 && echo 1), 1)
 CFLAGS_ixgbe_common.o += -Wno-unused-but-set-variable
@@ -60,10 +68,11 @@ endif
 endif
 
 #
-# Add extra flags for LAD source files to disable warnings in them
+# Add extra flags for base driver files (also known as shared code)
+# to disable warnings in them
 #
-LAD_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_ixgbe/ixgbe/*.c)))
-$(foreach obj, $(LAD_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_LAD)))
+BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_ixgbe/ixgbe/*.c)))
+$(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
 
 VPATH += $(RTE_SDK)/lib/librte_pmd_ixgbe/ixgbe