1if(CONFIG_LIBSBC_ENCODER OR CONFIG_LIBSBC_DECODER) 2 3zephyr_library_named(libsbc) 4zephyr_library_compile_options(-O3 -std=c11 -ffast-math -Wno-array-bounds) 5 6zephyr_compile_definitions(SBC_FOR_EMBEDDED_LINUX) 7zephyr_compile_definitions(SBC_NO_PCM_CPY_OPTION) 8zephyr_library_sources(sbc.c) 9 10if(CONFIG_LIBSBC_ENCODER) 11zephyr_library_sources( 12 ${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/srce/sbc_analysis.c 13 ${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/srce/sbc_dct.c 14 ${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/srce/sbc_dct_coeffs.c 15 ${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/srce/sbc_enc_bit_alloc_mono.c 16 ${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/srce/sbc_enc_bit_alloc_ste.c 17 ${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/srce/sbc_enc_coeffs.c 18 ${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/srce/sbc_encoder.c 19 ${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/srce/sbc_packing.c 20 ) 21zephyr_include_directories( 22 ${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/include 23 ) 24endif() 25 26if(CONFIG_LIBSBC_DECODER) 27zephyr_library_sources( 28 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/alloc.c 29 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/bitalloc.c 30 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/bitalloc-sbc.c 31 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/bitstream-decode.c 32 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/decoder-oina.c 33 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/decoder-private.c 34 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/decoder-sbc.c 35 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/dequant.c 36 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/framing.c 37 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/framing-sbc.c 38 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/oi_codec_version.c 39 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/readsamplesjoint.inc 40 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/synthesis-8-generated.c 41 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/synthesis-dct8.c 42 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/synthesis-sbc.c 43 ) 44zephyr_include_directories( 45 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/include 46 ${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce 47 ) 48endif() 49endif() 50