
PLATFORM_TARGET_O=
include $(BUILD_DIR)/compile/$(CONFIG_CHIP)/common.inc

INCLUDES += -I$(SDK_DIR)
INCLUDES += -I$(SDK_COMMON_DIR)
INCLUDES += -I$(SDK_COMMON_DIR)/Event
INCLUDES += -I$(SDK_COMMON_DIR)/Assert
INCLUDES += -I$(SDK_COMMON_DIR)/PLATFORM/inc
INCLUDES += -I$(SDK_COMMON_DIR)/Util/HvQueue/inc
INCLUDES += -I$(SDK_COMMON_DIR)/Timer/inc
INCLUDES += -I$(SDK_MIDDLEWARE_DIR)/ChannelManager/inc
INCLUDES += -I$(SDK_MIDDLEWARE_DIR)/RunTime/SystemTask/inc
INCLUDES += -I$(SDK_MIDDLEWARE_DIR)/PLATFORM/inc
INCLUDES += -I$(SDK_MIDDLEWARE_DIR)/AppInterface
INCLUDES += -I$(SDK_MIDDLEWARE_DIR)/Factory/inc
INCLUDES += -I$(SDK_VOS_DIR)/inc
INCLUDES += -I$(SDK_VOS_DIR)/risc/inc
INCLUDES += -I$(SDK_DRIVER_DIR)/PLATFORM/drv/inc
INCLUDES += -I$(SDK_DRIVER_DIR)/PLATFORM/cal/$(CONFIG_CHIP)/inc
INCLUDES += -I$(SDK_DRIVER_DIR)/Peripheral/Drv/Inc
INCLUDES += -I$(SDK_DRIVER_DIR)/Peripheral/Cal/$(CONFIG_CHIP)/Inc
INCLUDES += -I$(SDK_BOOT_DIR)/../Driver/Arch/$(CONFIG_CHIP)
INCLUDES += -I$(ROOT_DIR)/user/$(CONFIG_VENDOR)/$(CONFIG_PROJECT)
INCLUDES += -I$(USER_DATABASE_DIR)/inc
INCLUDES += -I$(ROOT_DIR)/user/$(CONFIG_VENDOR)/$(CONFIG_PROJECT)/Panel/inc
INCLUDES += -I$(ROOT_DIR)/user/$(CONFIG_VENDOR)/$(CONFIG_PROJECT)/System
INCLUDES += -I$(USER_PLATFORM_DIR)/Inc
INCLUDES += -I$(USER_KEYPAD_DIR)/Inc
INCLUDES += -I$(USER_OSD_DIR)/Common/inc
INCLUDES += -I$(USER_OSD_DIR)/Behaviour/inc

PLATFORM_LIB=$(BUILD_OUT_IMG_DIR)/libplatform.a

release:$(PLATFORM_LIB)
debug:$(PLATFORM_LIB)

VPATH += $(USER_PLATFORM_DIR)/Src
OBJ_PLATFORM_C = $(wildcard $(USER_PLATFORM_DIR)/Src/*.c)
OBJ_PLATFORM_C_NODIR = $(notdir $(OBJ_PLATFORM_C))
OBJ_PLATFORM_C_O = $(OBJ_PLATFORM_C_NODIR:%.c=%.o)
PLATFORM_TARGET_O += $(OBJ_PLATFORM_C_O)

PLATFORM_NO_DIR_O = $(PLATFORM_TARGET_O)
PLATFORM_WITH_DIR_O= $(addprefix $(BUILD_OUT_OBJ_DIR)/,$(PLATFORM_NO_DIR_O))
$(PLATFORM_LIB):$(PLATFORM_NO_DIR_O)
	$(HEADER)$(AR) qc $@ $(PLATFORM_WITH_DIR_O)
	$(HEADER)$(RANLIB) $@
