nt9856x/rtos/code/hdal/ext_devices/panel/Makefile
2023-03-28 15:07:53 +08:00

73 lines
2.6 KiB
Makefile
Executable File

KDRV_DIR=$(NVT_HDAL_DIR)/drivers/k_driver
KFLOW_DIR=$(NVT_HDAL_DIR)/drivers/k_flow
SUBDIRS := $(dir $(shell find . -name Makefile))
SUBDIRS := $(shell echo $(SUBDIRS) | sed -e 's/\.\///g';)
# The current directory is passed to sub-makes as argument
PWD := $(shell pwd)
.PHONY: modules modules_install clean $(SUBDIRS)
###############################################################################
# Linux Makefile #
###############################################################################
ifeq ($(NVT_PRJCFG_CFG),Linux)
# To build modules outside of the kernel tree, we run "make"
# in the kernel source tree; the Makefile these then includes this
# Makefile once again.
# This conditional selects whether we are being included from the
# kernel Makefile or not.
ifeq ($(KERNELRELEASE),)
export KBUILD_EXTRA_SYMBOLS = $(shell find $(VOS_DRIVER_DIR) -name Module.symvers) $(shell find $(KDRV_DIR) -name Module.symvers) $(shell find $(KFLOW_DIR) -name Module.symvers)
modules:
@$(MAKE) -C $(KERNELDIR) M=$(PWD) modules $(NVT_MULTI_CORES_FLAG);
modules_install:
@if [ -z $(NVT_MOD_INSTALL) ]; then \
$(MAKE) -C $(KERNELDIR) M=$(PWD) INSTALL_MOD_PATH=./_install_modules/ INSTALL_MOD_DIR=hdal modules_install; \
else \
$(MAKE) -C $(KERNELDIR) M=$(PWD) INSTALL_MOD_PATH=$(NVT_MOD_INSTALL) INSTALL_MOD_DIR=hdal modules_install; \
fi
clean:
@rm -rf Module.symvers modules.order .tmp_versions
@for n in $(SUBDIRS); do \
$(MAKE) -C $$n clean $(NVT_MULTI_CORES_FLAG); \
done
else
# called from kernel build system: just declare what our modules are
obj-m += \
disp_off/ \
display_panel/ \
display_panel/disp_if8b_lcd1_aucn01/ \
display_panel/disp_if8b_lcd1_pw35p00_hx8238d/ \
display_panel/disp_ifdsi_lcd1_nt35510/ \
display_panel/disp_ifdsi_lcd1_ut35067a0_ili9488/ \
display_panel/disp_ifpa_lcd1_wm08001_sn75lvds83b/ \
display_panel/disp_if8b_lcd1_psd300_ili8961/ \
display_panel/disp_ifdsi_lcd1_tb093/ \
display_panel/disp_if8b_lcd1_tp2803/ \
display_panel/disp_if8b_lcd1_psd200_st7789v/
endif
###############################################################################
# rtos Makefile #
###############################################################################
else ifeq ($(NVT_PRJCFG_CFG),rtos)
modules: $(SUBDIRS)
$(SUBDIRS):
@$(MAKE) -C $@ modules $(NVT_MULTI_CORES_FLAG)
modules_install:
@for n in $(SUBDIRS); do \
$(MAKE) -C $$n modules_install; \
done
clean:
@for n in $(SUBDIRS); do \
$(MAKE) -C $$n clean; \
done
@rm output -rf
endif