sonic-buildimage/platform/barefoot/sonic-platform-modules-bfn-newport/debian/rules
Petro Bratash 52b349442d
[BFN] Add support pcied daemon for Montara and Newport (#5199)
Signed-off-by: Petro Bratash <petrox.bratash@intel.com>
2020-08-18 14:32:48 -07:00

39 lines
1.3 KiB
Makefile
Executable File

#!/usr/bin/make -f
export INSTALL_MOD_DIR:=extra
PACKAGE_NAME := sonic-platform-modules-bfn-newport
KVERSION ?= $(shell uname -r)
KERNEL_SRC := /lib/modules/$(KVERSION)
MODULE_SRC := $(shell pwd)/modules
SCRIPT_SRC := $(shell pwd)/scripts
CONFIGS_SRC := $(shell pwd)/configs
PLUGINS_DIR := $(shell pwd)/plugins
%:
dh $@
override_dh_auto_build:
make -C $(KERNEL_SRC)/build M=$(MODULE_SRC)
override_dh_auto_install:
dh_installdirs -p$(PACKAGE_NAME) $(KERNEL_SRC)/$(INSTALL_MOD_DIR)
cp $(MODULE_SRC)/*.ko debian/$(PACKAGE_NAME)/$(KERNEL_SRC)/$(INSTALL_MOD_DIR)
dh_installdirs -p$(PACKAGE_NAME) usr/local/bin
cp -r $(SCRIPT_SRC)/* debian/$(PACKAGE_NAME)/usr/local/bin
dh_installdirs -p$(PACKAGE_NAME) etc/network/interfaces.d/
cp -r $(CONFIGS_SRC)/network/interfaces.d/* debian/$(PACKAGE_NAME)/etc/network/interfaces.d/
dh_installdirs -p$(PACKAGE_NAME) usr/share/sonic/device/x86_64-accton_as9516bf_32d-r0/plugins
cp -r $(PLUGINS_DIR)/* debian/$(PACKAGE_NAME)/usr/share/sonic/device/x86_64-accton_as9516bf_32d-r0/plugins/
override_dh_usrlocal:
override_dh_pysupport:
override_dh_clean:
dh_clean
rm -f $(MODULE_SRC)/*.o $(MODULE_SRC)/*.ko $(MODULE_SRC)/*.mod.c $(MODULE_SRC)/.*.cmd
rm -f $(MODULE_SRC)/Module.markers $(MODULE_SRC)/Module.symvers $(MODULE_SRC)/modules.order
rm -rf $(MODULE_SRC)/.tmp_versions