os-darwinos.mak 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. # PJMEDIA features exclusion
  2. export CFLAGS +=
  3. # Define the desired sound device backend
  4. # Valid values are:
  5. # - pa_unix: PortAudio on Unix (OSS or ALSA)
  6. # - pa_darwinos: PortAudio on MacOSX (CoreAudio)
  7. # - pa_old_darwinos: PortAudio on MacOSX (old CoreAudio, for OSX 10.2)
  8. # - pa_win32: PortAudio on Win32 (WMME)
  9. # - ds: Win32 DirectSound (dsound.c)
  10. # - null: Null sound device (nullsound.c)
  11. AC_PJMEDIA_SND=pa_old_darwinos
  12. # For Unix, specify if ALSA should be supported
  13. AC_PA_USE_ALSA=0
  14. #
  15. # Codecs
  16. #
  17. AC_NO_G711_CODEC=0
  18. AC_NO_L16_CODEC=0
  19. AC_NO_GSM_CODEC=0
  20. AC_NO_SPEEX_CODEC=0
  21. AC_NO_ILBC_CODEC=0
  22. AC_NO_G722_CODEC=0
  23. AC_NO_G7221_CODEC=0
  24. export CODEC_OBJS=
  25. ifeq ($(AC_NO_G711_CODEC),1)
  26. export CFLAGS += -DPJMEDIA_HAS_G711_CODEC=0
  27. else
  28. export CODEC_OBJS +=
  29. endif
  30. ifeq ($(AC_NO_L16_CODEC),1)
  31. export CFLAGS += -DPJMEDIA_HAS_L16_CODEC=0
  32. else
  33. export CODEC_OBJS += l16.o
  34. endif
  35. ifeq ($(AC_NO_GSM_CODEC),1)
  36. export CFLAGS += -DPJMEDIA_HAS_GSM_CODEC=0
  37. else
  38. export CODEC_OBJS += gsm.o
  39. endif
  40. ifeq ($(AC_NO_SPEEX_CODEC),1)
  41. export CFLAGS += -DPJMEDIA_HAS_SPEEX_CODEC=0
  42. else
  43. export CFLAGS += -I$(THIRD_PARTY)/build/speex -I$(THIRD_PARTY)/speex/include
  44. export CODEC_OBJS += speex_codec.o
  45. #ifeq (@ac_no_speex_aec@,1)
  46. ifeq (0,1)
  47. export PJMEDIA_OBJS += echo_speex.o
  48. endif
  49. endif
  50. ifeq ($(AC_NO_ILBC_CODEC),1)
  51. export CFLAGS += -DPJMEDIA_HAS_ILBC_CODEC=0
  52. else
  53. export CODEC_OBJS += ilbc.o
  54. endif
  55. ifeq ($(AC_NO_G722_CODEC),1)
  56. export CFLAGS += -DPJMEDIA_HAS_G722_CODEC=0
  57. else
  58. export CODEC_OBJS += g722.o g722/g722_enc.o g722/g722_dec.o
  59. endif
  60. ifeq ($(AC_NO_G7221_CODEC),1)
  61. export CFLAGS += -DPJMEDIA_HAS_G7221_CODEC=0
  62. else
  63. export CODEC_OBJS += g7221.o
  64. export G7221_CFLAGS += -I$(THIRD_PARTY)
  65. endif
  66. #
  67. # Resample
  68. #
  69. AC_PJMEDIA_RESAMPLE=libresample
  70. ifeq ($(AC_PJMEDIA_RESAMPLE),none)
  71. # No resample support
  72. export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_NONE
  73. endif
  74. ifeq ($(AC_PJMEDIA_RESAMPLE),libresample)
  75. export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE
  76. endif
  77. ifeq ($(AC_PJMEDIA_RESAMPLE),libsamplerate)
  78. export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBSAMPLERATE
  79. endif
  80. ifeq ($(AC_PJMEDIA_RESAMPLE),speex)
  81. export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_SPEEX
  82. endif
  83. #
  84. # SRTP
  85. #
  86. #ifeq (@ac_external_srtp@,1)
  87. ifeq (0,1)
  88. # External SRTP
  89. export CFLAGS += -DPJMEDIA_EXTERNAL_SRTP=1
  90. else
  91. # Our SRTP in third_party
  92. export CFLAGS += -I$(THIRD_PARTY)/build/srtp \
  93. -I$(THIRD_PARTY)/srtp/crypto/include \
  94. -I$(THIRD_PARTY)/srtp/include
  95. endif
  96. #
  97. # PortAudio
  98. #
  99. ifneq ($(findstring pa,$(AC_PJMEDIA_SND)),)
  100. export CFLAGS += -I$(THIRD_PARTY)/build/portaudio -I$(THIRD_PARTY)/portaudio/include -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
  101. export SOUND_OBJS = pasound.o
  102. endif
  103. #
  104. # Win32 DirectSound
  105. #
  106. ifeq ($(AC_PJMEDIA_SND),ds)
  107. export SOUND_OBJS = dsound.o
  108. export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_WIN32_DIRECT_SOUND
  109. endif
  110. #
  111. # Last resort, null sound device
  112. #
  113. ifeq ($(AC_PJMEDIA_SND),null)
  114. export SOUND_OBJS = nullsound.o
  115. export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND
  116. endif