Bug 930256 - Consolidate theora build files. r=derf,ted
authorRalph Giles <giles@mozilla.com>
Tue, 18 Nov 2014 09:58:00 -0800
changeset 216319 59107651d86d9f52c09aecd4c9b0e6381ca5119a
parent 216318 ebb36c4fc37f138d606b50b5beec3fb521e51cd4
child 216320 60c65a7eb0e88d105b7a103855b782ad69989f2c
push id27845
push userkwierso@gmail.com
push dateWed, 19 Nov 2014 02:08:01 +0000
treeherdermozilla-central@64e7a6391916 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersderf, ted
bugs930256
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 930256 - Consolidate theora build files. r=derf,ted Less recursion is faster and easier to edit, despite having to prefix filenames. Stop exporting theora.h. We prefer new code use the 1.0 api.
media/libtheora/Makefile.in
media/libtheora/include/moz.build
media/libtheora/include/theora/moz.build
media/libtheora/lib/Makefile.in
media/libtheora/lib/moz.build
media/libtheora/moz.build
new file mode 100644
--- /dev/null
+++ b/media/libtheora/Makefile.in
@@ -0,0 +1,28 @@
+# 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/.
+
+
+ifdef GNU_AS
+ifeq ($(CPU_ARCH),arm)
+
+# These flags are a lie; they're just used to enable the requisite
+# opcodes; actual arch detection is done at runtime.
+ASFLAGS = -march=armv7-a -mfpu=neon
+
+armfrag-gnu.$(ASM_SUFFIX): armopts-gnu.S
+armidct-gnu.$(ASM_SUFFIX): armopts-gnu.S
+armloop-gnu.$(ASM_SUFFIX): armopts-gnu.S
+
+# armopts needs a specific rule, because arm2gnu.pl will always add the .S
+# suffix when translating the files that include it.
+armopts-gnu.S: lib/arm/armopts.s
+	$(PERL) $(srcdir)/lib/arm/arm2gnu.pl < $< > $@
+# For all others, we can use an implicit rule with the configured $(ASM_SUFFIX).
+%-gnu.$(ASM_SUFFIX): lib/arm/%.s
+	$(PERL) $(srcdir)/lib/arm/arm2gnu.pl < $< > $@
+
+endif
+endif
+
+include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/media/libtheora/include/moz.build
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- 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/.
-
-DIRS += ['theora']
-
deleted file mode 100644
--- a/media/libtheora/include/theora/moz.build
+++ /dev/null
@@ -1,13 +0,0 @@
-# -*- 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/.
-
-EXPORTS.theora += [
-    'codec.h',
-    'theora.h',
-    'theoradec.h',
-    'theoraenc.h',
-]
-
deleted file mode 100644
--- a/media/libtheora/lib/Makefile.in
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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/.
-
-
-ifdef GNU_AS
-ifeq ($(CPU_ARCH),arm)
-
-# These flags are a lie; they're just used to enable the requisite
-# opcodes; actual arch detection is done at runtime.
-ASFLAGS = -march=armv7-a -mfpu=neon
-
-armfrag-gnu.$(ASM_SUFFIX): armopts-gnu.S
-armidct-gnu.$(ASM_SUFFIX): armopts-gnu.S
-armloop-gnu.$(ASM_SUFFIX): armopts-gnu.S
-
-# armopts needs a specific rule, because arm2gnu.pl will always add the .S
-# suffix when translating the files that include it.
-armopts-gnu.S: arm/armopts.s
-	$(PERL) $(srcdir)/arm/arm2gnu.pl < $< > $@
-# For all others, we can use an implicit rule with the configured $(ASM_SUFFIX).
-%-gnu.$(ASM_SUFFIX): arm/%.s
-	$(PERL) $(srcdir)/arm/arm2gnu.pl < $< > $@
-
-endif
-endif
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/media/libtheora/lib/moz.build
+++ /dev/null
@@ -1,84 +0,0 @@
-# -*- 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/.
-
-UNIFIED_SOURCES += [
-    'apiwrapper.c',
-    'bitpack.c',
-    'decapiwrapper.c',
-    'decinfo.c',
-    'decode.c',
-    'dequant.c',
-    'fragment.c',
-    'huffdec.c',
-    'idct.c',
-    'info.c',
-    'internal.c',
-    'quant.c',
-    'state.c',
-]
-
-if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_AS']:
-    GENERATED_SOURCES += [ '%s.%s' % (f, CONFIG['ASM_SUFFIX']) for f in [
-        'armbits-gnu',
-        'armfrag-gnu',
-        'armidct-gnu',
-        'armloop-gnu',
-    ]]
-
-if '86' in CONFIG['OS_TEST']:
-    if CONFIG['OS_ARCH'] != 'SunOS':
-        if CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['OS_TEST'] != 'x86_64':
-            DEFINES['OC_X86_ASM'] = True
-            if '64' in CONFIG['OS_TEST']:
-                DEFINES['OC_X86_64_ASM'] = True
-    if CONFIG['_MSC_VER']:
-        if '64' not in CONFIG['OS_TEST']:
-            SOURCES += [
-                'x86_vc/mmxfrag.c',
-                'x86_vc/mmxidct.c',
-                'x86_vc/mmxstate.c',
-                'x86_vc/x86cpu.c',
-                'x86_vc/x86state.c',
-            ]
-    else:
-        SOURCES += [
-            'x86/mmxfrag.c',
-            'x86/mmxidct.c',
-            'x86/mmxstate.c',
-            'x86/sse2idct.c',
-            'x86/x86cpu.c',
-            'x86/x86state.c',
-        ]
-
-if CONFIG['GNU_AS']:
-    if 'arm' in CONFIG['OS_TEST']:
-        SOURCES += [
-            'arm/armcpu.c',
-            'arm/armstate.c',
-        ]
-        for var in ('OC_ARM_ASM', 'OC_ARM_ASM_EDSP', 'OC_ARM_ASM_MEDIA',
-                    'OC_ARM_ASM_NEON'):
-            DEFINES[var] = True
-        # The Android NDK doesn't pre-define anything to indicate the OS it's
-        # on, so do it for them.
-        if CONFIG['OS_TARGET'] == 'Android':
-            DEFINES['__linux__'] = True
-
-MSVC_ENABLE_PGO = True
-
-if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
-    NO_VISIBILITY_FLAGS = True
-
-FINAL_LIBRARY = 'gkmedias'
-
-# The encoder is currently not included.
-DEFINES['THEORA_DISABLE_ENCODE'] = True
-
-# Suppress warnings in third-party code.
-if CONFIG['GNU_CC']:
-    CFLAGS += ['-Wno-type-limits']
-    if CONFIG['CLANG_CXX']:
-        CFLAGS += ['-Wno-tautological-compare']
--- a/media/libtheora/moz.build
+++ b/media/libtheora/moz.build
@@ -1,8 +1,95 @@
 # -*- 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/.
 
-DIRS += ['include', 'lib']
+EXPORTS.theora += [
+    'include/theora/codec.h',
+    'include/theora/theoradec.h',
+    'include/theora/theoraenc.h',
+]
+
+MSVC_ENABLE_PGO = True
+
+FINAL_LIBRARY = 'gkmedias'
+
+if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
+    NO_VISIBILITY_FLAGS = True
+
+# The encoder is currently not included.
+DEFINES['THEORA_DISABLE_ENCODE'] = True
+
+# Suppress warnings in third-party code.
+if CONFIG['GNU_CC']:
+    CFLAGS += ['-Wno-type-limits']
+    if CONFIG['CLANG_CXX']:
+        CFLAGS += ['-Wno-tautological-compare']
+
+UNIFIED_SOURCES += [
+    'lib/apiwrapper.c',
+    'lib/bitpack.c',
+    'lib/decapiwrapper.c',
+    'lib/decinfo.c',
+    'lib/decode.c',
+    'lib/dequant.c',
+    'lib/fragment.c',
+    'lib/huffdec.c',
+    'lib/idct.c',
+    'lib/info.c',
+    'lib/internal.c',
+    'lib/quant.c',
+    'lib/state.c',
+]
+
+LOCAL_INCLUDES += ['include']
 
+if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_AS']:
+    GENERATED_SOURCES += [ '%s.%s' % (f, CONFIG['ASM_SUFFIX']) for f in [
+        'armbits-gnu',
+        'armfrag-gnu',
+        'armidct-gnu',
+        'armloop-gnu',
+    ]]
+
+if '86' in CONFIG['OS_TEST']:
+    if CONFIG['OS_ARCH'] != 'SunOS':
+        if CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['OS_TEST'] != 'x86_64':
+            DEFINES['OC_X86_ASM'] = True
+            if '64' in CONFIG['OS_TEST']:
+                DEFINES['OC_X86_64_ASM'] = True
+    if CONFIG['_MSC_VER']:
+        if '64' not in CONFIG['OS_TEST']:
+            SOURCES += [
+                'lib/x86_vc/mmxfrag.c',
+                'lib/x86_vc/mmxidct.c',
+                'lib/x86_vc/mmxstate.c',
+                'lib/x86_vc/x86cpu.c',
+                'lib/x86_vc/x86state.c',
+            ]
+    else:
+        SOURCES += [
+            'lib/x86/mmxfrag.c',
+            'lib/x86/mmxidct.c',
+            'lib/x86/mmxstate.c',
+            'lib/x86/sse2idct.c',
+            'lib/x86/x86cpu.c',
+            'lib/x86/x86state.c',
+        ]
+
+if CONFIG['GNU_AS']:
+    if 'arm' in CONFIG['OS_TEST']:
+        SOURCES += [
+            'lib/arm/armcpu.c',
+            'lib/arm/armstate.c',
+        ]
+        for var in ('OC_ARM_ASM',
+                    'OC_ARM_ASM_EDSP',
+                    'OC_ARM_ASM_MEDIA',
+                    'OC_ARM_ASM_NEON'):
+            DEFINES[var] = True
+        # The Android NDK doesn't pre-define anything to indicate the OS it's
+        # on, so do it for them.
+        if CONFIG['OS_TARGET'] == 'Android':
+            DEFINES['__linux__'] = True
+