# SPDX-License-Identifier: GPL-2.0-only # ------------------------------------------------------------------ #SPDX-License-Identifier: GPL-2-only ARCH := arm64 # clang CLANG_PATH := /mnt/fileroot/zhiwei.zhang/a9_kernel/common16-6.12/prebuilts/clang/host/linux-x86/clang-r536225/bin CC := $(CLANG_PATH)/clang # GCC (binutils: ld/ar/objcopy/strip) GCC_PATH := /mnt/fileroot/zhiwei.zhang/a9_kernel/common16-6.12/prebuilts/gcc/host/linux-x86/aarch64-none-linux-gnu/bin CROSS_COMPILE := $(GCC_PATH)/aarch64-none-linux-gnu- KDIR = /mnt/fileroot/zhiwei.zhang/a9_kernel/common16-6.12/out/android16-6.12/common CACHE_FILE = /mnt/fileroot/zhiwei.zhang/a9_kernel/common16-6.12/out/cache/last_build/common/Module.symvers KBUILD_EXTRA_SYMBOLS := $(KDIR)/Module.symvers define build_module_func make ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KDIR) M=$(CURDIR)/$(1) modules endef define clean_module_func make ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KDIR) M=$(CURDIR)/$(1) clean endef .PHONY: clean all: cp $(CACHE_FILE) $(KDIR)/Module.symvers $(call build_module_func,csi2) $(call build_module_func,adap) $(call build_module_func,isp5) $(call build_module_func,sensor/imx290) $(call build_module_func,sensor/ov5640) $(call build_module_func,sensor/max96712) $(call build_module_func,sensor/ov13855) $(call build_module_func,sensor/ov51a40) $(call build_module_func,sensor/imx415) vout: cp $(CACHE_FILE) $(KDIR)/Module.symvers $(call build_module_func,vpu) clean: $(call clean_module_func,csi2) $(call clean_module_func,adap) $(call clean_module_func,isp5) $(call clean_module_func,sensor/imx290) $(call clean_module_func,sensor/ov5640) $(call clean_module_func,sensor/max96712) $(call clean_module_func,sensor/ov13855) $(call clean_module_func,sensor/ov51a40) $(call clean_module_func,sensor/imx415) cleanvout: $(call clean_module_func,vpu)