sonic-buildimage/platform/broadcom/sonic-platform-modules-accton/as7716-32x/modules/Makefile
Roy Lee 483bd9bbd8 [platform][Broadcom]Accton, fix building error of kernel modules. (#2197)
* [platform]accton, fix building error of kernel modules at platform broadcom.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Refine codes by formatter.
Signed-off-by: roy_lee <roy_lee@accton.com>
2018-10-26 16:34:07 -07:00

22 lines
665 B
Makefile
Executable File

ifneq ($(KERNELRELEASE),)
obj-m:= accton_as7716_32x_cpld1.o accton_as7716_32x_fan.o \
accton_as7716_32x_leds.o accton_as7716_32x_psu.o cpr_4011_4mxx.o ym2651y.o \
accton_i2c_cpld.o
else
ifeq (,$(KERNEL_SRC))
#$(error KERNEL_SRC is not defined)
KVERSION := $(shell uname -r)
KERNEL_DIR = /usr/src/linux-headers-$(KVERSION)/
KERNELDIR:=$(KERNEL_DIR)
#export KERNELDIR:=${PWD}/../../../../../src/sonic-linux-kernel/linux-3.16.43/
else
KERNELDIR:=$(KERNEL_SRC)
endif
PWD:=$(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
clean:
rm -rf *.o *.mod.o *.mod.o *.ko .*cmd .tmp_versions Module.markers Module.symvers modules.order
endif