#Copyright (C) 2022 CIX Technology, Inc. All Rights Reserved.
#
#The code contained herein is licensed under the GNU General Public
#License. You may obtain a copy of the GNU General Public License
#Version 2 or later at the following locations:
#
#http://www.opensource.org/licenses/gpl-license.html
#http://www.gnu.org/copyleft/gpl.html
###############################################################################
#
#    @file   Makefile
#
#    @brief  configuration file to compile the CIX tests.
#
###############################################################################
#Revision History:
#                            Modification     Tracking
#Author/core ID                  Date          Number    Description of Changes
#-------------------------   ------------    ----------  -------------------------------------------
#Anthony Tian                 07/06/2022      N/A         Init verison
###############################################################################
#Portability: ARM GCC
#
###############################################################################

top_srcdir              ?= $(CURDIR)/../../

CFLAGS += -I$(top_srcdir)/include/old/

include ./cix_configs/${ARCH_PLATFORM}_deconfigs


SUBDIRS-$(CONFIG_CIX_ALSA)        := alsa_tests
SUBDIRS-$(CONFIG_CIX_THIRD)        += third_party_tests
SUBDIRS-$(CONFIG_CIX_SKEYE)        += skeye_tests
SUBDIRS-$(CONFIG_CIX_VPU)          += vpu_tests
SUBDIRS-$(CONFIG_CIX_PM)           += pm_tests
SUBDIRS-$(CONFIG_CIX_DSP)          += dsp_tests
SUBDIRS-$(CONFIG_CIX_ISP)          += isp_tests
SUBDIRS-$(CONFIG_CIX_GST)          += gstreamer_tests
SUBDIRS-$(CONFIG_CIX_RTC)          += rtc_tests
SUBDIRS-$(CONFIG_CIX_ENET)         += eth_tests
SUBDIRS-$(CONFIG_CIX_LSIO)          += lsio_tests
SUBDIRS-$(CONFIG_CIX_WDT)          += wdt_tests
SUBDIRS-$(CONFIG_CIX_PCIE)         += pcie_tests
SUBDIRS-$(CONFIG_CIX_CLK)          += clk_tests
SUBDIRS-$(CONFIG_CIX_USB)          += usb_tests
SUBDIRS-$(CONFIG_CIX_DMA)          += dma_tests
SUBDIRS-$(CONFIG_CIX_IO)           += io_performance
SUBDIRS-$(CONFIG_CIX_LINUXOS)      += linuxos_tests

SUBDIRS-$(CONFIG_DDT_TESTS)        += ddt_tests
SUBDIRS-$(CONFIG_CIX_DPU)          += dpu_tests
SUBDIRS-$(CONFIG_CIX_GPT)          += gpt_tests
SUBDIRS-$(CONFIG_CIX_GPIO)         += gpio_tests
SUBDIRS-$(CONFIG_CIX_AI)           += ai_tests
SUBDIRS-$(CONFIG_CIX_GPU)          += gpu_tests
SUBDIRS-$(CONFIG_CIX_Tool)         += tools
SUBDIRS-$(CONFIG_CIX_CSIDMA)       += csidma_tests
SUBDIRS-$(CONFIG_CIX_PERF)         += perf_tests
SUBDIRS-$(CONFIG_CIX_WIFI)         += wifi_tests
SUBDIRS-$(CONFIG_CIX_FFMPEG)       += ffmpeg_tests
SUBDIRS-$(CONFIG_CIX_MEM)          += mem_tests
SUBDIRS-$(CONFIG_CIX_BT)           += bt_tests
SUBDIRS-$(CONFIG_OMAP_HWSPINLOCK)  += hwspinlock_tests
SUBDIRS-$(CONFIG_CIX_FFMPEG_VAAPI)  += ffmpeg_vaapi_tests
SUBDIRS-$(CONFIG_CIX_VAAPI)        += vaapi_tests
SUBDIRS-$(CONFIG_CIX_IPA)          += ipa_tests
SUBDIRS-$(CONFIG_CIX_KERNEL)       += kernel_tests
SUBDIRS-$(CONFIG_CIX_LTP)          += ltp_tests
SUBDIRS-$(CONFIG_CIX_LIBCME)       += libcme_tests

all:
	@set -e; for i in $(SUBDIRS-y); do $(MAKE) -C $$i ; done

install:
	-mkdir -p ../bin; for i in $(SUBDIRS-y); do $(MAKE) -C $$i install ; done

clean:
	@set -e; for i in $(SUBDIRS-y); do $(MAKE) -C $$i clean ; done
