summaryrefslogtreecommitdiff
path: root/third_party/build
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2016-08-25 01:36:33 +0000
committerLiong Sauw Ming <ming@teluu.com>2016-08-25 01:36:33 +0000
commit78d67a9205358ec4f5c38fa4191f7042d3983047 (patch)
tree8af5992cbaec463de76ed49c8538fc7a69ff398a /third_party/build
parente9fc0d90805002cbca667c7c1d8c275adc458bc6 (diff)
Re #1954: Add WebRTC to third party component
* Add build config for GNU build systems git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5428 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'third_party/build')
-rw-r--r--third_party/build/os-auto.mak.in40
-rw-r--r--third_party/build/webrtc/Makefile100
-rw-r--r--third_party/build/webrtc/notes.txt2
3 files changed, 142 insertions, 0 deletions
diff --git a/third_party/build/os-auto.mak.in b/third_party/build/os-auto.mak.in
index 66653fa1..5eac2fd2 100644
--- a/third_party/build/os-auto.mak.in
+++ b/third_party/build/os-auto.mak.in
@@ -64,3 +64,43 @@ else
DIRS += yuv
endif
endif
+
+ifneq (@ac_no_webrtc@,1)
+ifeq (@ac_external_webrtc@,1)
+# External webrtc
+else
+DIRS += webrtc
+WEBRTC_OTHER_CFLAGS = -fexceptions -DWEBRTC_POSIX=1 @ac_webrtc_cflags@
+ifneq ($(findstring sse2,@ac_webrtc_instset@),)
+ WEBRTC_SRC = \
+ modules/audio_processing/aec/aec_core_sse2.o \
+ modules/audio_processing/aec/aec_rdft_sse2.o \
+ modules/audio_processing/aecm/aecm_core_c.o \
+ modules/audio_processing/ns/nsx_core_c.o \
+ system_wrappers/source/cpu_features.o
+else ifneq ($(findstring neon,@ac_webrtc_instset@),)
+ WEBRTC_SRC = \
+ modules/audio_processing/aec/aec_core_neon.o \
+ modules/audio_processing/aec/aec_rdft_neon.o \
+ modules/audio_processing/aecm/aecm_core_c.o \
+ modules/audio_processing/aecm/aecm_core_neon.o \
+ modules/audio_processing/ns/nsx_core_c.o \
+ modules/audio_processing/ns/nsx_core_neon.o \
+ common_audio/signal_processing/cross_correlation_neon.o \
+ common_audio/signal_processing/downsample_fast_neon.o \
+ common_audio/signal_processing/min_max_operations_neon.o
+ WEBRTC_OTHER_CFLAGS += -DWEBRTC_HAS_NEON
+else ifneq ($(findstring mips,@ac_webrtc_instset@),)
+ WEBRTC_SRC = \
+ modules/audio_processing/aec/aec_core_mips.o \
+ modules/audio_processing/aec/aec_rdft_mips.o \
+ modules/audio_processing/aecm/aecm_core_mips.o \
+ modules/audio_processing/ns/nsx_core_mips.o \
+ common_audio/signal_processing/cross_correlation_mips.o \
+ common_audio/signal_processing/downsample_fast_mips.o \
+ common_audio/signal_processing/min_max_operations_mips.o
+
+ WEBRTC_OTHER_CFLAGS += -DMIPS_FPU_LE
+endif
+endif
+endif
diff --git a/third_party/build/webrtc/Makefile b/third_party/build/webrtc/Makefile
new file mode 100644
index 00000000..3e654379
--- /dev/null
+++ b/third_party/build/webrtc/Makefile
@@ -0,0 +1,100 @@
+include ../../../build.mak
+include ../../../build/common.mak
+include ../os-$(OS_NAME).mak
+
+export LIBDIR := ../../lib
+
+RULES_MAK := $(PJDIR)/build/rules.mak
+
+export WEBRTC_LIB := libwebrtc-$(TARGET_NAME)$(LIBEXT)
+
+ifeq ($(PJ_SHARED_LIBRARIES),)
+else
+export WEBRTC_SONAME := libwebrtc.$(SHLIB_SUFFIX)
+export WEBRTC_SHLIB := $(WEBRTC_SONAME).$(PJ_VERSION_MAJOR)
+endif
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+ $(CFLAGS) $(CC_INC). $(CC_INC)../../webrtc/src \
+ $(CC_INC)../../../pjlib/include
+export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
+ $(HOST_CXXFLAGS) $(CXXFLAGS)
+export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
+ $(LDFLAGS)
+
+export WEBRTC_SRCDIR = ../../webrtc/src/webrtc/
+export WEBRTC_OBJS = \
+ modules/audio_processing/aec/aec_core.o \
+ modules/audio_processing/aec/aec_rdft.o \
+ modules/audio_processing/aec/aec_resampler.o \
+ modules/audio_processing/aec/echo_cancellation.o \
+ modules/audio_processing/aecm/aecm_core.o \
+ modules/audio_processing/aecm/echo_control_mobile.o \
+ modules/audio_processing/ns/noise_suppression.o \
+ modules/audio_processing/ns/noise_suppression_x.o \
+ modules/audio_processing/ns/ns_core.o \
+ modules/audio_processing/ns/nsx_core.o \
+ modules/audio_processing/utility/delay_estimator_wrapper.o \
+ modules/audio_processing/utility/delay_estimator.o \
+ common_audio/fft4g.o \
+ common_audio/ring_buffer.o \
+ common_audio/signal_processing/complex_bit_reverse.o \
+ common_audio/signal_processing/complex_fft.o \
+ common_audio/signal_processing/copy_set_operations.o \
+ common_audio/signal_processing/cross_correlation.o \
+ common_audio/signal_processing/division_operations.o \
+ common_audio/signal_processing/downsample_fast.o \
+ common_audio/signal_processing/energy.o \
+ common_audio/signal_processing/get_scaling_square.o \
+ common_audio/signal_processing/min_max_operations.o \
+ common_audio/signal_processing/randomization_functions.o \
+ common_audio/signal_processing/real_fft.o \
+ common_audio/signal_processing/spl_init.o \
+ common_audio/signal_processing/spl_sqrt.o \
+ common_audio/signal_processing/spl_sqrt_floor.o \
+ common_audio/signal_processing/vector_scaling_operations.o \
+ $(WEBRTC_SRC)
+
+
+export WEBRTC_CFLAGS = $(_CFLAGS) $(WEBRTC_OTHER_CFLAGS)
+export WEBRTC_CXXFLAGS = $(WEBRTC_CFLAGS)
+
+
+export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
+###############################################################################
+# Main entry
+#
+# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
+#
+TARGETS := $(WEBRTC_LIB) $(WEBRTC_SONAME)
+
+all: $(TARGETS)
+
+doc:
+ cd .. && doxygen docs/doxygen.cfg
+
+dep: depend
+distclean: realclean
+
+.PHONY: all dep depend clean realclean distclean
+.PHONY: $(TARGETS)
+.PHONY: $(WEBRTC_LIB) $(WEBRTC_SONAME)
+
+libwebrtc: $(WEBRTC_LIB)
+$(WEBRTC_SONAME): $(WEBRTC_LIB)
+$(WEBRTC_LIB) $(WEBRTC_SONAME):
+ $(MAKE) -f $(RULES_MAK) APP=WEBRTC app=libwebrtc $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
+
+clean print_lib:
+ $(MAKE) -f $(RULES_MAK) APP=WEBRTC app=libwebrtc $@
+
+realclean:
+ $(subst @@,$(subst /,$(HOST_PSEP),.webrtc-$(TARGET_NAME).depend),$(HOST_RMR))
+
+ $(MAKE) -f $(RULES_MAK) APP=WEBRTC app=libwebrtc $@
+
+depend:
+ $(MAKE) -f $(RULES_MAK) APP=WEBRTC app=libwebrtc $@
diff --git a/third_party/build/webrtc/notes.txt b/third_party/build/webrtc/notes.txt
new file mode 100644
index 00000000..dc47aeba
--- /dev/null
+++ b/third_party/build/webrtc/notes.txt
@@ -0,0 +1,2 @@
+Notes:
+* Source code for webrtc from https://chromium.googlesource.com/external/webrtc circa Oct 2015.