2020-04-20 21:02:46 -05:00
|
|
|
# DPKG FRK
|
|
|
|
|
2021-06-08 11:38:00 -05:00
|
|
|
# Append MLNX_SDK_DEB_VERSION to flags list.
|
|
|
|
# We use SONIC_OVERRIDE_BUILD_VARS in order to build SONiC with any SDK we want
|
|
|
|
# by passing it in environment variable. This approach does not work well with
|
|
|
|
# caching framework which assumes that if the corresponding makefile didn't change
|
|
|
|
# the version didn't change neither. There is no ultimate solution to support
|
|
|
|
# caching and anything user can pass in SONIC_OVERRIDE_BUILD_VARS, so as a W/A
|
|
|
|
# we append MLNX_SDK_DEB_VERSION to flags to invalidate cache in case we use
|
|
|
|
# SONIC_OVERRIDE_BUILD_VARS.
|
|
|
|
MLNX_SDK_COMMON_FLAGS_LIST = $(SONIC_COMMON_FLAGS_LIST) $(MLNX_SDK_DEB_VERSION)
|
|
|
|
|
2020-04-20 21:02:46 -05:00
|
|
|
# APPLIBS
|
|
|
|
|
|
|
|
SPATH := $($(APPLIBS)_SRC_PATH)
|
|
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
|
|
|
|
$(APPLIBS)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(APPLIBS)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(APPLIBS)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
$(APPLIBS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(APPLIBS_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(APPLIBS_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
|
|
$(APPLIBS_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(APPLIBS_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(APPLIBS_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# SX_COMPLIB
|
|
|
|
|
|
|
|
SPATH := $($(SX_COMPLIB)_SRC_PATH)
|
|
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
|
|
|
|
$(SX_COMPLIB)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_COMPLIB)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_COMPLIB)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
$(SX_COMPLIB_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_COMPLIB_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_COMPLIB_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
|
|
$(SX_COMPLIB_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_COMPLIB_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_COMPLIB_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# SX_EXAMPLES
|
|
|
|
|
|
|
|
SPATH := $($(SX_EXAMPLES)_SRC_PATH)
|
|
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
|
|
|
|
$(SX_EXAMPLES)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_EXAMPLES)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_EXAMPLES)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
$(SX_EXAMPLES_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_EXAMPLES_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_EXAMPLES_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
|
|
$(SX_EXAMPLES_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_EXAMPLES_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_EXAMPLES_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# SX_GEN_UTILS
|
|
|
|
|
|
|
|
SPATH := $($(SX_GEN_UTILS)_SRC_PATH)
|
|
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
|
|
|
|
$(SX_GEN_UTILS)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_GEN_UTILS)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_GEN_UTILS)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
$(SX_GEN_UTILS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_GEN_UTILS_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_GEN_UTILS_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
|
|
$(SX_GEN_UTILS_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_GEN_UTILS_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_GEN_UTILS_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# SX_SCEW
|
|
|
|
|
|
|
|
SPATH := $($(SX_SCEW)_SRC_PATH)
|
|
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
|
|
|
|
$(SX_SCEW)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_SCEW)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_SCEW)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
$(SX_SCEW_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_SCEW_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_SCEW_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
|
|
$(SX_SCEW_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_SCEW_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_SCEW_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# SXD_LIBS
|
|
|
|
|
|
|
|
SPATH := $($(SXD_LIBS)_SRC_PATH)
|
|
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
|
|
|
|
$(SXD_LIBS)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SXD_LIBS)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SXD_LIBS)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
$(SXD_LIBS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SXD_LIBS_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SXD_LIBS_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
|
|
$(SXD_LIBS_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SXD_LIBS_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SXD_LIBS_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# PYTHON_SDK_API
|
|
|
|
|
|
|
|
SPATH := $($(PYTHON_SDK_API)_SRC_PATH)
|
|
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
|
|
|
|
$(PYTHON_SDK_API)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(PYTHON_SDK_API)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(PYTHON_SDK_API)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
|
|
$(PYTHON_SDK_API_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(PYTHON_SDK_API_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(PYTHON_SDK_API_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# SX_ACL_HELPER
|
|
|
|
|
|
|
|
SPATH := $($(SX_ACL_HELPER)_SRC_PATH)
|
|
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
|
|
|
|
$(SX_ACL_HELPER)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_ACL_HELPER)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_ACL_HELPER)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
$(SX_ACL_HELPER_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_ACL_HELPER_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_ACL_HELPER_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
|
|
$(SX_ACL_HELPER_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_ACL_HELPER_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_ACL_HELPER_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# WJH_LIBS
|
|
|
|
|
|
|
|
SPATH := $($(WJH_LIBS)_SRC_PATH)
|
|
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
|
|
|
|
$(WJH_LIBS)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(WJH_LIBS)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(WJH_LIBS)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
$(WJH_LIBS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(WJH_LIBS_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(WJH_LIBS_DEV)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
|
|
$(WJH_LIBS_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(WJH_LIBS_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(WJH_LIBS_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
|
|
endif
|
|
|
|
|
2022-11-28 05:30:40 -06:00
|
|
|
# SX_HASH_CALC
|
|
|
|
|
|
|
|
SPATH := $($(SX_HASH_CALC)_SRC_PATH)
|
|
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
|
|
DEP_FILES += $(shell git ls-files -- $(SPATH))
|
|
|
|
|
|
|
|
$(SX_HASH_CALC)_CACHE_MODE := GIT_CONTENT_SHA
|
|
|
|
$(SX_HASH_CALC)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
|
|
$(SX_HASH_CALC)_DEP_FILES := $(DEP_FILES)
|
|
|
|
|
|
|
|
ifeq ($(SDK_FROM_SRC),y)
|
|
|
|
$(SX_HASH_CALC_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
|
|
|
|
$(SX_HASH_CALC_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
|
|
|
$(SX_HASH_CALC_DBGSYM)_DEP_FILES := $(DEP_FILES)
|
|
|
|
endif
|
|
|
|
|
2020-04-20 21:02:46 -05:00
|
|
|
# SX_KERNEL
|
|
|
|
|
|
|
|
SPATH := $($(SX_KERNEL)_SRC_PATH)
|
|
|
|
SLINKS := $(shell find $(SPATH) -type l -exec echo {} \; | grep -Ev ' ')
|
|
|
|
SMDEP_PATHS := $(shell git submodule status --recursive -- $(SPATH) | awk '{print $$2}' | grep -Ev ' ')
|
|
|
|
SMDEP_FILES := $(foreach path,$(SMDEP_PATHS),$(filter-out $(SMDEP_PATHS),$(addprefix $(path)/,$(shell cd $(path) && git ls-files | grep -Ev ' '))))
|
|
|
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
|
|
|
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
|
|
|
DEP_FILES += $(filter-out $(SMDEP_PATHS),$(shell git ls-files -- $(SPATH) | grep -Ev ' '))
|
|
|
|
|
|
|
|
$(SX_KERNEL)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_KERNEL)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_KERNEL)_DEP_FILES := $(filter-out $(SLINKS),$(DEP_FILES))
|
|
|
|
$(SX_KERNEL)_SMDEP_FILES := $(filter-out $(SLINKS),$(SMDEP_FILES))
|
|
|
|
$(SX_KERNEL)_SMDEP_PATHS := $(SMDEP_PATHS)
|
|
|
|
|
|
|
|
$(SX_KERNEL_DEV)_CACHE_MODE := GIT_CONTENT_SHA
|
2021-06-08 11:38:00 -05:00
|
|
|
$(SX_KERNEL_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
|
2020-04-20 21:02:46 -05:00
|
|
|
$(SX_KERNEL_DEV)_DEP_FILES := $(filter-out $(SLINKS),$(DEP_FILES))
|
|
|
|
$(SX_KERNEL_DEV)_SMDEP_FILES := $(filter-out $(SLINKS),$(SMDEP_FILES))
|
|
|
|
$(SX_KERNEL_DEV)_SMDEP_PATHS := $(SMDEP_PATHS)
|