87bdc1a415
- Why I did it Adjust the Makefile for SDK/python-SDK-API to support both python2 and python3 - How to verify it Build the image and check whether python2 and python3 are both supported by SDK API. Signed-off-by: Stephen Sun <stephens@nvidia.com>
28 lines
810 B
Makefile
28 lines
810 B
Makefile
.ONESHELL:
|
|
SHELL = /bin/bash
|
|
|
|
MAIN_TARGET = python-sdk-api_1.mlnx.$(MLNX_SDK_DEB_VERSION)_amd64.deb
|
|
DERIVED_TARGETS = python-sdk-api-dbgsym_1.mlnx.$(MLNX_SDK_DEB_VERSION)_amd64.deb
|
|
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 -e PYTHON_INTERPRETERS="\"python2 python3\"" -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS)
|
|
|
|
popd
|
|
|
|
mv $(DERIVED_TARGETS) $* $(DEST)/
|
|
|
|
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
|