Marco Nelissen | 2fa59c8 | 2020-04-22 09:33:28 -0700 | [diff] [blame] | 1 | cc_defaults { |
| 2 | name: "libsonivox-defaults", |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 3 | srcs: [ |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 4 | "lib_src/eas_data.c", |
| 5 | "lib_src/eas_dlssynth.c", |
| 6 | "lib_src/eas_flog.c", |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 7 | "lib_src/eas_imelody.c", |
| 8 | "lib_src/eas_imelodydata.c", |
| 9 | "lib_src/eas_math.c", |
| 10 | "lib_src/eas_mdls.c", |
| 11 | "lib_src/eas_midi.c", |
| 12 | "lib_src/eas_mididata.c", |
| 13 | "lib_src/eas_mixbuf.c", |
| 14 | "lib_src/eas_mixer.c", |
| 15 | "lib_src/eas_ota.c", |
| 16 | "lib_src/eas_otadata.c", |
| 17 | "lib_src/eas_pan.c", |
| 18 | "lib_src/eas_pcm.c", |
| 19 | "lib_src/eas_pcmdata.c", |
| 20 | "lib_src/eas_public.c", |
| 21 | "lib_src/eas_reverb.c", |
| 22 | "lib_src/eas_reverbdata.c", |
| 23 | "lib_src/eas_rtttl.c", |
| 24 | "lib_src/eas_rtttldata.c", |
| 25 | "lib_src/eas_smf.c", |
| 26 | "lib_src/eas_smfdata.c", |
| 27 | "lib_src/eas_voicemgt.c", |
| 28 | "lib_src/eas_wtengine.c", |
| 29 | "lib_src/eas_wtsynth.c", |
| 30 | "lib_src/eas_xmf.c", |
| 31 | "lib_src/eas_xmfdata.c", |
| 32 | "lib_src/wt_22khz.c", |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 33 | "host_src/eas_config.c", |
| 34 | "host_src/eas_hostmm.c", |
| 35 | "host_src/eas_report.c", |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 36 | ], |
| 37 | |
| 38 | cflags: [ |
| 39 | "-O2", |
| 40 | "-DUNIFIED_DEBUG_MESSAGES", |
| 41 | "-DEAS_WT_SYNTH", |
| 42 | "-D_IMELODY_PARSER", |
| 43 | "-D_RTTTL_PARSER", |
| 44 | "-D_OTA_PARSER", |
| 45 | "-D_XMF_PARSER", |
| 46 | "-DNUM_OUTPUT_CHANNELS=2", |
| 47 | "-D_SAMPLE_RATE_22050", |
| 48 | "-DMAX_SYNTH_VOICES=64", |
taeseok715.kim | 9258597 | 2019-02-12 19:13:29 +0900 | [diff] [blame] | 49 | "-D_16_BIT_SAMPLES", |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 50 | "-D_FILTER_ENABLED", |
| 51 | "-DDLS_SYNTHESIZER", |
| 52 | "-D_REVERB_ENABLED", |
| 53 | |
| 54 | "-Wno-unused-parameter", |
| 55 | "-Werror", |
| 56 | |
| 57 | // not using these options |
| 58 | // "-D_WAVE_PARSER", |
| 59 | // "-D_IMA_DECODER", // (needed for IMA-ADPCM wave files) |
| 60 | // "-D_CHORUS_ENABLED", |
| 61 | ], |
| 62 | |
| 63 | local_include_dirs: [ |
| 64 | "host_src", |
| 65 | "lib_src", |
| 66 | ], |
| 67 | export_include_dirs: ["include"], |
| 68 | |
| 69 | shared_libs: [ |
| 70 | "liblog", |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 71 | ], |
| 72 | |
| 73 | arch: { |
| 74 | arm: { |
| 75 | instruction_set: "arm", |
| 76 | |
| 77 | srcs: [ |
| 78 | "lib_src/ARM-E_filter_gnu.s", |
taeseok715.kim | 9258597 | 2019-02-12 19:13:29 +0900 | [diff] [blame] | 79 | //"lib_src/ARM-E_interpolate_loop_gnu.s", |
| 80 | //"lib_src/ARM-E_interpolate_noloop_gnu.s", |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 81 | "lib_src/ARM-E_mastergain_gnu.s", |
taeseok715.kim | 9258597 | 2019-02-12 19:13:29 +0900 | [diff] [blame] | 82 | //"lib_src/ARM-E_voice_gain_gnu.s", |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 83 | ], |
| 84 | |
| 85 | asflags: [ |
| 86 | // In order to use #include instead of .include |
| 87 | "-xassembler-with-cpp", |
| 88 | |
| 89 | "-Wa,--defsym,SAMPLE_RATE_22050=1", |
| 90 | "-Wa,--defsym,STEREO_OUTPUT=1", |
| 91 | "-Wa,--defsym,FILTER_ENABLED=1", |
taeseok715.kim | 9258597 | 2019-02-12 19:13:29 +0900 | [diff] [blame] | 92 | "-Wa,--defsym,SAMPLES_16_BIT=1", |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 93 | ], |
| 94 | |
| 95 | cflags: [ |
| 96 | "-DNATIVE_EAS_KERNEL", |
| 97 | ], |
| 98 | |
| 99 | // .s files not ported for Clang assembler yet. |
| 100 | clang_asflags: ["-no-integrated-as"], |
| 101 | }, |
| 102 | arm64: { |
| 103 | // .s files not ported for Clang assembler yet. |
| 104 | clang_asflags: ["-no-integrated-as"], |
| 105 | }, |
| 106 | }, |
Marco Nelissen | 66c4b51 | 2019-06-19 15:07:59 -0700 | [diff] [blame] | 107 | sanitize: { |
| 108 | cfi: true, |
| 109 | misc_undefined: [ |
| 110 | "bounds", |
| 111 | "unsigned-integer-overflow", |
| 112 | "signed-integer-overflow", |
| 113 | ], |
| 114 | } |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 115 | } |
Marco Nelissen | 2fa59c8 | 2020-04-22 09:33:28 -0700 | [diff] [blame] | 116 | |
| 117 | cc_library { |
| 118 | name: "libsonivoxwithoutjet", |
| 119 | defaults: ["libsonivox-defaults"], |
Jiyong Park | 74bbfa9 | 2020-04-27 15:55:37 +0900 | [diff] [blame] | 120 | apex_available: [ |
| 121 | "//apex_available:platform", |
| 122 | "com.android.media", |
| 123 | ], |
Jooyung Han | eb1927a | 2020-05-11 17:21:02 +0900 | [diff] [blame^] | 124 | min_sdk_version: "29", |
Marco Nelissen | 2fa59c8 | 2020-04-22 09:33:28 -0700 | [diff] [blame] | 125 | } |
| 126 | |
| 127 | cc_library { |
| 128 | name: "libsonivox", |
| 129 | defaults: ["libsonivox-defaults"], |
| 130 | srcs: [ |
| 131 | "lib_src/jet.c", |
| 132 | ], |
| 133 | |
| 134 | cflags: [ |
| 135 | "-DJET_INTERFACE", |
| 136 | ], |
| 137 | } |
| 138 | |
| 139 | |