зеркало из https://github.com/mozilla/gecko-dev.git
134 строки
4.6 KiB
Python
134 строки
4.6 KiB
Python
# /*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
|
# vim: set filetype=python:
|
|
# 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/.
|
|
|
|
DEFINES['ANDROID_SMP'] = 0
|
|
DEFINES['LOG_NDEBUG'] = 0
|
|
|
|
if CONFIG['OS_TARGET'] != 'WINNT':
|
|
DEFINES['_GLIBCXX_OS_DEFINES'] = True
|
|
|
|
if CONFIG['OS_TARGET'] == 'WINNT':
|
|
if CONFIG['_MSC_VER']:
|
|
DEFINES['ssize_t'] = 'intptr_t'
|
|
DEFINES['off64_t'] = 'int64_t'
|
|
DEFINES['strcasecmp'] = 'stricmp'
|
|
DEFINES['strncasecmp'] = 'strnicmp'
|
|
DEFINES['HAVE_MS_C_RUNTIME'] = True
|
|
DEFINES['__PRETTY_FUNCTION__'] = '__FUNCTION__'
|
|
LOCAL_INCLUDES += [ 'ports/win32/include' ]
|
|
elif CONFIG['OS_TARGET'] == 'Darwin':
|
|
DEFINES['HAVE_SYS_UIO_H'] = True
|
|
DEFINES['off64_t'] = 'off_t'
|
|
LOCAL_INCLUDES += [ 'ports/darwin/include' ]
|
|
elif CONFIG['OS_TARGET'] in ('DragonFly', 'FreeBSD', 'OpenBSD', 'NetBSD'):
|
|
if not CONFIG['OS_TARGET'] == 'NetBSD':
|
|
DEFINES['ENODATA'] = '-0x80000003'
|
|
if CONFIG['OS_TARGET'] == 'OpenBSD':
|
|
DEFINES['EBADMSG'] = '-0x80000006'
|
|
DEFINES['HAVE_SYS_UIO_H'] = True
|
|
DEFINES['off64_t'] = 'off_t'
|
|
LOCAL_INCLUDES += [ 'ports/bsd/include' ]
|
|
else:
|
|
DEFINES['HAVE_SYS_UIO_H'] = True
|
|
|
|
if CONFIG['OS_TARGET'] != 'Android':
|
|
DEFINES['FAKE_LOG_DEVICE'] = True
|
|
SOURCES += [
|
|
'system/core/liblog/fake_log_device.c',
|
|
]
|
|
UNIFIED_SOURCES += [
|
|
'system/core/libcutils/strdup16to8.c',
|
|
'system/core/liblog/logd_write.c',
|
|
'system/core/liblog/logprint.c',
|
|
]
|
|
|
|
EXPORTS.mp4_demuxer += [
|
|
'binding/include/mp4_demuxer/AnnexB.h',
|
|
'binding/include/mp4_demuxer/DecoderData.h',
|
|
'binding/include/mp4_demuxer/Interval.h',
|
|
'binding/include/mp4_demuxer/mp4_demuxer.h',
|
|
]
|
|
|
|
SOURCES += [
|
|
'frameworks/av/media/libstagefright/foundation/hexdump.cpp',
|
|
'frameworks/av/media/libstagefright/MetaData.cpp',
|
|
'system/core/libutils/RefBase.cpp',
|
|
'system/core/libutils/String16.cpp',
|
|
'system/core/libutils/String8.cpp',
|
|
'system/core/libutils/VectorImpl.cpp',
|
|
]
|
|
|
|
UNIFIED_SOURCES += [
|
|
'binding/Adts.cpp',
|
|
'binding/AnnexB.cpp',
|
|
'binding/DecoderData.cpp',
|
|
'binding/Index.cpp',
|
|
'binding/mp4_demuxer.cpp',
|
|
'frameworks/av/media/libstagefright/DataSource.cpp',
|
|
'frameworks/av/media/libstagefright/ESDS.cpp',
|
|
'frameworks/av/media/libstagefright/foundation/AAtomizer.cpp',
|
|
'frameworks/av/media/libstagefright/foundation/ABitReader.cpp',
|
|
'frameworks/av/media/libstagefright/foundation/ABuffer.cpp',
|
|
'frameworks/av/media/libstagefright/foundation/AString.cpp',
|
|
'frameworks/av/media/libstagefright/id3/ID3.cpp',
|
|
'frameworks/av/media/libstagefright/MediaBuffer.cpp',
|
|
'frameworks/av/media/libstagefright/MediaDefs.cpp',
|
|
'frameworks/av/media/libstagefright/MediaSource.cpp',
|
|
'frameworks/av/media/libstagefright/MPEG4Extractor.cpp',
|
|
'frameworks/av/media/libstagefright/SampleIterator.cpp',
|
|
'frameworks/av/media/libstagefright/SampleTable.cpp',
|
|
'frameworks/av/media/libstagefright/Utils.cpp',
|
|
'system/core/libutils/SharedBuffer.cpp',
|
|
'system/core/libutils/Static.cpp',
|
|
'system/core/libutils/Unicode.cpp',
|
|
]
|
|
|
|
LOCAL_INCLUDES += [
|
|
'binding/include',
|
|
'frameworks/av/include',
|
|
'frameworks/av/include/media/stagefright/foundation',
|
|
'frameworks/av/media/libstagefright/',
|
|
'stubs/empty',
|
|
'stubs/include',
|
|
'stubs/include/media/stagefright/foundation',
|
|
'system/core/include',
|
|
]
|
|
|
|
FINAL_LIBRARY = 'xul'
|
|
|
|
# Suppress warnings in third-party code.
|
|
if CONFIG['_MSC_VER']:
|
|
CFLAGS += [
|
|
'-wd4013', # 'function' undefined; assuming extern returning int
|
|
'-wd4101', # unreferenced local variable
|
|
]
|
|
CXXFLAGS += [
|
|
'-wd4018', # '<' : signed/unsigned mismatch
|
|
'-wd4275', # non dll-interface class used as base for dll-interface class
|
|
'-wd4305', # '=' : truncation from 'double' to 'float'
|
|
'-wd4309', # '=' : truncation of constant value
|
|
'-wd4355', # 'this' : used in base member initializer list
|
|
'-wd4804', # '>' : unsafe use of type 'bool' in operation
|
|
'-wd4099', # mismatched class/struct tags
|
|
]
|
|
elif CONFIG['GNU_CXX']:
|
|
CFLAGS += [
|
|
'-Wno-comment',
|
|
'-Wno-declaration-after-statement',
|
|
'-Wno-sign-compare'
|
|
]
|
|
CXXFLAGS += [
|
|
'-Wno-format',
|
|
'-Wno-multichar',
|
|
'-Wno-sign-compare',
|
|
'-Wno-unused',
|
|
]
|
|
if CONFIG['CLANG_CXX']:
|
|
CXXFLAGS += [
|
|
'-Wno-mismatched-tags',
|
|
'-Wno-tautological-constant-out-of-range-compare',
|
|
]
|