0e01ff557b
* [.gitignore] add missing directories to .gitignore Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> * [buildsystem] add ability to override make variables from root Makefile To override any make variable during build use SONIC_OVERRIDE_BUILD_VARS, e.g: "make SONIC_OVERRIDE_BUILD_VARS="PARAM1=A PARAM2=B" all" Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> * [mellanox] add SDK build from sources Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> * [mellanox] pass -j$(SONIC_CONFIG_MAKE_JOBS) when building SDK Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> * [mellanox] Add MLNX_SAI_REPO, MLNX_FW_BASE_URL variables Signed-off-by: Stepan Blyschak <stepanb@mellanox.com> * [mellanox] if MLNX_SDK_BASE_SOURCE_URL is not empty then build SDK from sources Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
28 lines
702 B
Makefile
28 lines
702 B
Makefile
.ONESHELL:
|
|
SHELL = /bin/bash
|
|
|
|
MAIN_TARGET = python-sdk-api_1.mlnx.$(MLNX_SDK_DEB_VERSION)_amd64.deb
|
|
DERIVED_TARGETS =
|
|
PACKAGE_NAME = python_sdk_api
|
|
|
|
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
|
# get sources
|
|
rm -rf $(PACKAGE_NAME)-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION)
|
|
|
|
wget -c $(MLNX_SDK_SOURCE_BASE_URL)/$(PACKAGE_NAME)-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION).tar.gz -O - | tar -xz
|
|
|
|
# build
|
|
pushd $(PACKAGE_NAME)-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION)
|
|
|
|
if [ -f autogen.sh ]; then
|
|
./autogen.sh
|
|
fi
|
|
|
|
debuild -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS)
|
|
|
|
popd
|
|
|
|
mv $(DERIVED_TARGETS) $* $(DEST)/
|
|
|
|
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
|