meson.build 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. celt_sources = sources['CELT_SOURCES']
  2. celt_sse_sources = sources['CELT_SOURCES_SSE']
  3. celt_sse2_sources = sources['CELT_SOURCES_SSE2']
  4. celt_sse4_1_sources = sources['CELT_SOURCES_SSE4_1']
  5. celt_neon_intr_sources = sources['CELT_SOURCES_ARM_NEON_INTR']
  6. celt_static_libs = []
  7. foreach intr_name : ['sse', 'sse2', 'sse4_1', 'neon_intr']
  8. have_intr = get_variable('have_' + intr_name)
  9. if not have_intr
  10. continue
  11. endif
  12. intr_sources = get_variable('celt_@0@_sources'.format(intr_name))
  13. intr_args = get_variable('opus_@0@_args'.format(intr_name), [])
  14. celt_static_libs += static_library('celt_' + intr_name, intr_sources,
  15. c_args: intr_args,
  16. include_directories: opus_includes,
  17. install: false)
  18. endforeach
  19. have_arm_intrinsics_or_asm = have_arm_ne10
  20. if (intrinsics_support.length() + asm_optimization.length() + inline_optimization.length()) > 0
  21. have_arm_intrinsics_or_asm = true
  22. endif
  23. if host_cpu_family in ['arm', 'aarch64'] and have_arm_intrinsics_or_asm
  24. celt_sources += sources['CELT_SOURCES_ARM']
  25. if have_arm_ne10
  26. celt_sources += sources['CELT_SOURCES_ARM_NE10']
  27. endif
  28. if opus_arm_external_asm
  29. arm2gnu = [find_program('arm/arm2gnu.pl')] + arm2gnu_args
  30. celt_sources_arm_asm = configure_file(input: 'arm/celt_pitch_xcorr_arm.s',
  31. output: '@BASENAME@-gnu.S',
  32. command: arm2gnu + ['@INPUT@'],
  33. capture: true)
  34. celt_arm_armopts_s = configure_file(input: 'arm/armopts.s.in',
  35. output: 'arm/armopts.s',
  36. configuration: opus_conf)
  37. celt_static_libs += static_library('celt-armasm',
  38. celt_arm_armopts_s, celt_sources_arm_asm,
  39. install: false)
  40. endif
  41. endif
  42. celt_c_args = []
  43. if host_system == 'windows'
  44. celt_c_args += ['-DDLL_EXPORT']
  45. endif
  46. celt_lib = static_library('opus-celt',
  47. celt_sources,
  48. c_args: celt_c_args,
  49. include_directories: opus_includes,
  50. link_whole: celt_static_libs,
  51. dependencies: libm,
  52. install: false)