CMakeLists.txt 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. # Copyright (C) 2018 LongSung Technologies Limited and/or its affiliates("LongSung").
  2. # All rights reserved.
  3. #
  4. # This software is supplied "AS IS" without any warranties.
  5. # LongSung assumes no responsibility or liability for the use of the software,
  6. # conveys no license or title under any patent, copyright, or mask work
  7. # right to the product. LongSung reserves the right to make changes in the
  8. # software without notification. LongSung also make no representation or
  9. # warranty that such application will be suitable for the specified use
  10. # without further testing or modification.
  11. cmake_minimum_required(VERSION 3.13)
  12. set(app_dir ./app)
  13. option(ENABLE_TEST_FLASH "使能SPI FLASH测试" OFF)
  14. option(ENABLE_ENABLE_AMRNB "使能AMRNB作为学习编解码" OFF)
  15. option(ENABLE_ENABLE_SPEEX "使能SPEEX作为学习编解码" ON)
  16. #add_definitions(-D ENABLE_OPENHPOC)
  17. if(ENABLE_TEST_FLASH)
  18. set(spi_files ./flashInterface/spiFlash.c ./flashInterface/spiFlashFat.c)
  19. include_directories(./flashInterface)
  20. endif(ENABLE_TEST_FLASH)
  21. #add speex
  22. if(ENABLE_ENABLE_SPEEX)
  23. add_definitions(-D ENABLE_ENABLE_SPEEX)
  24. set(speex_h_dir ./app/speex)
  25. endif(ENABLE_ENABLE_SPEEX)
  26. #add amrnb
  27. if(ENABLE_ENABLE_AMRNB)
  28. add_definitions(-D ENABLE_ENABLE_AMRNB)
  29. set(amrnb_dir ./app/amrnb)
  30. set(amrnb_files ${amrnb_dir}/agc.c
  31. ${amrnb_dir}/autocorr.c
  32. ${amrnb_dir}/az_lsp.c
  33. ${amrnb_dir}/bits2prm.c
  34. ${amrnb_dir}/cl_ltp.c
  35. ${amrnb_dir}/convolve.c
  36. ${amrnb_dir}/c1035pf.c
  37. ${amrnb_dir}/d_plsf.c
  38. ${amrnb_dir}/d_plsf_5.c
  39. ${amrnb_dir}/d_gain_c.c
  40. ${amrnb_dir}/d_gain_p.c
  41. ${amrnb_dir}/dec_lag6.c
  42. ${amrnb_dir}/d1035pf.c
  43. ${amrnb_dir}/cor_h.c
  44. ${amrnb_dir}/enc_lag3.c
  45. ${amrnb_dir}/enc_lag6.c
  46. ${amrnb_dir}/g_code.c
  47. ${amrnb_dir}/g_pitch.c
  48. ${amrnb_dir}/int_lpc.c
  49. ${amrnb_dir}/inter_36.c
  50. ${amrnb_dir}/inv_sqrt_ex.c
  51. ${amrnb_dir}/lag_wind.c
  52. ${amrnb_dir}/levinson.c
  53. ${amrnb_dir}/lsp_az.c
  54. ${amrnb_dir}/lsp_lsf.c
  55. ${amrnb_dir}/ol_ltp.c
  56. ${amrnb_dir}/pitch_fr.c
  57. ${amrnb_dir}/pitch_ol.c
  58. ${amrnb_dir}/pow2.c
  59. ${amrnb_dir}/pre_big.c
  60. ${amrnb_dir}/pre_proc.c
  61. ${amrnb_dir}/pred_lt.c
  62. ${amrnb_dir}/preemph.c
  63. ${amrnb_dir}/prm2bits.c
  64. ${amrnb_dir}/pstfilt.c
  65. ${amrnb_dir}/q_gain_c.c
  66. ${amrnb_dir}/q_gain_p.c
  67. ${amrnb_dir}/q_plsf.c
  68. ${amrnb_dir}/q_plsf_5.c
  69. ${amrnb_dir}/lsfwt.c
  70. ${amrnb_dir}/reorder.c
  71. ${amrnb_dir}/residu.c
  72. ${amrnb_dir}/lsp.c
  73. ${amrnb_dir}/lpc.c
  74. ${amrnb_dir}/ec_gains.c
  75. ${amrnb_dir}/spreproc.c
  76. ${amrnb_dir}/syn_filt.c
  77. ${amrnb_dir}/weight_a.c
  78. ${amrnb_dir}/qua_gain.c
  79. ${amrnb_dir}/gc_pred.c
  80. ${amrnb_dir}/q_plsf_3.c
  81. ${amrnb_dir}/post_pro.c
  82. ${amrnb_dir}/dec_lag3.c
  83. ${amrnb_dir}/dec_gain.c
  84. ${amrnb_dir}/d_plsf_3.c
  85. ${amrnb_dir}/d4_17pf.c
  86. ${amrnb_dir}/c4_17pf.c
  87. ${amrnb_dir}/d3_14pf.c
  88. ${amrnb_dir}/c3_14pf.c
  89. ${amrnb_dir}/d2_11pf.c
  90. ${amrnb_dir}/c2_11pf.c
  91. ${amrnb_dir}/d2_9pf.c
  92. ${amrnb_dir}/c2_9pf.c
  93. ${amrnb_dir}/cbsearch.c
  94. ${amrnb_dir}/spstproc.c
  95. ${amrnb_dir}/gain_q.c
  96. ${amrnb_dir}/cod_amr.c
  97. ${amrnb_dir}/dec_amr.c
  98. ${amrnb_dir}/sp_enc.c
  99. ${amrnb_dir}/sp_dec.c
  100. ${amrnb_dir}/ph_disp.c
  101. ${amrnb_dir}/g_adapt.c
  102. ${amrnb_dir}/calc_en.c
  103. ${amrnb_dir}/qgain795.c
  104. ${amrnb_dir}/qgain475.c
  105. ${amrnb_dir}/sqrt_l.c
  106. ${amrnb_dir}/set_sign.c
  107. ${amrnb_dir}/s10_8pf.c
  108. ${amrnb_dir}/bgnscd.c
  109. ${amrnb_dir}/gmed_n.c
  110. ${amrnb_dir}/mac_32.c
  111. ${amrnb_dir}/ex_ctrl.c
  112. ${amrnb_dir}/c_g_aver.c
  113. ${amrnb_dir}/lsp_avg.c
  114. ${amrnb_dir}/int_lsf.c
  115. ${amrnb_dir}/c8_31pf.c
  116. ${amrnb_dir}/d8_31pf.c
  117. ${amrnb_dir}/p_ol_wgh.c
  118. ${amrnb_dir}/ton_stab.c
  119. ${amrnb_dir}/vad1.c
  120. ${amrnb_dir}/dtx_enc.c
  121. ${amrnb_dir}/dtx_dec.c
  122. ${amrnb_dir}/a_refl.c
  123. ${amrnb_dir}/b_cn_cod.c
  124. ${amrnb_dir}/calc_cor.c
  125. ${amrnb_dir}/hp_max.c
  126. ${amrnb_dir}/vadname.c
  127. ${amrnb_dir}/vad2.c
  128. ${amrnb_dir}/r_fft_ex.c
  129. ${amrnb_dir}/lflg_upd.c
  130. ${amrnb_dir}/e_homing.c
  131. ${amrnb_dir}/d_homing.c
  132. ${amrnb_dir}/sid_sync.c
  133. ${amrnb_dir}/count.c
  134. ${amrnb_dir}/basicop2.c
  135. ${amrnb_dir}/oper_32b.c
  136. ${amrnb_dir}/set_zero.c
  137. ${amrnb_dir}/log2.c
  138. ${amrnb_dir}/copy.c
  139. ${amrnb_dir}/wamr.c)
  140. set(amrnb_lib ${CMAKE_CURRENT_SOURCE_DIR}/lib/libwamrnb.a)
  141. endif(ENABLE_ENABLE_AMRNB)
  142. set(base64_dir ./app/base64)
  143. set(base64_files ${base64_dir}/base64.c)
  144. set(learn_dir ./app/learn)
  145. set(cjson_dir ./app/cJSON)
  146. set(cjson_files ${cjson_dir}/cJSON.c)
  147. set(app_files ${app_dir}/ohpocapp.c
  148. ${app_dir}/board.c
  149. ${app_dir}/log.c
  150. ${app_dir}/poc.c
  151. ${app_dir}/app.c
  152. ${app_dir}/uio.c
  153. ${app_dir}/common.c
  154. ${app_dir}/setting.c
  155. ${app_dir}/message.c
  156. ${app_dir}/gpsCtl.c
  157. ${app_dir}/hook.c
  158. ${app_dir}/setSystemPara.c
  159. ${app_dir}/GUI/lcdDrv.c
  160. ${app_dir}/GUI/gui.c
  161. ${app_dir}/GUI/fonts.c
  162. ${app_dir}/uiEntry.c
  163. ${app_dir}/uiBlock.c
  164. ${app_dir}/appAuth.c
  165. ${app_dir}/Interface/Palace.c
  166. ${app_dir}/Interface/uiMenu.c
  167. ${app_dir}/Interface/ListBox.c
  168. ${app_dir}/Interface/ListBoxSMS.c
  169. ${app_dir}/Interface/NumEdit.c
  170. ${app_dir}/Interface/ManageMessage.c
  171. ${app_dir}/Interface/newMessage.c
  172. ${app_dir}/md5/mymd5.c
  173. ${learn_dir}/learnHttp.c
  174. ${learn_dir}/learnTask.c
  175. ${learn_dir}/learnAudio.c
  176. ${cjson_files}
  177. ${spi_files}
  178. ${base64_files})
  179. add_definitions(-w)
  180. include_directories(${app_dir} ${app_dir}/md5 ${app_dir}/GUI ${app_dir}/Interface ${learn_dir} ${cjson_dir} ${amrnb_dir} ${speex_h_dir} ${base64_dir})
  181. set(app_lib ${CMAKE_CURRENT_SOURCE_DIR}/lib/libohpoc.a ${amrnb_lib})
  182. add_appimg(${target} ${flash_ldscript} ${app_files})
  183. target_link_libraries(${target} PRIVATE ${app_lib})