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 | |
S Vasudev Prasad | ce801f5 | 2020-05-20 22:08:33 +0530 | [diff] [blame] | 73 | host_supported: true, |
| 74 | |
| 75 | target: { |
| 76 | darwin: { |
| 77 | enabled: false, |
| 78 | }, |
| 79 | }, |
| 80 | |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 81 | arch: { |
| 82 | arm: { |
| 83 | instruction_set: "arm", |
| 84 | |
| 85 | srcs: [ |
| 86 | "lib_src/ARM-E_filter_gnu.s", |
taeseok715.kim | 9258597 | 2019-02-12 19:13:29 +0900 | [diff] [blame] | 87 | //"lib_src/ARM-E_interpolate_loop_gnu.s", |
| 88 | //"lib_src/ARM-E_interpolate_noloop_gnu.s", |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 89 | "lib_src/ARM-E_mastergain_gnu.s", |
taeseok715.kim | 9258597 | 2019-02-12 19:13:29 +0900 | [diff] [blame] | 90 | //"lib_src/ARM-E_voice_gain_gnu.s", |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 91 | ], |
| 92 | |
| 93 | asflags: [ |
| 94 | // In order to use #include instead of .include |
| 95 | "-xassembler-with-cpp", |
| 96 | |
| 97 | "-Wa,--defsym,SAMPLE_RATE_22050=1", |
| 98 | "-Wa,--defsym,STEREO_OUTPUT=1", |
| 99 | "-Wa,--defsym,FILTER_ENABLED=1", |
taeseok715.kim | 9258597 | 2019-02-12 19:13:29 +0900 | [diff] [blame] | 100 | "-Wa,--defsym,SAMPLES_16_BIT=1", |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 101 | ], |
| 102 | |
| 103 | cflags: [ |
| 104 | "-DNATIVE_EAS_KERNEL", |
| 105 | ], |
| 106 | |
| 107 | // .s files not ported for Clang assembler yet. |
| 108 | clang_asflags: ["-no-integrated-as"], |
| 109 | }, |
| 110 | arm64: { |
| 111 | // .s files not ported for Clang assembler yet. |
| 112 | clang_asflags: ["-no-integrated-as"], |
| 113 | }, |
| 114 | }, |
Marco Nelissen | 66c4b51 | 2019-06-19 15:07:59 -0700 | [diff] [blame] | 115 | sanitize: { |
| 116 | cfi: true, |
| 117 | misc_undefined: [ |
| 118 | "bounds", |
| 119 | "unsigned-integer-overflow", |
| 120 | "signed-integer-overflow", |
| 121 | ], |
| 122 | } |
Dan Willemsen | cd67337 | 2016-09-21 15:32:16 -0700 | [diff] [blame] | 123 | } |
Marco Nelissen | 2fa59c8 | 2020-04-22 09:33:28 -0700 | [diff] [blame] | 124 | |
| 125 | cc_library { |
| 126 | name: "libsonivoxwithoutjet", |
| 127 | defaults: ["libsonivox-defaults"], |
Jiyong Park | 74bbfa9 | 2020-04-27 15:55:37 +0900 | [diff] [blame] | 128 | apex_available: [ |
| 129 | "//apex_available:platform", |
| 130 | "com.android.media", |
| 131 | ], |
Jooyung Han | eb1927a | 2020-05-11 17:21:02 +0900 | [diff] [blame] | 132 | min_sdk_version: "29", |
Marco Nelissen | 2fa59c8 | 2020-04-22 09:33:28 -0700 | [diff] [blame] | 133 | } |
| 134 | |
| 135 | cc_library { |
| 136 | name: "libsonivox", |
| 137 | defaults: ["libsonivox-defaults"], |
| 138 | srcs: [ |
| 139 | "lib_src/jet.c", |
| 140 | ], |
| 141 | |
| 142 | cflags: [ |
| 143 | "-DJET_INTERFACE", |
| 144 | ], |
| 145 | } |
| 146 | |
| 147 | |