# include UCLICDIR and CROSS # !! DO NOT reset CFLAGS (i.e. use CFLAGS+=xxx, NOT CFLAGS=xxx) after this include include ../../../Makefile.project include ../../../Makefile.toolchain #*************************************************************************** # Define Environment Variables #*************************************************************************** ifndef LIB_DIR LIB_DIR = ../../../lib endif ifndef ROOT_DIR ROOT_DIR = ../../../.. endif KERNELDIR = ../../../../kernel/linux ifneq ($(CONFIG_ISDB_SYSTEM),y) ifeq ($(CONFIG_TV_NEW_UI),y) UIRESOURCE_DIR = resources_new MEDIA_UIRESOURCE_DIR = resources_new else ifeq ($(CONFIG_SUPPORT_32M_ATV), y) UIRESOURCE_DIR = resources_4BPP MEDIA_UIRESOURCE_DIR = resources_4BPP else ifeq ($(CONFIG_SUPPORT_MONITOR), y) UIRESOURCE_DIR = resources_monitor #MEDIA_UIRESOURCE_DIR = resources_monitor else UIRESOURCE_DIR = resources MEDIA_UIRESOURCE_DIR = resources endif else UIRESOURCE_DIR = sbtvd_resources MEDIA_UIRESOURCE_DIR = resources endif UIRESOURCE_INC = -I$(CURDIR)/$(UIRESOURCE_DIR)/include -I$(CURDIR)/$(UIRESOURCE_DIR)/font/include ifeq ($(CONFIG_TV_NEW_UI), y) ifeq ($(CONFIG_DTMB_SYSTEM), y) UIRESOURCE_INC +=-I$(CURDIR)/$(UIRESOURCE_DIR)/string/include_forDTMB else ifdef CONFIG_SUPPORT_64M_DTV UIRESOURCE_INC +=-I$(CURDIR)/$(UIRESOURCE_DIR)/string/include_for64M else UIRESOURCE_INC +=-I$(CURDIR)/$(UIRESOURCE_DIR)/string/include endif endif else #else ifdef CONFIG_SUPPORT_64M_DTV UIRESOURCE_INC +=-I$(CURDIR)/$(UIRESOURCE_DIR)/string/include_for64M else UIRESOURCE_INC +=-I$(CURDIR)/$(UIRESOURCE_DIR)/string/include endif endif export UIRESOURCE_DIR export UIRESOURCE_INC USE_LIBPNG = n ifeq ($(CONFIG_SUPPORT_MHEG5),y) USE_LIBPNG = y endif ifeq ($(CONFIG_MEDIA_PHOTO_PNG),y) USE_LIBPNG = y endif USE_LIBJPG = n ifeq ($(CONFIG_SUPPORT_MHEG5_HD),y) USE_LIBJPG = y endif ifeq ($(CONFIG_MEDIA_PHOTO_JPG),y) USE_LIBJPG = y endif USE_AV_DEV=n ifeq ($(CONFIG_DTV_SUPPORT),y) USE_AV_DEV=y endif ifeq ($(CONFIG_MEDIA_ENABLE),y) USE_AV_DEV=y endif ifeq ($(CONFIG_SUPPORT_NETWORK),y) USE_AV_DEV=y endif #*************************************************************************** # Define Compiler Flags #*************************************************************************** ifeq ($(CONFIG_EXE_STATIC),y) LIBS += $(UCLIBCDIR)/usr/lib/libpthread.a LIBS += $(UCLIBCDIR)/usr/lib/librt.a LIBS += $(UCLIBCDIR)/usr/lib/libm.a else LDFLAGS += -lrt -ldl endif ifeq ($(CONFIG_VERSION),release) CFLAGS += -Dwatchdog endif include $(LIB_DIR)/lib.mak ifeq ($(CONFIG_MEDIA_ENABLE),y) LIBS += $(LIB_MIDMEDIA_STATIC) endif LIBS += $(LIB_FS_STATIC) ifeq ($(USE_AV_DEV),y) LIBS += ../../../av_dev/runav/lib/librunav.a LIBS += ../../../av_dev/runav/lib/libavutil.a LIBS += ../../../av_dev/runav/lib/libavformat.a LIBS += ../../../av_dev/runav/lib/libavcodec.a LIBS += $(LIB_MATH_EN_STATIC) LIBS += ../../../av_dev/mpdev/lib/libmpdev.a ifeq ($(CONFIG_RUNAV_MEMORY_DEBUG), y) LIBS += ../../../av_dev/debug_memory/libDbgMem.a endif ifeq ($(CONFIG_DTV_SUPPORT),y) LIBS += $(LIB_RECORD_STATIC) endif ifeq ($(CONFIG_MEDIA_ENABLE),y) LIBS += $(LIB_PICAPI_STATIC) endif ifeq ($(USE_LIBJPG),y) LIBS += $(LIB_JPG_STATIC) endif ifeq ($(USE_LIBPNG),y) LIBS += $(LIB_PNG_STATIC) endif #add openssl library for https ifeq ($(CONFIG_SUPPORT_NETWORK),y) LIBS += $(LIB_OPENSSL) endif endif LIBS += $(LIB_ZLIB_STATIC) ifeq ($(CONFIG_SUPPORT_DASH),y) LIBS += $(LIB_LIBXML2) endif #ifeq ($(CONFIG_ATV_SUPPORT),y) LIBS += $(LIB_ATVGUIOBJ_STATIC) #endif ifeq ($(CONFIG_DTV_SUPPORT),y) LIBS += $(LIB_DTVGUIOBJ_STATIC) endif ifeq ($(CONFIG_MEDIA_ENABLE),y) LIBS += $(LIB_MEDIAGUIOBJ_STATIC) endif ifeq ($(CONFIG_SUPPORT_NETAPP),y) LIBS += $(LIB_NETWORKGUIOBJ_STATIC) endif LIBS += $(LIB_APPCOMMON_STATIC) LIBS += $(LIB_SYSCOMMONGUIOBJ_STATIC) LIBS += $(LIB_DTVUI_STATIC) ifeq ($(CONFIG_MEDIA_ENABLE),y) LIBS += $(LIB_MMUI_STATIC) endif ifeq ($(CONFIG_SUPPORT_NETAPP),y) LIBS += $(LIB_NETUI_STATIC) endif LIBS += $(LIB_APPINFRA_STATIC) LIBS += $(LIB_GSL_STATIC) LIBS += $(LIB_AFW_STATIC) ifneq ($(filter y,$(CONFIG_DTV_SUPPORT) $(CONFIG_ATV_SUPPORT)),) LIBS += $(LIB_MIDDATABASE_STATIC) endif LIBS += $(LIB_UPGRADE_STATIC) ifeq ($(CONFIG_DTV_SUPPORT),y) LIBS += $(LIB_MIDDTV_STATIC) endif ifeq ($(CONFIG_DTV_SUPPORT),y) LIBS += $(LIB_MIDLOGO_STATIC) endif ifeq ($(CONFIG_CI_SUPPORT),y) LIBS += $(LIB_DTVCI_STATIC) LIBS += $(LIB_CIPLUS_STATIC) LIBS += $(LIB_TFM_STATIC) endif LIBS += $(LIB_APPDAEMON_STATIC) LIBS += $(LIB_MIDDISPLAY_STATIC) LIBS += $(LIB_IOCTLINTERFACE_STATIC) LIBS += $(LIB_TVFE_STATIC) ifeq ($(CONFIG_ATV_SUPPORT), y) LIBS += $(LIB_MIDATV_STATIC) endif LIBS += $(LIB_OSDLIB_STATIC) LIBS += $(LIB_GUIENG_STATIC) LIBS += $(LIB_UNICODE_STATIC) ifeq ($(CONFIG_SUPPORT_SUBTITLE),y) LIBS += $(LIB_SUBTITLE_STATIC) endif ifeq ($(CONFIG_SUPPORT_CEC_TV),y) LIBS += $(LIB_CECTV_STATIC) endif LIBS += $(LIB_PARTITIONMNG_STATIC) ifeq ($(CONFIG_SUPPORT_PVR),y) LIBS += $(LIB_MIDPVR_STATIC) endif LIBS += $(LIB_KEYUPDATE_STATIC) LIBS += $(LIB_DAEMON_STATIC) LIBS += $(LIB_MIDDEBUG_STATIC) ifeq ($(CONFIG_MEMWATCH), y) LIBS += $(LIB_MEMWATCH_STATIC) endif ifeq ($(CONFIG_SUPPORT_MHEG5),y) LIBS += $(LIB_MHEG5_STATIC) endif ifeq ($(CONFIG_SUPPORT_TTX),y) LIBS += $(LIB_TTX_STATIC) endif ifeq ($(CONFIG_CC_SUPPORT),y) LIBS += $(LIB_CC_STATIC) endif ifneq ($(filter y,$(CONFIG_MOD_PACK_TT) $(CONFIG_MOD_PACK_SUB)),) LIBS += $(LIB_TTCCMALLOC_STATIC) endif ifeq ($(CONFIG_SUPPORT_NEW_AIRPLAY),y) LIBS += $(LIB_NEW_AIRPLAY_STATIC) endif ifeq ($(CONFIG_EXTIC_FRC),y) LIBS += $(LIB_EXTIC_FRC) endif ifeq ($(CONFIG_EXTIC_HDMI_SWITCH),y) LIBS += $(LIB_EXTIC_HDMI_SWITCH) endif ifeq ($(CONFIG_EXTIC_DIGITALAMP),y) LIBS += $(LIB_EXTIC_DIGITALAMP) endif ifeq ($(CONFIG_EXTIC_KEYSTONE_CORRECTION),y) LIBS += $(LIB_EXTIC_KEYSTONE_CORRECTION) endif ifneq ($(filter y,$(CONFIG_DTV_SUPPORT) $(CONFIG_ATV_SUPPORT)),) LIBS += $(LIB_MWUSBEDIT) endif LIBS += $(LIB_UMFEVENT_STATIC) ifeq ($(CONFIG_MIFI_SUPPORT),y) LIBS += $(LIB_MIFI_STATIC) endif ifeq ($(CONFIG_CALL_TRACE),y) LIBS += $(LIB_CALL_TRACE) endif ifeq ($(CONFIG_SUPPORT_NETWORK),y) LIBS += $(LIB_NETWORK_SETTING_STATIC) ifeq ($(CONFIG_SUPPORT_NET_OTA),y) LIBS += $(LIB_NETWORK_OTA_STATIC) endif ifeq ($(CONFIG_SUPPORT_USB_MCAST), y) LIBS += $(LIB_MCAST) endif endif ifeq ($(CONFIG_SUPPORT_CHECK_STRING_SIZE), y) LIBS += $(LIB_CHK_STR) endif LIBS += $(LIB_LZMA) # debug tool shall be the last LIBS += $(LIB_DEBUG_TOOLS) #game ifeq ($(CONFIG_OSD_GAME_SUPPORT), y) LIBS += $(LIB_OSD_GAME) endif ifeq ($(CONFIG_SUPPORT_NES_GAME), y) LIBS += $(LIB_NES_GAME) LIBS += $(LIB_NES_CORE) endif LIBS += $(LIB_NEDMALLOC) ifeq ($(CONFIG_RUNAV_USE_RESERVE_MEMORY), y) LIBS += $(LIB_AVMEM) endif #Miracast ifeq ($(CONFIG_SUPPORT_MIRACAST), y) LIBS += $(LIB_MIRACAST) endif ifeq ($(CONFIG_SUPPORT_DLNA), y) LIBS += $(LIB_DLNA) endif ifeq ($(CONFIG_SUPPORT_HBBTV), y) LIBS += $(LIB_HBBTV) endif ifeq ($(CONFIG_BT_RDA5856),y) LIBS += $(LIB_BT5856) endif EXTRA_OBJS += -Wl,--start-group $(LIBS) -Wl,--end-group INCLUDE += -I./include INCLUDE += -I./atv/include INCLUDE += -I./atv/include/guiobj INCLUDE += -I./atv/include/app_atv_api ifeq ($(CONFIG_DVB_SYSTEM),y) INCLUDE += -I./dvb/include INCLUDE += -I./dvb/include/guiobj INCLUDE += -I./dvb/include/app_dvb_api endif ifeq ($(CONFIG_DTMB_SYSTEM),y) INCLUDE += -I./dtmb/include INCLUDE += -I./dtmb/include/guiobj INCLUDE += -I./dtmb/include/app_dvb_api endif ifeq ($(CONFIG_ISDB_SYSTEM),y) INCLUDE += -I./sbtvd/include INCLUDE += -I./sbtvd/include/guiobj INCLUDE += -I./sbtvd/include/app_sbtvd_api endif ifeq ($(CONFIG_MEDIA_ENABLE),y) INCLUDE += -I./media/include INCLUDE += -I./media/include/gui_objects endif ifeq ($(CONFIG_SUPPORT_NETAPP),y) INCLUDE += -I./network/include INCLUDE += -I./network/resources/include endif INCLUDE += -I./include/guiobj INCLUDE += -I./include/app_common_api INCLUDE += -I../../../include INCLUDE += -I../../../include/gsl INCLUDE += -I../../../include/app_infra INCLUDE += -I../../app_frmwrk/monitor/include INCLUDE += -I../../app_frmwrk/monitor/component/include INCLUDE += -I../../daemon/include INCLUDE += $(UIRESOURCE_INC) ifeq ($(CONFIG_TV_NEW_UI),y) INCLUDE += -I./media/resources_new/include #else ifeq ($(CONFIG_SUPPORT_MONITOR),y) #INCLUDE += -I./media/resources_monitor/include else INCLUDE += -I./media/resources/include endif ifeq ($(CONFIG_OSD_GAME_SUPPORT),y) INCLUDE += -I../../../../include/game endif INCLUDE += -I../../../app_infra/include INCLUDE += -I../../../include/middleware/ioctl_interface ifneq ($(filter y,$(CONFIG_DTV_SUPPORT) $(CONFIG_ATV_SUPPORT)),) INCLUDE += -I../../../include/middleware/database endif INCLUDE += -I../../../include/middleware/tvfe ifeq ($(CONFIG_DTV_SUPPORT),y) INCLUDE += -I../../../include/middleware/logo endif ifeq ($(CONFIG_SUPPORT_CEC_TV),y) INCLUDE += -I../../../include/middleware/cec_tv endif ifeq ($(CONFIG_ATV_SUPPORT),y) INCLUDE += -I../../../include/middleware/atv/atv_scan INCLUDE += -I../../../include/middleware/atv/atv_afc INCLUDE += -I../../../include/middleware/atv/atv_ats endif INCLUDE += -I../../../include/middleware/display ifeq ($(CONFIG_DTV_SUPPORT),y) INCLUDE += -I../../../include/middleware/dtv/dtvcommon INCLUDE += -I../../../include/middleware/dtv/dtvmonitor INCLUDE += -I../../../include/middleware/dtv/dtvplayback INCLUDE += -I../../../include/middleware/dtv/dtvpsimonitor INCLUDE += -I../../../include/middleware/dtv/dtvsipsi INCLUDE += -I../../../include/middleware/dtv/dtvscan INCLUDE += -I../../../include/middleware/dtv/dtvepg INCLUDE += -I../../../include/middleware/dtv/dtvota INCLUDE += -I../../../include/middleware/dtv/dtv_record INCLUDE += -I../../../include/middleware/dtv/dtvci endif ifeq ($(CONFIG_SUPPORT_MHEG5),y) INCLUDE += -I../../../include/middleware/dtv/dtvmheg5 endif ifeq ($(CONFIG_MEDIA_ENABLE),y) INCLUDE += -I../../../include/middleware/media/filesystem INCLUDE += -I../../../include/middleware/media/playlist INCLUDE += -I../../../include/middleware/media/player INCLUDE += -I../../../include/middleware/media/musicplaylist INCLUDE += -I../../../include/middleware/media endif INCLUDE += -I../../../include/middleware/common INCLUDE += -I../../../include/middleware/common/umf_event INCLUDE += -I../../../include/middleware/common/upgrade INCLUDE += -I../../../include/middleware/common/gui_eng INCLUDE += -I../../../$(CUSTOMER_BOARD_PATH)/adaptable INCLUDE += -I../../../$(CUSTOMER_BOARD_PATH)/nvmem INCLUDE += -I../../../$(FORMAL_CUSTOMER_PATH) INCLUDE += -I../../../../drivers/include INCLUDE += -I../../../../drivers/module_include INCLUDE += -I../../../include/middleware/ptnmng/partitionlist ifeq ($(CONFIG_DTV_SUPPORT),y) INCLUDE += -I../../../middleware/dtv/dtv_recorder endif INCLUDE += -I../../../middleware/common/osdlib ifeq ($(CONFIG_SUPPORT_SUBTITLE),y) INCLUDE += -I../../../include/middleware/common/libsubparser endif ifneq ($(filter y,$(CONFIG_MOD_PACK_TT) $(CONFIG_MOD_PACK_SUB)),) INCLUDE += -I../../../include/middleware/common/tt_submalloc endif ifeq ($(CONFIG_SUPPORT_MIRACAST),y) INCLUDE += -I../../../include/middleware/network/miracast/wfd INCLUDE += -I../../../include/middleware/network/netsetting endif ifeq ($(CONFIG_SUPPORT_NET_OTA),y) INCLUDE += -I../../../include/middleware/network/net_ota endif ifeq ($(CONFIG_EXTIC_HDMI_SWITCH),y) ifeq ($(CONFIG_EXTIC_HDMI_SWITCH_TI6633),y) INCLUDE += -I../../../external/hdmi_switch/TI6633 endif endif ifeq ($(CONFIG_EXTIC_DIGITALAMP),y) ifeq ($(CONFIG_EXTIC_DIGITALAMP_TAS5711),y) INCLUDE += -I../../../external/digitalamp/TAS5711 endif endif ifeq ($(CONFIG_EXTIC_KEYSTONE_CORRECTION),y) ifeq ($(CONFIG_EXTIC_KEYSTONE_CORRECTION_POL8902),y) INCLUDE += -I../../../external/keystone_correction/POL8902 endif endif TARGET_EXE = umf SRCS_LIST += main.c main_app_external.c main_app_initflow.c umf_debug.c ifeq ($(CONFIG_ENABLE_UMF_MODULES), y) SRCS_LIST += umf_mod.c endif ifeq ($(CONFIG_NOT_USEBB),y) SRCS_LIST += app.c VPATH += ../../../minibox LIBS += $(LIB_MINIBOX_STATIC) INCLUDE += -I../../../minibox/include else SRCS_LIST += toy.c VPATH += ../../../toy/currsrc CFLAGS += -DUMF_USE_SF endif # IR include ../../../customer/$(CUSTOMER_NAME)/public/ir/irinclude.in include ../../../customer/$(CUSTOMER_NAME)/public/ir/irsrc.in # IR_TX ifeq ($(CONFIG_SUPPORT_IR_TX),y) include ../../../customer/$(CUSTOMER_NAME)/public/ir_tx/ir_txinclude.in include ../../../customer/$(CUSTOMER_NAME)/public/ir_tx/ir_txsrc.in endif #customer VPATH += ../../../$(CUSTOMER_BOARD_PATH)/adaptable SRCS_LIST += board_config.c keypad_mapping.c VPATH += ../../../customer/$(CUSTOMER_NAME)/public/panel SRCS_LIST += pq_table.c ifeq ($(CONFIG_SUPPORT_NES_GAME),y) VPATH += ../../../customer/$(CUSTOMER_NAME)/public/joystick SRCS_LIST += js_map_table.c SRCS_LIST += js_info.c endif compnent += app_common_api sys_common_guiobj $(UIRESOURCE_DIR) ifeq ($(CONFIG_DTV_SUPPORT),y) ifeq ($(CONFIG_DVB_SYSTEM), y) compnent += dvb endif ifeq ($(CONFIG_DTMB_SYSTEM), y) compnent += dtmb endif ifeq ($(CONFIG_ISDB_SYSTEM), y) compnent += sbtvd endif endif #ifeq ($(CONFIG_ATV_SUPPORT),y) compnent += atv #endif ifeq ($(CONFIG_MEDIA_ENABLE),y) compnent += media endif ifeq ($(CONFIG_SUPPORT_NETAPP),y) compnent += network endif #ifeq ($(CONFIG_SUPPORT_MIRACAST),y) #compnent += wfd_player #endif .PHONY: all clean install $(compnent) refineUIResource $(TARGET_EXE) refineUIResource: # ../../../../tools/refine_ui_resource.pl -T ./$(UIRESOURCE_DIR)/region/TV_bitmap_res.c \ # -V ./$(UIRESOURCE_DIR)/region/TV_palette_res.c -M ./media/$(MEDIA_UIRESOURCE_DIR)/region/FilePlayer_bitmap_res.c \ # -P ./media/$(MEDIA_UIRESOURCE_DIR)/region/FilePlayer_palette_res.c BUILD_MODULE: $(compnent) $(compnent): refineUIResource @$(MAKE) -C $@ all all: $(TARGET_EXE) install: ifndef CONFIG_INSTALLDIR $(error [ERROR] CONFIG_INSTALLDIR not define!!) endif cp -af $(TARGET_EXE) $(CONFIG_INSTALLDIR)/tmp ifeq ($(CONFIG_ENABLE_UMF_MODULES), y) cp -af ./mod.info $(CONFIG_INSTALLDIR)/tmp endif ifeq ($(CONFIG_EXE_STATIC),n) cp -af ../../../gsl/librt.so.0 $(CONFIG_INSTALLDIR)/lib endif ifeq ($(CONFIG_FONT_ENGINE_HARFBUZZ),y) $(MAKE) -C $(UIRESOURCE_DIR) install endif clean_loop: clean @rm -fr $(TARGET_EXE) @$(MAKE) -C atv clean_loop ifeq ($(CONFIG_DVB_SYSTEM), y) @$(MAKE) -C dvb clean_loop endif ifeq ($(CONFIG_DTMB_SYSTEM), y) @$(MAKE) -C dtmb clean_loop endif ifeq ($(CONFIG_ISDB_SYSTEM), y) @$(MAKE) -C sbtvd clean_loop endif @$(MAKE) -C media clean_loop @$(MAKE) -C app_common_api clean_loop @$(MAKE) -C sys_common_guiobj clean_loop @$(MAKE) -C network clean_loop ifeq ($(CONFIG_TV_NEW_UI),y) @$(MAKE) -C resources_new clean_loop else ifeq ($(CONFIG_SUPPORT_MONITOR),y) @$(MAKE) -C resources_monitor clean_loop else @$(MAKE) -C resources clean_loop endif ifeq ($(CONFIG_ISDB_SYSTEM), y) @$(MAKE) -C sbtvd_resources clean_loop endif @rm -fr umf.*bin @rm -fr umf.TV_IDL_* ifeq ($(CONFIG_ENABLE_UMF_MODULES), y) BUILD_UMF = y endif include ../../../rules.mak