Makefile 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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_LIB := libwebrtc-$(TARGET_NAME)$(LIBEXT)
  7. ifeq ($(PJ_SHARED_LIBRARIES),)
  8. else
  9. export WEBRTC_SONAME := libwebrtc.$(SHLIB_SUFFIX)
  10. export WEBRTC_SHLIB := $(WEBRTC_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/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_SRCDIR = ../../webrtc/src/webrtc/
  23. export WEBRTC_OBJS = \
  24. modules/audio_processing/aec/aec_core.o \
  25. modules/audio_processing/aec/aec_rdft.o \
  26. modules/audio_processing/aec/aec_resampler.o \
  27. modules/audio_processing/aec/echo_cancellation.o \
  28. modules/audio_processing/aecm/aecm_core.o \
  29. modules/audio_processing/aecm/echo_control_mobile.o \
  30. modules/audio_processing/ns/noise_suppression.o \
  31. modules/audio_processing/ns/noise_suppression_x.o \
  32. modules/audio_processing/ns/ns_core.o \
  33. modules/audio_processing/ns/nsx_core.o \
  34. modules/audio_processing/utility/delay_estimator_wrapper.o \
  35. modules/audio_processing/utility/delay_estimator.o \
  36. common_audio/fft4g.o \
  37. common_audio/ring_buffer.o \
  38. common_audio/signal_processing/complex_bit_reverse.o \
  39. common_audio/signal_processing/complex_fft.o \
  40. common_audio/signal_processing/copy_set_operations.o \
  41. common_audio/signal_processing/cross_correlation.o \
  42. common_audio/signal_processing/division_operations.o \
  43. common_audio/signal_processing/downsample_fast.o \
  44. common_audio/signal_processing/energy.o \
  45. common_audio/signal_processing/get_scaling_square.o \
  46. common_audio/signal_processing/min_max_operations.o \
  47. common_audio/signal_processing/randomization_functions.o \
  48. common_audio/signal_processing/real_fft.o \
  49. common_audio/signal_processing/spl_init.o \
  50. common_audio/signal_processing/spl_sqrt.o \
  51. common_audio/signal_processing/spl_sqrt_floor.o \
  52. common_audio/signal_processing/vector_scaling_operations.o \
  53. $(WEBRTC_SRC)
  54. export WEBRTC_CFLAGS = $(_CFLAGS) $(WEBRTC_OTHER_CFLAGS)
  55. export WEBRTC_CXXFLAGS = $(WEBRTC_CFLAGS)
  56. export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
  57. ###############################################################################
  58. # Main entry
  59. #
  60. # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
  61. #
  62. TARGETS := $(WEBRTC_LIB) $(WEBRTC_SONAME)
  63. all: $(TARGETS)
  64. doc:
  65. cd .. && doxygen docs/doxygen.cfg
  66. dep: depend
  67. distclean: realclean
  68. .PHONY: all dep depend clean realclean distclean
  69. .PHONY: $(TARGETS)
  70. .PHONY: $(WEBRTC_LIB) $(WEBRTC_SONAME)
  71. libwebrtc: $(WEBRTC_LIB)
  72. $(WEBRTC_SONAME): $(WEBRTC_LIB)
  73. $(WEBRTC_LIB) $(WEBRTC_SONAME):
  74. $(MAKE) -f $(RULES_MAK) APP=WEBRTC app=libwebrtc $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
  75. clean print_lib:
  76. $(MAKE) -f $(RULES_MAK) APP=WEBRTC app=libwebrtc $@
  77. realclean:
  78. $(subst @@,$(subst /,$(HOST_PSEP),.webrtc-$(TARGET_NAME).depend),$(HOST_RMR))
  79. $(MAKE) -f $(RULES_MAK) APP=WEBRTC app=libwebrtc $@
  80. depend:
  81. $(MAKE) -f $(RULES_MAK) APP=WEBRTC app=libwebrtc $@