Makefile 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. include ../../../build.mak
  2. include ../../../build/common.mak
  3. include ../os-$(OS_NAME).mak
  4. export LIBDIR := ../../lib
  5. RULES_MAK := $(PJDIR)/build/rules.mak
  6. export WEBRTC_AEC3_LIB := libwebrtc-aec3-$(TARGET_NAME)$(LIBEXT)
  7. ifeq ($(PJ_SHARED_LIBRARIES),)
  8. else
  9. export WEBRTC_AEC3_SONAME := libwebrtc-aec3.$(SHLIB_SUFFIX)
  10. export WEBRTC_AEC3_SHLIB := $(WEBRTC_AEC3_SONAME).$(PJ_VERSION_MAJOR)
  11. endif
  12. ###############################################################################
  13. # Gather all flags.
  14. #
  15. export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
  16. $(CFLAGS) $(CC_INC). $(CC_INC)../../webrtc_aec3/src \
  17. $(CC_INC)../../../pjlib/include
  18. export _CXXFLAGS:= $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
  19. $(HOST_CXXFLAGS) $(CXXFLAGS) $(_CFLAGS)
  20. export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
  21. $(LDFLAGS)
  22. export WEBRTC_AEC3_SRCDIR = ../../webrtc_aec3/src/
  23. export WEBRTC_AEC3_OBJS = \
  24. absl/types/bad_optional_access.o \
  25. common_audio/audio_util.o \
  26. common_audio/third_party/ooura/fft_size_128/ooura_fft.o \
  27. common_audio/third_party/ooura/fft_size_256/fft4g.o \
  28. common_audio/resampler/push_resampler.o \
  29. common_audio/resampler/push_sinc_resampler.o \
  30. common_audio/resampler/sinc_resampler.o \
  31. common_audio/signal_processing/splitting_filter2.o \
  32. api/audio/channel_layout.o \
  33. api/audio/echo_canceller3_config.o \
  34. api/audio/echo_canceller3_factory.o \
  35. modules/audio_processing/audio_buffer.o \
  36. modules/audio_processing/gain_controller2.o \
  37. modules/audio_processing/high_pass_filter.o \
  38. modules/audio_processing/splitting_filter.o \
  39. modules/audio_processing/three_band_filter_bank.o \
  40. modules/audio_processing/aec3/adaptive_fir_filter_erl.o \
  41. modules/audio_processing/aec3/adaptive_fir_filter.o \
  42. modules/audio_processing/aec3/aec_state.o \
  43. modules/audio_processing/aec3/aec3_common.o \
  44. modules/audio_processing/aec3/aec3_fft.o \
  45. modules/audio_processing/aec3/alignment_mixer.o \
  46. modules/audio_processing/aec3/api_call_jitter_metrics.o \
  47. modules/audio_processing/aec3/block_framer.o \
  48. modules/audio_processing/aec3/block_delay_buffer.o \
  49. modules/audio_processing/aec3/block_buffer.o \
  50. modules/audio_processing/aec3/block_processor_metrics.o \
  51. modules/audio_processing/aec3/block_processor.o \
  52. modules/audio_processing/aec3/clockdrift_detector.o \
  53. modules/audio_processing/aec3/coarse_filter_update_gain.o \
  54. modules/audio_processing/aec3/comfort_noise_generator.o \
  55. modules/audio_processing/aec3/decimator.o \
  56. modules/audio_processing/aec3/dominant_nearend_detector.o \
  57. modules/audio_processing/aec3/downsampled_render_buffer.o \
  58. modules/audio_processing/aec3/echo_audibility.o \
  59. modules/audio_processing/aec3/echo_canceller3.o \
  60. modules/audio_processing/aec3/echo_path_delay_estimator.o \
  61. modules/audio_processing/aec3/echo_path_variability.o \
  62. modules/audio_processing/aec3/echo_remover_metrics.o \
  63. modules/audio_processing/aec3/echo_remover.o \
  64. modules/audio_processing/aec3/erl_estimator.o \
  65. modules/audio_processing/aec3/erle_estimator.o \
  66. modules/audio_processing/aec3/fft_buffer.o \
  67. modules/audio_processing/aec3/filter_analyzer.o \
  68. modules/audio_processing/aec3/frame_blocker.o \
  69. modules/audio_processing/aec3/fullband_erle_estimator.o \
  70. modules/audio_processing/aec3/matched_filter_lag_aggregator.o \
  71. modules/audio_processing/aec3/matched_filter.o \
  72. modules/audio_processing/aec3/moving_average.o \
  73. modules/audio_processing/aec3/refined_filter_update_gain.o \
  74. modules/audio_processing/aec3/render_buffer.o \
  75. modules/audio_processing/aec3/render_delay_buffer.o \
  76. modules/audio_processing/aec3/render_delay_controller_metrics.o \
  77. modules/audio_processing/aec3/render_delay_controller.o \
  78. modules/audio_processing/aec3/render_signal_analyzer.o \
  79. modules/audio_processing/aec3/residual_echo_estimator.o \
  80. modules/audio_processing/aec3/reverb_decay_estimator.o \
  81. modules/audio_processing/aec3/reverb_frequency_response.o \
  82. modules/audio_processing/aec3/reverb_model_estimator.o \
  83. modules/audio_processing/aec3/reverb_model.o \
  84. modules/audio_processing/aec3/signal_dependent_erle_estimator.o \
  85. modules/audio_processing/aec3/spectrum_buffer.o \
  86. modules/audio_processing/aec3/stationarity_estimator.o \
  87. modules/audio_processing/aec3/subband_erle_estimator.o \
  88. modules/audio_processing/aec3/subband_nearend_detector.o \
  89. modules/audio_processing/aec3/subtractor_output_analyzer.o \
  90. modules/audio_processing/aec3/subtractor_output.o \
  91. modules/audio_processing/aec3/subtractor.o \
  92. modules/audio_processing/aec3/suppression_filter.o \
  93. modules/audio_processing/aec3/suppression_gain.o \
  94. modules/audio_processing/aec3/transparent_mode.o \
  95. modules/audio_processing/agc2/adaptive_agc.o \
  96. modules/audio_processing/agc2/adaptive_digital_gain_applier.o \
  97. modules/audio_processing/agc2/adaptive_mode_level_estimator.o \
  98. modules/audio_processing/agc2/biquad_filter.o \
  99. modules/audio_processing/agc2/cpu_features.o \
  100. modules/audio_processing/agc2/down_sampler.o \
  101. modules/audio_processing/agc2/fixed_digital_level_estimator.o \
  102. modules/audio_processing/agc2/gain_applier.o \
  103. modules/audio_processing/agc2/interpolated_gain_curve.o \
  104. modules/audio_processing/agc2/limiter_db_gain_curve.o \
  105. modules/audio_processing/agc2/limiter.o \
  106. modules/audio_processing/agc2/noise_level_estimator.o \
  107. modules/audio_processing/agc2/noise_spectrum_estimator.o \
  108. modules/audio_processing/agc2/saturation_protector_buffer.o \
  109. modules/audio_processing/agc2/saturation_protector.o \
  110. modules/audio_processing/agc2/signal_classifier.o \
  111. modules/audio_processing/agc2/vad_with_level.o \
  112. modules/audio_processing/agc2/vector_float_frame.o \
  113. modules/audio_processing/agc2/rnn_vad/auto_correlation.o \
  114. modules/audio_processing/agc2/rnn_vad/features_extraction.o \
  115. modules/audio_processing/agc2/rnn_vad/lp_residual.o \
  116. modules/audio_processing/agc2/rnn_vad/rnn.o \
  117. modules/audio_processing/agc2/rnn_vad/rnn_fc.o \
  118. modules/audio_processing/agc2/rnn_vad/rnn_gru.o \
  119. modules/audio_processing/agc2/rnn_vad/pitch_search_internal.o \
  120. modules/audio_processing/agc2/rnn_vad/pitch_search.o \
  121. modules/audio_processing/agc2/rnn_vad/spectral_features_internal.o \
  122. modules/audio_processing/agc2/rnn_vad/spectral_features.o \
  123. modules/audio_processing/ns/fast_math.o \
  124. modules/audio_processing/ns/histograms.o \
  125. modules/audio_processing/ns/noise_estimator.o \
  126. modules/audio_processing/ns/noise_suppressor.o \
  127. modules/audio_processing/ns/ns_fft.o \
  128. modules/audio_processing/ns/prior_signal_model_estimator.o \
  129. modules/audio_processing/ns/prior_signal_model.o \
  130. modules/audio_processing/ns/quantile_noise_estimator.o \
  131. modules/audio_processing/ns/signal_model_estimator.o \
  132. modules/audio_processing/ns/signal_model.o \
  133. modules/audio_processing/ns/speech_probability_estimator.o \
  134. modules/audio_processing/ns/suppression_params.o \
  135. modules/audio_processing/ns/wiener_filter.o \
  136. modules/audio_processing/logging/apm_data_dumper.o \
  137. modules/audio_processing/utility/cascaded_biquad_filter.o \
  138. modules/audio_processing/utility/delay_estimator_wrapper.o \
  139. modules/audio_processing/utility/delay_estimator.o \
  140. modules/audio_processing/utility/pffft_wrapper.o \
  141. rtc_base/checks.o \
  142. rtc_base/logging.o \
  143. rtc_base/platform_thread_types.o \
  144. rtc_base/race_checker.o \
  145. rtc_base/string_encode.o \
  146. rtc_base/string_to_number.o \
  147. rtc_base/string_utils.o \
  148. rtc_base/system_time.o \
  149. rtc_base/time_utils.o \
  150. rtc_base/experiments/field_trial_parser.o \
  151. rtc_base/memory/aligned_malloc.o \
  152. rtc_base/strings/string_builder.o \
  153. rtc_base/synchronization/mutex.o \
  154. rtc_base/synchronization/yield.o \
  155. rtc_base/system/file_wrapper.o \
  156. system_wrappers/source/cpu_features2.o \
  157. system_wrappers/source/field_trial.o \
  158. system_wrappers/source/metrics.o \
  159. third_party/rnnoise/src/rnn_vad_weights.o \
  160. third_party/pffft/src/pffft.o \
  161. $(WEBRTC_AEC3_SRC)
  162. export WEBRTC_AEC3_CFLAGS = $(_CFLAGS) $(WEBRTC_AEC3_OTHER_CFLAGS)
  163. export WEBRTC_AEC3_CXXFLAGS = $(WEBRTC_AEC3_CFLAGS) $(_CXXFLAGS)
  164. export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
  165. ###############################################################################
  166. # Main entry
  167. #
  168. # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
  169. #
  170. TARGETS := $(WEBRTC_AEC3_LIB) $(WEBRTC_AEC3_SONAME)
  171. all: $(TARGETS)
  172. doc:
  173. cd .. && doxygen docs/doxygen.cfg
  174. dep: depend
  175. distclean: realclean
  176. .PHONY: all dep depend clean realclean distclean
  177. .PHONY: $(TARGETS)
  178. .PHONY: $(WEBRTC_AEC3_LIB) $(WEBRTC_AEC3_SONAME)
  179. libwebrtc-aec3: $(WEBRTC_AEC3_LIB)
  180. $(WEBRTC_AEC3_SONAME): $(WEBRTC_AEC3_LIB)
  181. $(WEBRTC_AEC3_LIB) $(WEBRTC_AEC3_SONAME):
  182. $(MAKE) -f $(RULES_MAK) APP=WEBRTC_AEC3 app=libwebrtc-aec3 $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
  183. clean print_lib:
  184. $(MAKE) -f $(RULES_MAK) APP=WEBRTC_AEC3 app=libwebrtc-aec3 $@
  185. realclean:
  186. $(subst @@,$(subst /,$(HOST_PSEP),.webrtc-aec3-$(TARGET_NAME).depend),$(HOST_RMR))
  187. $(MAKE) -f $(RULES_MAK) APP=WEBRTC_AEC3 app=libwebrtc-aec3 $@
  188. depend:
  189. $(MAKE) -f $(RULES_MAK) APP=WEBRTC_AEC3 app=libwebrtc-aec3 $@