Makefile 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. # include UCLICDIR and CROSS
  2. # !! DO NOT reset CFLAGS (i.e. use CFLAGS+=xxx, NOT CFLAGS=xxx) after this include
  3. include ../../../Makefile.project
  4. include ../../../Makefile.toolchain
  5. #***************************************************************************
  6. # Define Environment Variables
  7. #***************************************************************************
  8. ifndef LIB_DIR
  9. LIB_DIR = ../../../lib
  10. endif
  11. ifndef ROOT_DIR
  12. ROOT_DIR = ../../../..
  13. endif
  14. KERNELDIR = ../../../../kernel/linux
  15. UIRESOURCE_DIR = resources
  16. MEDIA_UIRESOURCE_DIR = resources
  17. UIRESOURCE_INC = -I$(CURDIR)/$(UIRESOURCE_DIR)/include -I$(CURDIR)/$(UIRESOURCE_DIR)/string/include -I$(CURDIR)/$(UIRESOURCE_DIR)/font/include
  18. export UIRESOURCE_DIR
  19. export UIRESOURCE_INC
  20. USE_LIBPNG = n
  21. ifeq ($(CONFIG_SUPPORT_MHEG5),y)
  22. USE_LIBPNG = y
  23. endif
  24. ifeq ($(CONFIG_MEDIA_PHOTO_PNG),y)
  25. USE_LIBPNG = y
  26. endif
  27. USE_LIBJPG = n
  28. ifeq ($(CONFIG_SUPPORT_MHEG5_HD),y)
  29. USE_LIBJPG = y
  30. endif
  31. ifeq ($(CONFIG_MEDIA_PHOTO_JPG),y)
  32. USE_LIBJPG = y
  33. endif
  34. USE_AV_DEV=n
  35. ifeq ($(CONFIG_MEDIA_ENABLE),y)
  36. USE_AV_DEV=y
  37. endif
  38. #***************************************************************************
  39. # Define Compiler Flags
  40. #***************************************************************************
  41. ifeq ($(CONFIG_EXE_STATIC),y)
  42. LIBS += $(UCLIBCDIR)/usr/lib/libpthread.a
  43. LIBS += $(UCLIBCDIR)/usr/lib/librt.a
  44. LIBS += $(UCLIBCDIR)/usr/lib/libm.a
  45. else
  46. LDFLAGS += -lrt -ldl
  47. endif
  48. ifeq ($(CONFIG_VERSION),release)
  49. CFLAGS += -Dwatchdog
  50. endif
  51. include $(LIB_DIR)/lib.mak
  52. LIBS += $(LIB_MIDMEDIA_STATIC)
  53. LIBS += $(LIB_FS_STATIC)
  54. ifeq ($(USE_AV_DEV),y)
  55. LIBS += ../../../av_dev/runav/lib/librunav.a
  56. LIBS += ../../../av_dev/runav/lib/libavutil.a
  57. LIBS += ../../../av_dev/runav/lib/libavformat.a
  58. LIBS += ../../../av_dev/runav/lib/libavcodec.a
  59. LIBS += $(LIB_MATH_EN_STATIC)
  60. LIBS += ../../../av_dev/mpdev/lib/libmpdev.a
  61. #add openssl library for https
  62. ifeq ($(CONFIG_SUPPORT_NETWORK),y)
  63. LIBS += $(LIB_OPENSSL)
  64. endif
  65. ifeq ($(CONFIG_SUPPORT_DASH),y)
  66. LIBS += $(LIB_LIBXML2)
  67. endif
  68. ifeq ($(CONFIG_RUNAV_MEMORY_DEBUG), y)
  69. LIBS += ../../../av_dev/debug_memory/libDbgMem.a
  70. endif
  71. LIBS += $(LIB_RECORD_STATIC)
  72. ifeq ($(CONFIG_MEDIA_ENABLE),y)
  73. LIBS += $(LIB_PICAPI_STATIC)
  74. endif
  75. ifeq ($(USE_LIBJPG),y)
  76. LIBS += $(LIB_JPG_STATIC)
  77. endif
  78. ifeq ($(USE_LIBPNG),y)
  79. LIBS += $(LIB_PNG_STATIC)
  80. endif
  81. endif
  82. LIBS += $(LIB_ZLIB_STATIC)
  83. ifeq ($(CONFIG_MEDIA_ENABLE),y)
  84. LIBS += ../../../lib/libpic.a
  85. endif
  86. #ifeq ($(CONFIG_ATV_SUPPORT),y)
  87. LIBS += $(LIB_ATVGUIOBJ_STATIC)
  88. #endif
  89. ifeq ($(CONFIG_MEDIA_ENABLE),y)
  90. LIBS += $(LIB_MEDIAGUIOBJ_STATIC)
  91. endif
  92. ifeq ($(CONFIG_SUPPORT_NETAPP),y)
  93. LIBS += $(LIB_NETWORKGUIOBJ_STATIC)
  94. endif
  95. LIBS += $(LIB_APPCOMMON_STATIC)
  96. LIBS += $(LIB_SYSCOMMONGUIOBJ_STATIC)
  97. LIBS += $(LIB_DTVUI_STATIC)
  98. ifeq ($(CONFIG_MEDIA_ENABLE),y)
  99. LIBS += $(LIB_MMUI_STATIC)
  100. endif
  101. ifeq ($(CONFIG_SUPPORT_NETAPP),y)
  102. LIBS += $(LIB_NETUI_STATIC)
  103. endif
  104. LIBS += $(LIB_APPINFRA_STATIC)
  105. LIBS += $(LIB_GSL_STATIC)
  106. LIBS += $(LIB_AFW_STATIC)
  107. LIBS += $(LIB_MIDDATABASE_STATIC)
  108. LIBS += $(LIB_UPGRADE_STATIC)
  109. LIBS += $(LIB_MIDLOGO_STATIC)
  110. LIBS += $(LIB_APPDAEMON_STATIC)
  111. LIBS += $(LIB_MIDDISPLAY_STATIC)
  112. LIBS += $(LIB_IOCTLINTERFACE_STATIC)
  113. LIBS += $(LIB_TVFE_STATIC)
  114. LIBS += $(LIB_MIDATV_STATIC)
  115. LIBS += $(LIB_OSDLIB_STATIC)
  116. LIBS += $(LIB_GUIENG_STATIC)
  117. LIBS += $(LIB_UNICODE_STATIC)
  118. LIBS += $(LIB_SUBTITLE_STATIC)
  119. LIBS += $(LIB_CECTV_STATIC)
  120. LIBS += $(LIB_PARTITIONMNG_STATIC)
  121. LIBS += $(LIB_MIDPVR_STATIC)
  122. LIBS += $(LIB_KEYUPDATE_STATIC)
  123. LIBS += $(LIB_DAEMON_STATIC)
  124. LIBS += $(LIB_MIDDEBUG_STATIC)
  125. ifeq ($(CONFIG_SUPPORT_TTX),y)
  126. LIBS += $(LIB_TTX_STATIC)
  127. endif
  128. ifeq ($(CONFIG_CC_SUPPORT),y)
  129. LIBS += $(LIB_CC_STATIC)
  130. endif
  131. ifeq ($(CONFIG_SUPPORT_NEW_AIRPLAY),y)
  132. LIBS += $(LIB_NEW_AIRPLAY_STATIC)
  133. endif
  134. ifeq ($(CONFIG_EXTIC_FRC),y)
  135. LIBS += $(LIB_EXTIC_FRC)
  136. endif
  137. ifeq ($(CONFIG_EXTIC_HDMI_SWITCH),y)
  138. LIBS += $(LIB_EXTIC_HDMI_SWITCH)
  139. endif
  140. ifeq ($(CONFIG_EXTIC_DIGITALAMP),y)
  141. LIBS += $(LIB_EXTIC_DIGITALAMP)
  142. endif
  143. ifeq ($(CONFIG_EXTIC_STORAGE_DEVICE),y)
  144. LIBS += $(LIB_EXTIC_STORAGE_DEVICE)
  145. endif
  146. LIBS += $(LIB_MWUSBEDIT)
  147. LIBS += $(LIB_UMFEVENT_STATIC)
  148. ifeq ($(CONFIG_MIFI_SUPPORT),y)
  149. LIBS += $(LIB_MIFI_STATIC)
  150. endif
  151. ifeq ($(CONFIG_CALL_TRACE),y)
  152. LIBS += $(LIB_CALL_TRACE)
  153. endif
  154. ifeq ($(CONFIG_SUPPORT_NETWORK),y)
  155. LIBS += $(LIB_NETWORK_SETTING_STATIC)
  156. ifeq ($(CONFIG_SUPPORT_NET_OTA),y)
  157. LIBS += $(LIB_NETWORK_OTA_STATIC)
  158. endif
  159. endif
  160. ifeq ($(CONFIG_SUPPORT_CHECK_STRING_SIZE), y)
  161. LIBS += $(LIB_CHK_STR)
  162. endif
  163. LIBS += $(LIB_LZMA)
  164. #game
  165. ifeq ($(CONFIG_OSD_GAME_SUPPORT), y)
  166. LIBS += $(LIB_OSD_GAME)
  167. endif
  168. ifeq ($(CONFIG_SUPPORT_NES_GAME), y)
  169. LIBS += $(LIB_NES_GAME)
  170. LIBS += $(LIB_NES_CORE)
  171. endif
  172. # debug tool shall be the last
  173. LIBS += $(LIB_DEBUG_TOOLS)
  174. LIBS += $(LIB_NEDMALLOC)
  175. ifeq ($(CONFIG_BT_RDA5856),y)
  176. LIBS += $(LIB_BT5856)
  177. endif
  178. #Miracast
  179. ifeq ($(CONFIG_SUPPORT_MIRACAST), y)
  180. LIBS += $(LIB_MIRACAST)
  181. endif
  182. ifeq ($(CONFIG_SUPPORT_DLNA), y)
  183. LIBS += $(LIB_DLNA)
  184. endif
  185. ifeq ($(CONFIG_SUPPORT_HBBTV), y)
  186. LIBS += $(LIB_HBBTV)
  187. endif
  188. EXTRA_OBJS += -Wl,--start-group $(LIBS) -Wl,--end-group
  189. INCLUDE += -I./include
  190. INCLUDE += -I./atv/include
  191. INCLUDE += -I./atv/include/guiobj
  192. INCLUDE += -I./atv/include/app_atv_api
  193. INCLUDE += $(UIRESOURCE_INC)
  194. ifeq ($(CONFIG_MEDIA_ENABLE),y)
  195. INCLUDE += -I./media/include
  196. INCLUDE += -I./media/include/gui_objects
  197. INCLUDE += -I./media/resources/include
  198. endif
  199. ifeq ($(CONFIG_SUPPORT_NETAPP),y)
  200. INCLUDE += -I./network/include
  201. INCLUDE += -I./network/resources/include
  202. endif
  203. INCLUDE += -I./include/guiobj
  204. INCLUDE += -I./include/app_common_api
  205. INCLUDE += -I../../../include
  206. INCLUDE += -I../../../include/gsl
  207. INCLUDE += -I../../../include/app_infra
  208. INCLUDE += -I../../app_frmwrk/dvb/include
  209. INCLUDE += -I../../daemon/include
  210. ifeq ($(CONFIG_OSD_GAME_SUPPORT),y)
  211. INCLUDE += -I../../../../include/game
  212. endif
  213. INCLUDE += -I../../../app_infra/include
  214. INCLUDE += -I../../../include/middleware/ioctl_interface
  215. INCLUDE += -I../../../include/middleware/database
  216. INCLUDE += -I../../../include/middleware/tvfe
  217. INCLUDE += -I../../../include/middleware/cec_tv
  218. INCLUDE += -I../../../include/middleware/atv/atv_scan
  219. INCLUDE += -I../../../include/middleware/atv/atv_afc
  220. INCLUDE += -I../../../include/middleware/atv/atv_ats
  221. INCLUDE += -I../../../include/middleware/display
  222. INCLUDE += -I../../../include/middleware/dtv/dtvcommon
  223. INCLUDE += -I../../../include/middleware/dtv/dtvmonitor
  224. INCLUDE += -I../../../include/middleware/dtv/dtvplayback
  225. INCLUDE += -I../../../include/middleware/dtv/dtvpsimonitor
  226. INCLUDE += -I../../../include/middleware/dtv/dtvsipsi
  227. INCLUDE += -I../../../include/middleware/dtv/dtvscan
  228. INCLUDE += -I../../../include/middleware/dtv/dtvepg
  229. INCLUDE += -I../../../include/middleware/dtv/dtvota
  230. INCLUDE += -I../../../include/middleware/dtv/dtv_record
  231. INCLUDE += -I../../../include/middleware/dtv/dtvci
  232. INCLUDE += -I../../../include/middleware/media/filesystem
  233. INCLUDE += -I../../../include/middleware/media/playlist
  234. INCLUDE += -I../../../include/middleware/media/player
  235. INCLUDE += -I../../../include/middleware/media/musicplaylist
  236. INCLUDE += -I../../../include/middleware/media
  237. INCLUDE += -I../../../include/middleware/common
  238. INCLUDE += -I../../../include/middleware/common/umf_event
  239. INCLUDE += -I../../../include/middleware/common/upgrade
  240. INCLUDE += -I../../../include/middleware/common/gui_eng
  241. INCLUDE += -I../../../$(CUSTOMER_BOARD_PATH)/adaptable
  242. INCLUDE += -I../../../$(CUSTOMER_BOARD_PATH)/nvmem
  243. INCLUDE += -I../../../$(FORMAL_CUSTOMER_PATH)
  244. INCLUDE += -I../../../../drivers/include
  245. INCLUDE += -I../../../../drivers/module_include
  246. INCLUDE += -I../../../include/middleware/ptnmng/partitionlist
  247. INCLUDE += -I../../../middleware/dtv/dtv_recorder
  248. INCLUDE += -I../../../middleware/common/osdlib
  249. ifeq ($(CONFIG_SUPPORT_WIFI),y)
  250. INCLUDE += -I../../../include/middleware/network/netsetting
  251. endif
  252. ifeq ($(CONFIG_SUPPORT_MIRACAST),y)
  253. INCLUDE += -I../../../include/middleware/network/miracast/wfd
  254. endif
  255. ifeq ($(CONFIG_SUPPORT_NET_OTA),y)
  256. INCLUDE += -I../../../include/middleware/network/net_ota
  257. endif
  258. ifeq ($(CONFIG_EXTIC_HDMI_SWITCH),y)
  259. ifeq ($(CONFIG_EXTIC_HDMI_SWITCH_TI6633),y)
  260. INCLUDE += -I../../../external/hdmi_switch/TI6633
  261. endif
  262. endif
  263. ifeq ($(CONFIG_EXTIC_DIGITALAMP),y)
  264. ifeq ($(CONFIG_EXTIC_DIGITALAMP_TAS5711),y)
  265. INCLUDE += -I../../../external/digitalamp/TAS5711
  266. endif
  267. ifeq ($(CONFIG_EXTIC_DIGITALAMP_NTP8849),y)
  268. INCLUDE += -I../../../external/digitalamp/NTP8849
  269. endif
  270. ifeq ($(CONFIG_EXTIC_DIGITALAMP_WA6819B),y)
  271. INCLUDE += -I../../../external/digitalamp/WA6819B
  272. endif
  273. endif
  274. ifeq ($(CONFIG_EXTIC_STORAGE_DEVICE),y)
  275. ifeq ($(CONFIG_EXTIC_STORAGE_DEVICE_CW24C08),y)
  276. INCLUDE += -I../../../external/storage_device/cw24c08
  277. endif
  278. endif
  279. TARGET_EXE = umf
  280. SRCS_LIST += main.c main_app_external.c main_app_initflow.c umf_debug.c
  281. ifeq ($(CONFIG_NOT_USEBB),y)
  282. SRCS_LIST += app.c
  283. VPATH += ../../../minibox
  284. LIBS += $(LIB_MINIBOX_STATIC)
  285. INCLUDE += -I../../../minibox/include
  286. else
  287. SRCS_LIST += toy.c
  288. VPATH += ../../../toy/currsrc
  289. CFLAGS += -DUMF_USE_SF
  290. endif
  291. # IR
  292. include ../../../customer/$(CUSTOMER_NAME)/public/ir/irinclude.in
  293. include ../../../customer/$(CUSTOMER_NAME)/public/ir/irsrc.in
  294. # IR_TX
  295. ifeq ($(CONFIG_SUPPORT_IR_TX),y)
  296. include ../../../customer/$(CUSTOMER_NAME)/public/ir_tx/ir_txinclude.in
  297. include ../../../customer/$(CUSTOMER_NAME)/public/ir_tx/ir_txsrc.in
  298. endif
  299. #customer
  300. VPATH += ../../../$(CUSTOMER_BOARD_PATH)/adaptable
  301. SRCS_LIST += board_config.c keypad_mapping.c
  302. VPATH += ../../../customer/$(CUSTOMER_NAME)/public/panel
  303. SRCS_LIST += pq_table.c
  304. ifeq ($(CONFIG_SUPPORT_NES_GAME),y)
  305. VPATH += ../../../customer/$(CUSTOMER_NAME)/public/joystick
  306. SRCS_LIST += js_map_table.c
  307. SRCS_LIST += js_info.c
  308. endif
  309. compnent += app_common_api sys_common_guiobj $(UIRESOURCE_DIR)
  310. #ifeq ($(CONFIG_ATV_SUPPORT),y)
  311. compnent += atv
  312. #endif
  313. ifeq ($(CONFIG_MEDIA_ENABLE),y)
  314. compnent += media
  315. endif
  316. ifeq ($(CONFIG_SUPPORT_NETAPP),y)
  317. compnent += network
  318. endif
  319. #ifeq ($(CONFIG_SUPPORT_MIRACAST),y)
  320. #compnent += wfd_player
  321. #endif
  322. .PHONY: all clean install $(compnent) refineUIResource $(TARGET_EXE)
  323. refineUIResource:
  324. # ../../../../tools/refine_ui_resource.pl -T ./$(UIRESOURCE_DIR)/region/TV_bitmap_res.c \
  325. # -V ./$(UIRESOURCE_DIR)/region/TV_palette_res.c -M ./media/$(MEDIA_UIRESOURCE_DIR)/region/FilePlayer_bitmap_res.c \
  326. # -P ./media/$(MEDIA_UIRESOURCE_DIR)/region/FilePlayer_palette_res.c
  327. BUILD_MODULE: $(compnent)
  328. $(compnent): refineUIResource
  329. @$(MAKE) -C $@ all
  330. all: $(TARGET_EXE)
  331. install:
  332. ifndef CONFIG_INSTALLDIR
  333. $(error [ERROR] CONFIG_INSTALLDIR not define!!)
  334. endif
  335. cp -af $(TARGET_EXE) $(CONFIG_INSTALLDIR)/tmp
  336. ifeq ($(CONFIG_EXE_STATIC),n)
  337. cp -af ../../../gsl/librt.so.0 $(CONFIG_INSTALLDIR)/lib
  338. endif
  339. ifeq ($(CONFIG_FONT_ENGINE_HARFBUZZ),y)
  340. $(MAKE) -C $(UIRESOURCE_DIR) install
  341. endif
  342. clean_loop: clean
  343. @rm -fr $(TARGET_EXE)
  344. @$(MAKE) -C atv clean_loop
  345. ifeq ($(CONFIG_MEDIA_ENABLE),y)
  346. @$(MAKE) -C media clean_loop
  347. endif
  348. @$(MAKE) -C app_common_api clean_loop
  349. @$(MAKE) -C sys_common_guiobj clean_loop
  350. ifeq ($(CONFIG_SUPPORT_NETAPP),y)
  351. @$(MAKE) -C network clean_loop
  352. endif
  353. @$(MAKE) -C resources clean_loop
  354. include ../../../rules.mak