os-win32.mak 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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_win32
  12. #
  13. # Codecs
  14. #
  15. AC_NO_G711_CODEC=0
  16. AC_NO_L16_CODEC=0
  17. AC_NO_GSM_CODEC=0
  18. AC_NO_SPEEX_CODEC=0
  19. AC_NO_ILBC_CODEC=0
  20. AC_NO_G722_CODEC=0
  21. AC_NO_G7221_CODEC=0
  22. export CODEC_OBJS=
  23. ifeq ($(AC_NO_G711_CODEC),1)
  24. export CFLAGS += -DPJMEDIA_HAS_G711_CODEC=0
  25. else
  26. export CODEC_OBJS +=
  27. endif
  28. ifeq ($(AC_NO_L16_CODEC),1)
  29. export CFLAGS += -DPJMEDIA_HAS_L16_CODEC=0
  30. else
  31. export CODEC_OBJS += l16.o
  32. endif
  33. ifeq ($(AC_NO_GSM_CODEC),1)
  34. export CFLAGS += -DPJMEDIA_HAS_GSM_CODEC=0
  35. else
  36. export CODEC_OBJS += gsm.o
  37. endif
  38. ifeq ($(AC_NO_SPEEX_CODEC),1)
  39. export CFLAGS += -DPJMEDIA_HAS_SPEEX_CODEC=0
  40. else
  41. export CFLAGS += -I$(THIRD_PARTY)/build/speex -I$(THIRD_PARTY)/speex/include
  42. export CODEC_OBJS += speex_codec.o
  43. #ifeq (@ac_no_speex_aec@,1)
  44. ifeq (0,1)
  45. export PJMEDIA_OBJS += echo_speex.o
  46. endif
  47. endif
  48. ifeq ($(AC_NO_ILBC_CODEC),1)
  49. export CFLAGS += -DPJMEDIA_HAS_ILBC_CODEC=0
  50. else
  51. export CODEC_OBJS += ilbc.o
  52. endif
  53. ifeq ($(AC_NO_G722_CODEC),1)
  54. export CFLAGS += -DPJMEDIA_HAS_G722_CODEC=0
  55. else
  56. export CODEC_OBJS += g722.o g722/g722_enc.o g722/g722_dec.o
  57. endif
  58. ifeq ($(AC_NO_G7221_CODEC),1)
  59. export CFLAGS += -DPJMEDIA_HAS_G7221_CODEC=0
  60. else
  61. export CODEC_OBJS += g7221.o
  62. export G7221_CFLAGS += -I$(THIRD_PARTY)
  63. endif
  64. #
  65. # Resample
  66. #
  67. AC_PJMEDIA_RESAMPLE=libresample
  68. ifeq ($(AC_PJMEDIA_RESAMPLE),none)
  69. # No resample support
  70. export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_NONE
  71. endif
  72. ifeq ($(AC_PJMEDIA_RESAMPLE),libresample)
  73. export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE
  74. endif
  75. ifeq ($(AC_PJMEDIA_RESAMPLE),libsamplerate)
  76. export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBSAMPLERATE
  77. endif
  78. ifeq ($(AC_PJMEDIA_RESAMPLE),speex)
  79. export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_SPEEX
  80. endif
  81. #
  82. # SRTP
  83. #
  84. #ifeq (@ac_external_srtp@,1)
  85. ifeq (0,1)
  86. # External SRTP
  87. export CFLAGS += -DPJMEDIA_EXTERNAL_SRTP=1
  88. else
  89. # Our SRTP in third_party
  90. export CFLAGS += -I$(THIRD_PARTY)/build/srtp \
  91. -I$(THIRD_PARTY)/srtp/crypto/include \
  92. -I$(THIRD_PARTY)/srtp/include
  93. endif
  94. #
  95. # PortAudio
  96. #
  97. ifneq ($(findstring pa,$(AC_PJMEDIA_SND)),)
  98. export CFLAGS += -I$(THIRD_PARTY)/build/portaudio -I$(THIRD_PARTY)/portaudio/include -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
  99. export SOUND_OBJS = pasound.o
  100. endif
  101. #
  102. # Win32 DirectSound
  103. #
  104. ifeq ($(AC_PJMEDIA_SND),ds)
  105. export SOUND_OBJS = dsound.o
  106. export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_WIN32_DIRECT_SOUND
  107. endif
  108. #
  109. # Last resort, null sound device
  110. #
  111. ifeq ($(AC_PJMEDIA_SND),null)
  112. export SOUND_OBJS = nullsound.o
  113. export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND
  114. endif