Bug 757637: Rollup makesystem changes for webrtc r=khuey r=ted f=glandium

This commit is contained in:
Randell Jesup 2012-06-20 07:27:43 -04:00
parent 8391238a46
commit 435602cf1a
19 changed files with 686 additions and 31 deletions

View File

@ -26,9 +26,13 @@ namespace std {
template ostream& ostream::_M_insert(unsigned long);
template ostream& ostream::_M_insert(long long);
template ostream& ostream::_M_insert(unsigned long long);
template ostream& ostream::_M_insert(bool);
template ostream& ostream::_M_insert(const void*);
template ostream& __ostream_insert(ostream&, const char*, streamsize);
template istream& istream::_M_extract(double&);
template istream& istream::_M_extract(float&);
template istream& istream::_M_extract(unsigned int&);
template istream& istream::_M_extract(unsigned long&);
#endif
#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 14)
/* Instantiate these templates to avoid GLIBCXX_3.4.14 symbol versions
@ -42,6 +46,7 @@ namespace std {
template string& string::operator=(string&&);
template wstring::basic_string(wstring&&);
template wstring& wstring::operator=(wstring&&);
template string& string::assign(string&&);
template wstring& wstring::assign(wstring&&);
#endif /* __GXX_EXPERIMENTAL_CXX0X__ */
#endif /* (__GNUC__ == 4) && (__GNUC_MINOR__ >= 5) */

View File

@ -137,6 +137,7 @@ MOZ_WEBM = @MOZ_WEBM@
MOZ_MEDIA_PLUGINS = @MOZ_MEDIA_PLUGINS@
MOZ_OMX_PLUGIN = @MOZ_OMX_PLUGIN@
MOZ_GSTREAMER = @MOZ_GSTREAMER@
MOZ_VP8 = @MOZ_VP8@
MOZ_VP8_ERROR_CONCEALMENT = @MOZ_VP8_ERROR_CONCEALMENT@
MOZ_VP8_ENCODER = @MOZ_VP8_ENCODER@
VPX_AS = @VPX_AS@
@ -170,6 +171,7 @@ MOZ_D3DX9_DLL = @MOZ_D3DX9_DLL@
MOZ_D3DCOMPILER_DLL = @MOZ_D3DCOMPILER_DLL@
MOZ_GL_PROVIDER = @MOZ_GL_PROVIDER@
MOZ_GL_DEFAULT_PROVIDER = @MOZ_GL_DEFAULT_PROVIDER@
MOZ_WEBRTC = @MOZ_WEBRTC@
JAVA=@JAVA@

View File

@ -633,7 +633,10 @@ endif
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))
# Dependencies which, if modified, should cause everything to rebuild
GLOBAL_DEPS += Makefile Makefile.in $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
GLOBAL_DEPS += Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
ifndef NO_MAKEFILE_RULE
GLOBAL_DEPS += Makefile.in
endif
##############################################
include $(topsrcdir)/config/makefiles/target_libs.mk
@ -1147,16 +1150,20 @@ GARBAGE_DIRS += $(_JAVA_DIR)
# Update Makefiles
###############################################################################
ifndef NO_MAKEFILE_RULE
# Note: Passing depth to make-makefile is optional.
# It saves the script some work, though.
Makefile: Makefile.in
@$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH)
endif
ifndef NO_SUBMAKEFILES_RULE
ifdef SUBMAKEFILES
# VPATH does not work on some machines in this case, so add $(srcdir)
$(SUBMAKEFILES): % : $(srcdir)/%.in
$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH) $@
endif
endif
ifdef AUTOUPDATE_CONFIGURE
$(topsrcdir)/configure: $(topsrcdir)/configure.in

View File

@ -1059,3 +1059,5 @@ gst/gst.h
gst/app/gstappsink.h
gst/app/gstappsrc.h
gst/video/video.h
sys/msg.h
sys/ipc.h

View File

@ -522,18 +522,22 @@ case "$target" in
fi
_CC_SUITE=8
_MSVS_VERSION=2005
AC_DEFINE(_CRT_SECURE_NO_DEPRECATE)
AC_DEFINE(_CRT_NONSTDC_NO_DEPRECATE)
elif test "$_CC_MAJOR_VERSION" = "15"; then
_CC_SUITE=9
_MSVS_VERSION=2008
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
elif test "$_CC_MAJOR_VERSION" = "16"; then
_CC_SUITE=10
_MSVS_VERSION=2010
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
elif test "$_CC_MAJOR_VERSION" = "17"; then
_CC_SUITE=11
_MSVS_VERSION=2011
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
else
@ -4250,9 +4254,12 @@ MOZ_WAVE=1
MOZ_MEDIA=
MOZ_OPUS=1
MOZ_WEBM=1
MOZ_WEBRTC=
MOZ_WEBRTC_SIGNALING=
MOZ_MEDIA_PLUGINS=
MOZ_MEDIA_NAVIGATOR=
MOZ_OMX_PLUGIN=
MOZ_VP8=
MOZ_VP8_ERROR_CONCEALMENT=
MOZ_VP8_ENCODER=
VPX_AS=
@ -5271,6 +5278,25 @@ if test "$NS_PRINTING"; then
AC_DEFINE(NS_PRINT_PREVIEW)
fi
dnl ========================================================
dnl = Enable WebRTC code
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(webrtc,
[ --enable-webrtc Enable support for WebRTC],
MOZ_WEBRTC=1,
MOZ_WEBRTC=)
if test -n "$MOZ_WEBRTC"; then
AC_DEFINE(MOZ_WEBRTC)
MOZ_MEDIA=1
MOZ_RAW=1
MOZ_VP8=1
MOZ_VP8_ENCODER=1
MOZ_VP8_ERROR_CONCEALMENT=1
fi
AC_SUBST(MOZ_WEBRTC)
dnl ========================================================
dnl = Enable Raw Codecs
dnl ========================================================
@ -5346,6 +5372,11 @@ MOZ_ARG_DISABLE_BOOL(webm,
MOZ_WEBM=,
MOZ_WEBM=1)
if test -n "$MOZ_WEBM"; then
AC_DEFINE(MOZ_WEBM)
MOZ_VP8=1
fi;
dnl ========================================================
dnl = Disable media plugin support
dnl ========================================================
@ -5397,8 +5428,8 @@ MOZ_ARG_WITH_BOOL(system-libvpx,
MOZ_LIBVPX_INCLUDES=
MOZ_LIBVPX_LIBS=
if test -n "$MOZ_WEBM"; then
AC_DEFINE(MOZ_WEBM)
if test -n "$MOZ_VP8"; then
AC_DEFINE(MOZ_VP8)
if test -n "$MOZ_VP8_ERROR_CONCEALMENT" ; then
AC_DEFINE(MOZ_VP8_ERROR_CONCEALMENT)
fi
@ -5425,7 +5456,7 @@ AC_SUBST(MOZ_NATIVE_LIBVPX)
AC_SUBST(MOZ_LIBVPX_INCLUDES)
AC_SUBST(MOZ_LIBVPX_LIBS)
if test -n "$MOZ_WEBM" -a -z "$MOZ_NATIVE_LIBVPX"; then
if test "$MOZ_WEBM"; then
MOZ_SYDNEYAUDIO=1
MOZ_CUBEB=1
MOZ_MEDIA=1
@ -5437,7 +5468,9 @@ if test -n "$MOZ_WEBM" -a -z "$MOZ_NATIVE_LIBVPX"; then
MOZ_VORBIS=1
;;
esac
fi
if test -n "$MOZ_VP8" -a -z "$MOZ_NATIVE_LIBVPX"; then
dnl Detect if we can use an assembler to compile optimized assembly for libvpx.
dnl We currently require yasm on all x86 platforms and require yasm 1.1.0 on Win32.
@ -8588,6 +8621,7 @@ AC_SUBST(MOZ_MEDIA_PLUGINS)
AC_SUBST(MOZ_OMX_PLUGIN)
AC_SUBST(MOZ_VP8_ERROR_CONCEALMENT)
AC_SUBST(MOZ_VP8_ENCODER)
AC_SUBST(MOZ_VP8)
AC_SUBST(MOZ_OGG)
AC_SUBST(MOZ_ALSA_LIBS)
AC_SUBST(MOZ_ALSA_CFLAGS)
@ -8865,6 +8899,52 @@ mv -f config/autoconf.mk config/autoconf.mk.orig 2> /dev/null
AC_OUTPUT($MAKEFILES)
# Generate Makefiles for WebRTC directly from .gyp files
if test "${OS_TARGET}" = "WINNT"; then
if test "$HAVE_64BIT_OS"; then
OS_BITS=64
else
OS_BITS=32
fi
EXTRA_GYP_DEFINES="-D MSVS_VERSION=${_MSVS_VERSION} -D MSVS_OS_BITS=${OS_BITS}"
fi
if test -n "$MOZ_WEBRTC"; then
AC_MSG_RESULT("generating WebRTC Makefiles...")
GYP_WEBRTC_OPTIONS="--format=mozmake -D build_with_mozilla=1 -D enable_protobuf=0 -D include_internal_video_render=0 ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}"
$PYTHON ${srcdir}/media/webrtc/trunk/build/gyp_chromium \
$GYP_WEBRTC_OPTIONS \
--generator-output=${_objdir}/media/webrtc/trunk \
${srcdir}/media/webrtc/trunk/peerconnection.gyp
if test "$?" != 0; then
AC_MSG_ERROR([failed to generate WebRTC Makefiles])
fi
# XXX disable until we land the tranche with signaling
if test -n "$MOZ_WEBRTC_SIGNALING"; then
AC_MSG_RESULT("generating WebRTC/Signaling Makefiles...")
$PYTHON ${srcdir}/media/webrtc/trunk/build/gyp_chromium \
$GYP_WEBRTC_OPTIONS \
--generator-output=${_objdir}/media/webrtc/signaling \
${srcdir}/media/webrtc/signaling/signaling.gyp
if test "$?" != 0; then
AC_MSG_ERROR([failed to generate WebRTC/Signaling Makefiles])
fi
fi
AC_MSG_RESULT("generating gtest Makefiles...")
# Ok to pass some extra -D's that are ignored here
$PYTHON ${srcdir}/media/webrtc/trunk/build/gyp_chromium \
$GYP_WEBRTC_OPTIONS \
--generator-output=${_objdir}/media/webrtc/trunk/testing/ \
${srcdir}/media/webrtc/trunk/testing/gtest.gyp
if test "$?" != 0; then
AC_MSG_ERROR([failed to generate gtest Makefiles])
fi
fi
# Populate the virtualenv
AC_MSG_RESULT([Populating Python virtualenv])
$MAKE -C build/virtualenv MACOSX_DEPLOYMENT_TARGET= || exit 1

View File

@ -633,7 +633,10 @@ endif
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))
# Dependencies which, if modified, should cause everything to rebuild
GLOBAL_DEPS += Makefile Makefile.in $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
GLOBAL_DEPS += Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
ifndef NO_MAKEFILE_RULE
GLOBAL_DEPS += Makefile.in
endif
##############################################
include $(topsrcdir)/config/makefiles/target_libs.mk
@ -1147,16 +1150,20 @@ GARBAGE_DIRS += $(_JAVA_DIR)
# Update Makefiles
###############################################################################
ifndef NO_MAKEFILE_RULE
# Note: Passing depth to make-makefile is optional.
# It saves the script some work, though.
Makefile: Makefile.in
@$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH)
endif
ifndef NO_SUBMAKEFILES_RULE
ifdef SUBMAKEFILES
# VPATH does not work on some machines in this case, so add $(srcdir)
$(SUBMAKEFILES): % : $(srcdir)/%.in
$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH) $@
endif
endif
ifdef AUTOUPDATE_CONFIGURE
$(topsrcdir)/configure: $(topsrcdir)/configure.in

View File

@ -1059,3 +1059,5 @@ gst/gst.h
gst/app/gstappsink.h
gst/app/gstappsrc.h
gst/video/video.h
sys/msg.h
sys/ipc.h

View File

@ -65,8 +65,13 @@ ifdef MOZ_WEBM
SHARED_LIBRARY_LIBS += \
$(DEPTH)/media/libnestegg/src/$(LIB_PREFIX)nestegg.$(LIB_SUFFIX) \
$(NULL)
endif
ifdef MOZ_VP8
ifndef MOZ_NATIVE_LIBVPX
SHARED_LIBRARY_LIBS += $(DEPTH)/media/libvpx/$(LIB_PREFIX)vpx.$(LIB_SUFFIX)
SHARED_LIBRARY_LIBS += \
$(DEPTH)/media/libvpx/$(LIB_PREFIX)vpx.$(LIB_SUFFIX) \
$(NULL)
endif
endif
@ -108,7 +113,11 @@ SHARED_LIBRARY_LIBS += \
SHARED_LIBRARY_LIBS += \
$(DEPTH)/gfx/2d/$(LIB_PREFIX)gfx2d.$(LIB_SUFFIX) \
$(NULL)
ifdef MOZ_WEBRTC
include $(topsrcdir)/media/webrtc/shared_libs.mk
endif
ifdef MOZ_ENABLE_SKIA
SHARED_LIBRARY_LIBS += $(MOZ_SKIA_LIBS)
endif
@ -120,6 +129,13 @@ OS_LIBS += $(call EXPAND_LIBNAME,usp10 ole32)
# OTS uses uncompress2() from libz, so we need to link with this
EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
ifdef MOZ_WEBRTC
EXTRA_DSO_LDOPTS += \
-LIBPATH:"$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)" \
$(NULL)
OS_LIBS += $(call EXPAND_LIBNAME,secur32 crypt32 iphlpapi strmiids dmoguids wmcodecdspuuid amstrmid msdmo wininet)
endif
DEFFILE = symbols.def
endif

View File

@ -143,6 +143,21 @@ ShGetInfoLog
ShCompile
ShGetInfo
ShConstructCompiler
#ifdef MOZ_WEBRTC
#ifdef HAVE_64BIT_OS
?GetInterface@ViERender@webrtc@@SAPEAV12@PEAVVideoEngine@2@@Z
?GetInterface@ViECapture@webrtc@@SAPEAV12@PEAVVideoEngine@2@@Z
?GetInterface@ViEBase@webrtc@@SAPEAV12@PEAVVideoEngine@2@@Z
?Create@VideoEngine@webrtc@@SAPEAV12@XZ
?Delete@VideoEngine@webrtc@@SA_NAEAPEAV12@@Z
#else
?GetInterface@ViERender@webrtc@@SAPAV12@PAVVideoEngine@2@@Z
?GetInterface@ViECapture@webrtc@@SAPAV12@PAVVideoEngine@2@@Z
?GetInterface@ViEBase@webrtc@@SAPAV12@PAVVideoEngine@2@@Z
?Create@VideoEngine@webrtc@@SAPAV12@XZ
?Delete@VideoEngine@webrtc@@SA_NAAPAV12@@Z
#endif
#endif
ShGetActiveAttrib
ShGetActiveUniform
#ifndef MOZ_NATIVE_PNG

19
media/webrtc/Makefile.in Normal file
View File

@ -0,0 +1,19 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = \
trunk \
trunk/testing \
$(NULL)
# These Makefiles don't have corresponding Makefile.ins
NO_SUBMAKEFILES_RULE = 1
include $(topsrcdir)/config/rules.mk

View File

@ -0,0 +1,58 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# shared libs for webrtc
SHARED_LIBRARY_LIBS += \
$(call EXPAND_LIBNAME_PATH,jingle,$(DEPTH)/media/webrtc/trunk/third_party/libjingle/libjingle_libjingle) \
$(call EXPAND_LIBNAME_PATH,srtp,$(DEPTH)/media/webrtc/trunk/third_party/libsrtp/libsrtp_libsrtp) \
$(call EXPAND_LIBNAME_PATH,jingle_p2p,$(DEPTH)/media/webrtc/trunk/third_party/libjingle/libjingle_libjingle_p2p) \
$(call EXPAND_LIBNAME_PATH,jingle_app,$(DEPTH)/media/webrtc/trunk/third_party/libjingle/libjingle_libjingle_app) \
$(call EXPAND_LIBNAME_PATH,jsoncpp,$(DEPTH)/media/webrtc/trunk/third_party/jsoncpp/jsoncpp_jsoncpp) \
$(call EXPAND_LIBNAME_PATH,video_capture_module,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_capture_module) \
$(call EXPAND_LIBNAME_PATH,webrtc_utility,$(DEPTH)/media/webrtc/trunk/src/modules/modules_webrtc_utility) \
$(call EXPAND_LIBNAME_PATH,audio_coding_module,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_coding_module) \
$(call EXPAND_LIBNAME_PATH,CNG,$(DEPTH)/media/webrtc/trunk/src/modules/modules_CNG) \
$(call EXPAND_LIBNAME_PATH,signal_processing,$(DEPTH)/media/webrtc/trunk/src/common_audio/common_audio_signal_processing) \
$(call EXPAND_LIBNAME_PATH,G711,$(DEPTH)/media/webrtc/trunk/src/modules/modules_G711) \
$(call EXPAND_LIBNAME_PATH,G722,$(DEPTH)/media/webrtc/trunk/src/modules/modules_G722) \
$(call EXPAND_LIBNAME_PATH,iLBC,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iLBC) \
$(call EXPAND_LIBNAME_PATH,iSAC,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iSAC) \
$(call EXPAND_LIBNAME_PATH,iSACFix,$(DEPTH)/media/webrtc/trunk/src/modules/modules_iSACFix) \
$(call EXPAND_LIBNAME_PATH,PCM16B,$(DEPTH)/media/webrtc/trunk/src/modules/modules_PCM16B) \
$(call EXPAND_LIBNAME_PATH,NetEq,$(DEPTH)/media/webrtc/trunk/src/modules/modules_NetEq) \
$(call EXPAND_LIBNAME_PATH,resampler,$(DEPTH)/media/webrtc/trunk/src/common_audio/common_audio_resampler) \
$(call EXPAND_LIBNAME_PATH,vad,$(DEPTH)/media/webrtc/trunk/src/common_audio/common_audio_vad) \
$(call EXPAND_LIBNAME_PATH,system_wrappers,$(DEPTH)/media/webrtc/trunk/src/system_wrappers/source/system_wrappers_system_wrappers) \
$(call EXPAND_LIBNAME_PATH,webrtc_video_coding,$(DEPTH)/media/webrtc/trunk/src/modules/modules_webrtc_video_coding) \
$(call EXPAND_LIBNAME_PATH,webrtc_i420,$(DEPTH)/media/webrtc/trunk/src/modules/modules_webrtc_i420) \
$(call EXPAND_LIBNAME_PATH,webrtc_vp8,$(DEPTH)/media/webrtc/trunk/src/modules/modules_webrtc_vp8) \
$(call EXPAND_LIBNAME_PATH,webrtc_libyuv,$(DEPTH)/media/webrtc/trunk/src/common_video/common_video_webrtc_libyuv) \
$(call EXPAND_LIBNAME_PATH,video_render_module,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_render_module) \
$(call EXPAND_LIBNAME_PATH,video_engine_core,$(DEPTH)/media/webrtc/trunk/src/video_engine/video_engine_video_engine_core) \
$(call EXPAND_LIBNAME_PATH,media_file,$(DEPTH)/media/webrtc/trunk/src/modules/modules_media_file) \
$(call EXPAND_LIBNAME_PATH,rtp_rtcp,$(DEPTH)/media/webrtc/trunk/src/modules/modules_rtp_rtcp) \
$(call EXPAND_LIBNAME_PATH,udp_transport,$(DEPTH)/media/webrtc/trunk/src/modules/modules_udp_transport) \
$(call EXPAND_LIBNAME_PATH,video_processing,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing) \
$(call EXPAND_LIBNAME_PATH,video_processing_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing_sse2) \
$(call EXPAND_LIBNAME_PATH,voice_engine_core,$(DEPTH)/media/webrtc/trunk/src/voice_engine/voice_engine_voice_engine_core) \
$(call EXPAND_LIBNAME_PATH,audio_conference_mixer,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_conference_mixer) \
$(call EXPAND_LIBNAME_PATH,audio_device,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_device) \
$(call EXPAND_LIBNAME_PATH,audio_processing,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_processing) \
$(call EXPAND_LIBNAME_PATH,aec,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec) \
$(call EXPAND_LIBNAME_PATH,aec_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec_sse2) \
$(call EXPAND_LIBNAME_PATH,apm_util,$(DEPTH)/media/webrtc/trunk/src/modules/modules_apm_util) \
$(call EXPAND_LIBNAME_PATH,aecm,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aecm) \
$(call EXPAND_LIBNAME_PATH,agc,$(DEPTH)/media/webrtc/trunk/src/modules/modules_agc) \
$(call EXPAND_LIBNAME_PATH,ns,$(DEPTH)/media/webrtc/trunk/src/modules/modules_ns) \
$(call EXPAND_LIBNAME_PATH,yuv,$(DEPTH)/media/webrtc/trunk/third_party/libyuv/libyuv_libyuv) \
$(call EXPAND_LIBNAME_PATH,expat,$(DEPTH)/media/webrtc/trunk/third_party/expat/expat_expat) \
$(call EXPAND_LIBNAME_PATH,webrtc_jpeg,$(DEPTH)/media/webrtc/trunk/src/common_video/common_video_webrtc_jpeg) \
$(NULL)
ifneq ($(OS_TARGET),WINNT)
SHARED_LIBRARY_LIBS += \
$(call EXPAND_LIBNAME_PATH,sipcc,$(DEPTH)/media/webrtc/signaling/signaling_sipcc) \
$(call EXPAND_LIBNAME_PATH,ecc,$(DEPTH)/media/webrtc/signaling/signaling_ecc) \
$(NULL)
endif

View File

@ -138,6 +138,7 @@
['OS=="win"', {
'defines': [
'WEBRTC_WIN',
'WEBRTC_EXPORT',
],
# TODO(andrew): enable all warnings when possible.
# 4389: Signed/unsigned mismatch.

View File

@ -1,17 +0,0 @@
import sys
import _winreg
def main():
for version in ["7.1", "7.0"]:
try:
key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v%s\WinSDKSamples" % version)
path, typ = _winreg.QueryValueEx(key, "InstallationFolder")
print path.replace("\\", "/")
return 0
except:
pass
print >>sys.stderr, "Could not locate Windows SDK Samples directory via the registry"
return 1
if __name__ == '__main__':
sys.exit(main())

View File

@ -214,7 +214,6 @@ MAKEFLAGS=-r
# The source directory tree.
srcdir := %(srcdir)s
abs_srcdir := $(abspath $(srcdir))
os_sep := %(os_sep)s
# The name of the builddir.
builddir_name ?= %(builddir)s
@ -610,7 +609,6 @@ def StringToMakefileVariable(string):
return re.sub('[ {}$]', '_', string)
os_sep = os.sep
srcdir_prefix = ''
def Sourceify(path):
"""Convert a path to its source directory form."""
@ -1970,15 +1968,13 @@ def GenerateOutput(target_list, target_dicts, data, params):
default_configuration = 'Default'
srcdir = '.'
global os_sep
os_sep = os.sep
makefile_name = 'Makefile' + options.suffix
makefile_path = os.path.join(options.toplevel_dir, makefile_name)
if options.generator_output:
global srcdir_prefix
makefile_path = os.path.join(options.generator_output, makefile_path)
srcdir = gyp.common.RelativePath(srcdir, options.generator_output)
srcdir_prefix = '$(srcdir)' + os.sep
srcdir_prefix = '$(srcdir)/'
flock_command= 'flock'
header_params = {
@ -1990,7 +1986,6 @@ def GenerateOutput(target_list, target_dicts, data, params):
'link_commands': LINK_COMMANDS_LINUX,
'extra_commands': '',
'srcdir': srcdir,
'os_sep': os.sep,
}
if flavor == 'mac':
flock_command = './gyp-mac-tool flock'

View File

@ -0,0 +1,445 @@
# Copyright (c) 2012 Mozilla Foundation. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Python 2.5 needs this for the with statement.
from __future__ import with_statement
import collections
import gyp
import gyp.common
import sys
import os
import re
import shlex
generator_wants_sorted_dependencies = True
generator_default_variables = {
}
for dirname in ['INTERMEDIATE_DIR', 'SHARED_INTERMEDIATE_DIR', 'PRODUCT_DIR',
'LIB_DIR', 'SHARED_LIB_DIR']:
# Some gyp steps fail if these are empty(!).
generator_default_variables[dirname] = 'dir'
for unused in ['RULE_INPUT_PATH', 'RULE_INPUT_ROOT', 'RULE_INPUT_NAME',
'RULE_INPUT_DIRNAME', 'RULE_INPUT_EXT',
'EXECUTABLE_PREFIX', 'EXECUTABLE_SUFFIX',
'STATIC_LIB_PREFIX', 'STATIC_LIB_SUFFIX',
'SHARED_LIB_PREFIX', 'SHARED_LIB_SUFFIX',
'LINKER_SUPPORTS_ICF']:
generator_default_variables[unused] = ''
COMMON_HEADER = """# This makefile was automatically generated from %(buildfile)s. Please do not edit it directly.
DEPTH = %(depth)s
topsrcdir = %(topsrcdir)s
srcdir = %(srcdir)s
VPATH = %(srcdir)s
"""
COMMON_FOOTER = """
# Skip rules that deal with regenerating Makefiles from Makefile.in files.
NO_MAKEFILE_RULE = 1
NO_SUBMAKEFILES_RULE = 1
include $(topsrcdir)/config/rules.mk
include $(DEPTH)/%(relative_path)s/common.mk
"""
COMMON_MK = """# This file was generated by mozmake.py. Do not edit it directly.
ifndef COMMON_MK_INCLUDED
COMMON_MK_INCLUDED := 1
ifdef MOZ_DEBUG
CFLAGS += $(CPPFLAGS_Debug) $(CFLAGS_Debug)
CXXFLAGS += $(CPPFLAGS_Debug) $(CXXFLAGS_Debug)
DEFINES += $(DEFINES_Debug)
LOCAL_INCLUDES += $(INCLUDES_Debug)
else # non-MOZ_DEBUG
CFLAGS += $(CPPFLAGS_Release) $(CFLAGS_Release)
CXXFLAGS += $(CPPFLAGS_Release) $(CXXFLAGS_Release)
DEFINES += $(DEFINES_Release)
LOCAL_INCLUDES += $(INCLUDES_Release)
endif
ifeq (WINNT,$(OS_TARGET))
# These get set via VC project file settings for normal GYP builds.
DEFINES += -DUNICODE -D_UNICODE
LOCAL_INCLUDES += -I"$(MOZ_DIRECTX_SDK_PATH)/include"
endif
# Don't use STL wrappers when compiling Google code.
STL_FLAGS =
# Work around the fact that Google codebases don't compile cleanly
# with -pedantic.
OS_CFLAGS := $(filter-out -pedantic,$(OS_CFLAGS))
OS_CXXFLAGS := $(filter-out -pedantic,$(OS_CXXFLAGS))
# Skip Mozilla-specific include locations.
# Specific GYP files can add them back by adding
# $(DIST)/include to their includes.
INCLUDES = -I. $(LOCAL_INCLUDES)
# Ensure that subdirs for sources get created before compiling
ifdef OBJS
SUB_SRCDIRS := $(addsuffix .dirstamp,$(addprefix $(CURDIR)/,$(sort $(dir $(OBJS)))))
$(OBJS): $(SUB_SRCDIRS)
$(SUB_SRCDIRS):
$(MKDIR) -p $(dir $@)
touch $@
endif
# COPY_SRCS get copied to the current directory to be compiled
define COPY_SRC
$(notdir $(1)): $(1)
$$(INSTALL) $$(IFLAGS1) "$$<" .
endef # COPY_SRC
ifdef COPY_SRCS
GARBAGE += $(notdir $(COPY_SRCS))
$(foreach s,$(COPY_SRCS), $(eval $(call COPY_SRC,$(s))))
endif
# Rules for regenerating Makefiles from GYP files.
Makefile: %(input_gypfiles)s %(generator)s
$(PYTHON) %(commandline)s
endif
"""
def ensure_directory_exists(path):
dir = os.path.dirname(path)
if dir and not os.path.exists(dir):
os.makedirs(dir)
def GetFlavor(params):
"""Returns |params.flavor| if it's set, the system's default flavor else."""
flavors = {
'win32': 'win',
'darwin': 'mac',
'sunos5': 'solaris',
'freebsd7': 'freebsd',
'freebsd8': 'freebsd',
}
flavor = flavors.get(sys.platform, 'linux')
return params.get('flavor', flavor)
def CalculateVariables(default_variables, params):
generator_flags = params.get('generator_flags', {})
default_variables['OS'] = generator_flags.get('os', GetFlavor(params))
def CalculateGeneratorInputInfo(params):
"""Calculate the generator specific info that gets fed to input (called by
gyp)."""
generator_flags = params.get('generator_flags', {})
if generator_flags.get('adjust_static_libraries', False):
global generator_wants_static_library_dependencies_adjusted
generator_wants_static_library_dependencies_adjusted = True
def WriteMakefile(filename, data, build_file, depth, topsrcdir, srcdir, relative_path, extra_data=None):
if not os.path.isabs(topsrcdir):
topsrcdir = depth + "/" + topsrcdir
if not os.path.isabs(srcdir):
srcdir = depth + "/" + srcdir
#TODO: should compare with the existing file and not overwrite it if the
# contents are the same!
ensure_directory_exists(filename)
with open(filename, "w") as f:
f.write(COMMON_HEADER % {'buildfile': build_file,
'depth': depth,
'topsrcdir': topsrcdir,
'srcdir': srcdir})
for k, v in data.iteritems():
f.write("%s = %s\n" % (k, " \\\n ".join([''] + v) if isinstance(v, list) else v))
f.write(COMMON_FOOTER % {'relative_path': relative_path})
if extra_data:
f.write(extra_data)
def WriteCommonMk(path, build_files, scriptname, commandline):
with open(path, "w") as f:
f.write(COMMON_MK % {'input_gypfiles': ' '.join(build_files),
'generator': scriptname,
'commandline': ' '.join(commandline)})
def striplib(name):
"Strip lib prefixes from library names."
if name[:3] == 'lib':
return name[3:]
return name
CPLUSPLUS_EXTENSIONS = set([
'.cc',
'.cpp',
'.cxx'
])
COMPILABLE_EXTENSIONS = set([
'.c',
'.s',
'.S',
'.m',
'.mm'
])
COMPILABLE_EXTENSIONS.update(CPLUSPLUS_EXTENSIONS)
def swapslashes(p):
"Swap backslashes for forward slashes in a path."
return p.replace('\\', '/')
def getdepth(s):
"""Given a relative path, return a relative path consisting
of .. segments that would lead to the parent directory."""
return "/".join(".." for x in swapslashes(s).split("/") if x)
def Compilable(filename):
return os.path.splitext(filename)[1] in COMPILABLE_EXTENSIONS
class MakefileGenerator(object):
def __init__(self, target_dicts, data, options, depth, topsrcdir, relative_topsrcdir, relative_srcdir, output_dir):
self.target_dicts = target_dicts
self.data = data
self.options = options
self.depth = depth
self.relative_srcdir = swapslashes(relative_srcdir)
self.topsrcdir = swapslashes(topsrcdir)
self.relative_topsrcdir = swapslashes(relative_topsrcdir)
self.srcdir = swapslashes(os.path.join(topsrcdir, relative_srcdir))
self.output_dir = output_dir
# Directories to be built in order.
self.dirs = []
# Directories that can be built in any order, but before |dirs|.
self.parallel_dirs = []
# Targets that have been processed.
self.visited = set()
# Link dependencies.
self.target_link_deps = {}
def CalculateMakefilePath(self, build_file, target_name):
"""Determine where to write a Makefile for a given gyp file."""
rel_path = gyp.common.RelativePath(os.path.dirname(build_file),
self.srcdir)
# Add a subdir using the build_file name and the target_name.
rel_path = os.path.join(rel_path,
os.path.splitext(os.path.basename(build_file))[0]
+ "_" + target_name)
output_file = os.path.join(self.output_dir, rel_path, "Makefile")
return swapslashes(rel_path), swapslashes(output_file)
def ProcessTargets(self, needed_targets):
"""
Put all targets in proper order so that dependencies get built before
the targets that need them. Targets that have no dependencies
can get built in parallel_dirs. Targets with dependencies must be in
dirs, and must also be listed after any of their dependencies.
"""
for qualified_target in needed_targets:
if qualified_target in self.visited:
continue
self.ProcessTarget(qualified_target)
def ProcessTarget(self, qualified_target):
"""
Write a Makefile.in for |qualified_target| and add it to |dirs| or
|parallel_dirs| as appropriate, after processing all of its
dependencies.
"""
spec = self.target_dicts[qualified_target]
if 'dependencies' in spec and spec['dependencies']:
for dep in spec['dependencies']:
if dep not in self.visited:
self.ProcessTarget(dep)
dirs = self.dirs
else:
# no dependencies
dirs = self.parallel_dirs
# Now write a Makefile for this target
build_file, target, toolset = gyp.common.ParseQualifiedTarget(
qualified_target)
build_file = os.path.abspath(build_file)
rel_path, output_file = self.CalculateMakefilePath(build_file, target)
subdepth = self.depth + "/" + getdepth(rel_path)
if self.WriteTargetMakefile(output_file, rel_path, qualified_target, spec, build_file, subdepth):
# If WriteTargetMakefile returns True, then this is a useful target
dirs.append(rel_path)
self.visited.add(qualified_target)
def WriteTargetMakefile(self, output_file, rel_path, qualified_target, spec, build_file, depth):
configs = spec['configurations']
# Update global list of link dependencies.
if spec['type'] in ('static_library', 'shared_library'):
self.target_link_deps[qualified_target] = "$(call EXPAND_LIBNAME_PATH,%s,$(DEPTH)/%s/%s)" % (striplib(spec['target_name']), self.relative_srcdir, rel_path)
data = {}
#TODO: handle actions/rules/copies
if 'actions' in spec:
pass
if 'rules' in spec:
pass
if 'copies' in spec:
pass
libs = []
if 'dependencies' in spec:
for dep in spec['dependencies']:
if dep in self.target_link_deps:
libs.append(self.target_link_deps[dep])
if libs:
data['EXTRA_LIBS'] = libs
# Get DEFINES/INCLUDES
for configname in sorted(configs.keys()):
config = configs[configname]
#XXX: this sucks
defines = config.get('defines')
if defines:
data['DEFINES_%s' % configname] = ["-D%s" % d for d in defines]
includes = []
for i in config.get('include_dirs', []):
# Make regular paths into srcdir-relative paths, leave
# variable-specified paths alone.
if i.startswith("$(") or os.path.isabs(i):
if ' ' in i:
includes.append('"%s"' % i)
else:
includes.append(i)
else:
includes.append("$(srcdir)/" + i)
if includes:
data['INCLUDES_%s' % configname] = ["-I%s" %i for i in includes]
#XXX: handle mac stuff?
# we want to use our compiler options in general
# cflags = config.get('cflags')
# if cflags:
# data['CPPFLAGS_%s' % configname] = cflags
# cflags_c = config.get('cflags_c')
# if cflags_c:
# data['CFLAGS_%s' % configname] = cflags_c
# cflags_cc = config.get('cflags_cc')
# if cflags_cc:
# data['CXXFLAGS_%s' % configname] = cflags_cc
# we need to keep pkg-config flags however
cflags_mozilla = config.get('cflags_mozilla')
if cflags_mozilla:
data['CPPFLAGS_%s' % configname] = cflags_mozilla
sources = {
'CPPSRCS': {'exts': CPLUSPLUS_EXTENSIONS, 'files': []},
'CSRCS': {'exts': ['.c'], 'files': []},
'CMSRCS': {'exts': ['.m'], 'files': []},
'CMMSRCS': {'exts': ['.mm'], 'files': []},
'ASFILES': {'exts': ['.s'], 'files': []},
}
copy_srcs = []
for s in spec.get('sources', []):
if not Compilable(s):
continue
# Special-case absolute paths, they'll get copied into the objdir
# for compiling.
if os.path.isabs(s):
# GNU Make falls down pretty badly with spaces in filenames.
# Conveniently, using a single-character ? as a wildcard
# works fairly well.
copy_srcs.append(s.replace(' ', '?'))
s = os.path.basename(s)
ext = os.path.splitext(s)[1]
for source_type, d in sources.iteritems():
if ext in d['exts']:
d['files'].append(s)
break
for source_type, d in sources.iteritems():
if d['files']:
data[source_type] = d['files']
if copy_srcs:
data['COPY_SRCS'] = copy_srcs
if spec['type'] == 'executable':
data['PROGRAM'] = spec['target_name']
elif spec['type'] == 'static_library':
data['LIBRARY_NAME'] = striplib(spec['target_name'])
data['FORCE_STATIC_LIB'] = 1
elif spec['type'] in ('loadable_module', 'shared_library'):
data['LIBRARY_NAME'] = striplib(spec['target_name'])
data['FORCE_SHARED_LIB'] = 1
else:
# Maybe nothing?
return False
WriteMakefile(output_file, data, build_file, depth, self.relative_topsrcdir,
# we set srcdir up one directory, since the subdir
# doesn't actually exist in the source directory
swapslashes(os.path.join(self.relative_topsrcdir, self.relative_srcdir, os.path.split(rel_path)[0])),
self.relative_srcdir)
return True
def GenerateOutput(target_list, target_dicts, data, params):
options = params['options']
flavor = GetFlavor(params)
generator_flags = params.get('generator_flags', {})
# Get a few directories into Mozilla-common naming conventions
# The root of the source repository.
topsrcdir = os.path.abspath(options.toplevel_dir)
# The object directory (root of the build).
objdir = os.path.abspath(generator_flags['OBJDIR'] if 'OBJDIR' in generator_flags else '.')
# A relative path from the objdir to the topsrcdir
relative_topsrcdir = gyp.common.RelativePath(topsrcdir, objdir)
# The directory containing the gyp file on which gyp was invoked.
gyp_file_dir = os.path.abspath(os.path.dirname(params['build_files'][0]) or '.')
# The relative path from topsrcdir to gyp_file_dir
relative_srcdir = gyp.common.RelativePath(gyp_file_dir, topsrcdir)
# The relative path from objdir to gyp_file_dir
srcdir = gyp.common.RelativePath(gyp_file_dir, objdir)
# The path to get up to the root of the objdir from the output dir.
depth = getdepth(relative_srcdir)
# The output directory.
output_dir = os.path.abspath(options.generator_output or '.')
# The path to the root Makefile
makefile_path = os.path.join(output_dir, "Makefile")
def topsrcdir_path(path):
return "$(topsrcdir)/" + swapslashes(gyp.common.RelativePath(path, topsrcdir))
def objdir_path(path):
return "$(DEPTH)/" + swapslashes(gyp.common.RelativePath(path, objdir))
# Find the list of targets that derive from the gyp file(s) being built.
needed_targets = set()
build_files = set()
for build_file in params['build_files']:
build_file = os.path.normpath(build_file)
for target in gyp.common.AllTargets(target_list, target_dicts, build_file):
needed_targets.add(target)
build_file_, _, _ = gyp.common.ParseQualifiedTarget(target)
build_files.add(topsrcdir_path(build_file_))
generator = MakefileGenerator(target_dicts, data, options, depth, topsrcdir, relative_topsrcdir, relative_srcdir, output_dir)
generator.ProcessTargets(needed_targets)
# Write the top-level makefile, which simply calls the other makefiles
topdata = {'DIRS': generator.dirs}
if generator.parallel_dirs:
topdata['PARALLEL_DIRS'] = generator.parallel_dirs
WriteMakefile(makefile_path, topdata, params['build_files'][0],
depth,
swapslashes(relative_topsrcdir),
swapslashes(srcdir),
swapslashes(relative_srcdir))
scriptname = topsrcdir_path(__file__)
# Reassemble a commandline from parts so that all the paths are correct
commandline = [topsrcdir_path(sys.argv[0]),
"--format=mozmake",
"--depth=%s" % topsrcdir_path(options.depth),
"--generator-output=%s" % objdir_path(options.generator_output),
"--toplevel-dir=$(topsrcdir)",
#XXX: handle other generator_flags gracefully?
"-G OBJDIR=$(DEPTH)"] + \
['-D%s' % d for d in options.defines] + \
[topsrcdir_path(b) for b in params['build_files']]
WriteCommonMk(os.path.join(output_dir, "common.mk"),
build_files,
scriptname,
commandline)

View File

@ -130,12 +130,17 @@ typedef char XML_LChar;
/* xmltok.h */
#define XmlParseXmlDecl MOZ_XmlParseXmlDecl
#define XmlParseXmlDeclNS MOZ_XmlParseXmlDeclNS
#define XmlInitEncoding MOZ_XmlInitEncoding
#define XmlInitEncodingNS MOZ_XmlInitEncodingNS
#define XmlGetUtf8InternalEncoding MOZ_XmlGetUtf8InternalEncoding
#define XmlGetUtf16InternalEncoding MOZ_XmlGetUtf16InternalEncoding
#define XmlGetUtf8InternalEncodingNS MOZ_XmlGetUtf8InternalEncodingNS
#define XmlGetUtf16InternalEncodingNS MOZ_XmlGetUtf16InternalEncodingNS
#define XmlUtf8Encode MOZ_XmlUtf8Encode
#define XmlUtf16Encode MOZ_XmlUtf16Encode
#define XmlSizeOfUnknownEncoding MOZ_XmlSizeOfUnknownEncoding
#define XmlInitUnknownEncoding MOZ_XmlInitUnknownEncoding
#define XmlInitUnknownEncodingNS MOZ_XmlInitUnknownEncodingNS
#endif /* __expat_config_h__ */

View File

@ -453,7 +453,7 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
CXXFLAGS += $(TK_CFLAGS)
OS_LIBS += \
-framework SystemConfiguration \
-framework QuickTime \
-framework QTKit \
-framework IOKit \
-F/System/Library/PrivateFrameworks -framework CoreUI \
$(TK_LIBS) \
@ -470,6 +470,7 @@ OS_LIBS += \
-framework IOKit \
-framework Foundation \
-framework AppKit \
-framework Security \
$(NULL)
endif
endif

View File

@ -1615,6 +1615,12 @@ if [ "$MOZ_SYDNEYAUDIO" ]; then
"
fi
if [ "$MOZ_WEBRTC" ]; then
add_makefiles "
media/webrtc/Makefile
"
fi
if [ "$MOZ_SPEEX_RESAMPLER" ]; then
add_makefiles "
media/libspeex_resampler/Makefile

View File

@ -126,6 +126,12 @@ tier_platform_dirs += \
$(NULL)
endif
ifdef MOZ_WEBRTC
tier_platform_dirs += \
media/webrtc \
$(NULL)
endif
ifdef MOZ_SPEEX_RESAMPLER
tier_platform_dirs += \
media/libspeex_resampler \