123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- # Copyright (C) 2018 LongSung Technologies Limited and/or its affiliates("LongSung").
- # All rights reserved.
- #
- # This software is supplied "AS IS" without any warranties.
- # LongSung assumes no responsibility or liability for the use of the software,
- # conveys no license or title under any patent, copyright, or mask work
- # right to the product. LongSung reserves the right to make changes in the
- # software without notification. LongSung also make no representation or
- # warranty that such application will be suitable for the specified use
- # without further testing or modification.
- set(preset_dir ./preset)
- set(app_dir ./app)
- set(app_file ./hpocapp.c
- ${app_dir}/board.c
- ${app_dir}/app.c
- ${app_dir}/setting.c
- ${app_dir}/poc.c
- ${app_dir}/uio.c
- ${app_dir}/uiEntry.c
- ${app_dir}/uiBlock.c
- ${app_dir}/gpsCtl.c
- ${app_dir}/message.c
- ${app_dir}/hook.c
- ${app_dir}/appAuth.c
- ${app_dir}/common.c
- ${app_dir}/bsp.c)
- set(log_dir ${app_dir}/log)
- set(log_file ${log_dir}/log.c)
- set(lcd_dir ${app_dir}/GUI)
- set(lcd_file ${lcd_dir}/fonts.c
- ${lcd_dir}/gui.c
- ${lcd_dir}/lcdDrv.c)
-
- set(fonts_dir ${app_dir}/fonts)
- set(fonts_file ${fonts_dir}/GB2312UnicodeTable.c
- ${fonts_dir}/strnormalize.c
- ${fonts_dir}/unicode.c
- ${fonts_dir}/language.c)
-
-
-
- set(interface_dir ${app_dir}/Interface)
- set(interface_file ${interface_dir}/Palace.c
- ${interface_dir}/uiMenu.c
- ${interface_dir}/ListBox.c
- ${interface_dir}/ListBoxSMS.c
- ${interface_dir}/NumEdit.c
- ${interface_dir}/ManageMessage.c)
- set(md5_dir ${app_dir}/md5)
- set(md5_file ${md5_dir}/mymd5.c)
- set(all_dir ${app_dir}
- ${log_dir}
- ${lcd_dir}
- ${fonts_dir}
- ${interface_dir}
- ${md5_dir})
- set(all_file ${app_file}
- ${log_file}
- ${lcd_file}
- ${interface_file}
- ${md5_file}
- ${fonts_file})
- set(cy_lib ${CMAKE_CURRENT_SOURCE_DIR}/lib/libpoc.a)
- set(language_lib ${CMAKE_CURRENT_SOURCE_DIR}/lib/libfontlib.a)
- ##################################################################################
- #aux_source_directory(${SOURCE_TOP_DIR}/hpoc/app SRC_LIST)
- include_directories(${all_dir})
- #add_definitions(-Wall)
- add_definitions(-w)
- set(preset_dir ${CMAKE_CURRENT_SOURCE_DIR}/preset)
- if(CONFIG_APPIMG_LOAD_FLASH)
- set(target Q800_LS_CY)
- add_appimg(${target} ${flash_ldscript} ${all_file})
- #app usr hgs_lib has to be link first
- target_link_libraries(${target} PRIVATE ${cy_lib})
- target_link_libraries(${target} PRIVATE ${language_lib})
- target_link_libraries(${target} PRIVATE ${libc_file_name} ${libm_file_name} ${libgcc_file_name})
- set(pac_file ${out_hex_dir}/${target}.pac)
- set(target_img_file ${out_hex_dir}/${target}.img)
- pac_init_fdl(init_fdl)
-
- if(preset_dir)
- file(REMOVE ${preset_dir}/.gitkeep)
- file(GLOB_RECURSE preset_files ${preset_dir}/*)
- foreach(preset ${preset_files})
- string(REGEX REPLACE ${preset_dir}/ "" preset_file ${preset})
- message("find preset file ${preset_file} in dir ${preset_dir}")
- set(pkt_preset_flies
- ${pkt_preset_flies}
- cfg-pack-file -i ${preset_file} -p ${preset_dir}/${preset_file} -n /${preset_file}
- )
- message("cmd ${pkt_preset_flies}")
- endforeach(preset)
- endif(preset_dir)
-
- add_custom_command(OUTPUT ${pac_file}
- COMMAND python3 ${pacgen_py} ${init_fdl}
- cfg-image -i APPIMG -a ${CONFIG_APPIMG_FLASH_ADDRESS}
- -s ${CONFIG_APPIMG_FLASH_SIZE}
- -p ${target_img_file}
- ${pkt_preset_flies}
- pac-gen ${pac_file}
- DEPENDS ${pacgen_py} ${target_img_file}
- WORKING_DIRECTORY ${SOURCE_TOP_DIR}
- )
- add_custom_target(${target}_pacgen ALL DEPENDS ${pac_file})
-
- endif()
|