30 lines
965 B
Makefile
30 lines
965 B
Makefile
|
.ONESHELL:
|
||
|
SHELL = /bin/bash
|
||
|
|
||
|
MAIN_TARGET = sx-obj-desc-lib_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb
|
||
|
DERIVED_TARGETS = sx-obj-desc-lib-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb \
|
||
|
sx-obj-desc-lib-dev-static_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb \
|
||
|
sx-obj-desc-lib-dbgsym_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb
|
||
|
PACKAGE_NAME = sx_obj_desc_lib
|
||
|
|
||
|
$(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)
|