MULTI_DEPEND_TARGET += sdk_prebuilds
MULTI_TARGET_CLEAN  += sdk_prebuilds_clean
MULTI_DEPEND_TARGETD += sdk_prebuildsd
MULTI_TARGET_CLEAND  += sdk_prebuildsd_clean

sdk_prebuilds:$(CONFIG_SDK_PREBUILD_LIB)
sdk_prebuilds_clean:$(addsuffix _clean,$(CONFIG_SDK_PREBUILD_LIB))
sdk_prebuildsd:$(addsuffix _d,$(CONFIG_SDK_PREBUILD_LIB))
sdk_prebuildsd_clean:$(addsuffix _d_clean,$(CONFIG_SDK_PREBUILD_LIB))

ZERO_DIR := $(SDK_DRIVER_DIR)/Arch/$(CONFIG_CHIP)/zero
libzero.a:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(ZERO_DIR)/Makefile.mk
libzero.a_d:
	@$(MAKE) release COMPILE_MODE=release  -C "$(BUILD_OUT_OBJ_DIR)" -f $(ZERO_DIR)/Makefile.mk
libzero.a_clean:
	@$(MAKE) clean -f $(EFUSE_DIR)/Makefile.mk
libzero.a_d_clean:
	@$(MAKE) clean -f $(EFUSE_DIR)/Makefile.mk
	
DDRDIR := $(SDK_DIR)/Boot/Chip/$(CONFIG_CHIP)/DDR
libddr.a:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(DDRDIR)/Makefile.mk
libddr.a_d:
	@$(MAKE) release COMPILE_MODE=release  -C "$(BUILD_OUT_OBJ_DIR)" -f $(DDRDIR)/Makefile.mk
libddr.a_clean:
	@$(MAKE) clean -f $(DDRDIR)/Makefile.mk
libddr.a_d_clean:
	@$(MAKE) clean -f $(DDRDIR)/Makefile.mk

PQDIR := $(SDK_DRIVER_DIR)/DPU/PQ
libpq.a:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(PQDIR)/Makefile.mk
libpq.a_d:
	@$(MAKE) release COMPILE_MODE=release  -C "$(BUILD_OUT_OBJ_DIR)" -f $(PQDIR)/Makefile.mk
libpq.a_clean:
	@$(MAKE) clean -f $(PQDIR)/Makefile.mk
libpq.a_d_clean:
	@$(MAKE) clean -f $(PQDIR)/Makefile.mk

BCONDIR := $(SDK_DRIVER_DIR)/BCON/
libbcon.a:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(BCONDIR)/Makefile.mk
libbcon.a_d:
	@$(MAKE) release COMPILE_MODE=release  -C "$(BUILD_OUT_OBJ_DIR)" -f $(BCONDIR)/Makefile.mk
libbcon.a_clean:
	@$(MAKE) clean -f $(BCONDIR)/Makefile.mk
libbcon.a_d_clean:
	@$(MAKE) clean -f $(BCONDIR)/Makefile.mk



DISPCTRLDIR := $(SDK_DRIVER_DIR)/DisplayCtrl
libDispCtrl.a:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(DISPCTRLDIR)/Makefile.mk
libDispCtrl.a_d:
	@$(MAKE) release COMPILE_MODE=release  -C "$(BUILD_OUT_OBJ_DIR)" -f $(DISPCTRLDIR)/Makefile.mk
libDispCtrl.a_clean:
	@$(MAKE) clean -f $(DISPCTRLDIR)/Makefile.mk
libDispCtrl.a_d_clean:
	@$(MAKE) clean -f $(DISPCTRLDIR)/Makefile.mk

AESDECRYDIR := $(SDK_MIDDLEWARE_DIR)/InputPortManager/HDCP/aesdeckey/
libAesKey.a:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(AESDECRYDIR)/Makefile.mk
libAesKey.a_d:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(AESDECRYDIR)/Makefile.mk
libAesKey.a_clean:
	@$(MAKE) clean -f $(AESDECRYDIR)/Makefile.mk
libAesKey.a_d_clean:
	@$(MAKE) clean -f $(AESDECRYDIR)/Makefile.mk

HDMICALDIR := $(SDK_DRIVER_DIR)/HDMI/cal/$(CONFIG_CHIP)/
libHdmiCal.a:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(HDMICALDIR)/Makefile.mk
libHdmiCal.a_d:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(HDMICALDIR)/Makefile.mk
libHdmiCal.a_clean:
	@$(MAKE) clean -f $(HDMICALDIR)/Makefile.mk
libHdmiCal.a_d_clean:
		@$(MAKE) clean -f $(HDMICALDIR)/Makefile.mk


DPRXCALDIR := $(SDK_DRIVER_DIR)/DisplayPort/cal/ht7315
libDpRxCal.a:
		@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(DPRXCALDIR)/Makefile.mk
libDpRxCal.a_d:
		@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(DPRXCALDIR)/Makefile.mk
libDpRxCal.a_clean:
		@$(MAKE) clean -f $(DPRXCALDIR)/Makefile.mk
libDpRxCal.a_d_clean:
		@$(MAKE) clean -f $(DPRXCALDIR)/Makefile.mk

HDCPCALDIR := $(SDK_DRIVER_DIR)/HDCP/cal/$(CONFIG_CHIP)/
libHdcpCal.a:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(HDCPCALDIR)/Makefile.mk
libHdcpCal.a_d:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(HDCPCALDIR)/Makefile.mk
libHdcpCal.a_clean:
	@$(MAKE) clean -f $(HDCPCALDIR)/Makefile.mk
libHdcpCal.a_d_clean:
	@$(MAKE) clean -f $(HDCPCALDIR)/Makefile.mk

HDCPENGINEDIR := $(SDK_DRIVER_DIR)/HDCP/Engine/$(CONFIG_CHIP)/
libHdcpEngine.a:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(HDCPENGINEDIR)/Makefile.mk
libHdcpEngine.a_d:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(HDCPENGINEDIR)/Makefile.mk
libHdcpEngine.a_clean:
	@$(MAKE) clean -f $(HDCPCALDIR)/Makefile.mk
libHdcpEngine.a_d_clean:
	@$(MAKE) clean -f $(HDCPCALDIR)/Makefile.mk

DPUDCWDIR := $(SDK_DRIVER_DIR)/DPU/DCW/cal/$(CONFIG_CHIP)/
libDpuDcw.a:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(DPUDCWDIR)/Makefile.mk
libDpuDcw.a_d:
	@$(MAKE) release COMPILE_MODE=release -C "$(BUILD_OUT_OBJ_DIR)" -f $(DPUDCWDIR)/Makefile.mk
libDpuDcw.a_clean:
	@$(MAKE) clean -f $(DPUDCWDIR)/Makefile.mk
libDpuDcw.a_d_clean:
	@$(MAKE) clean -f $(DPUDCWDIR)/Makefile.mk
