[xiph-commits] r16034 - branches/theora-thusnelda

giles at svn.xiph.org giles at svn.xiph.org
Tue May 26 11:29:05 PDT 2009


Author: giles
Date: 2009-05-26 11:29:05 -0700 (Tue, 26 May 2009)
New Revision: 16034

Modified:
   branches/theora-thusnelda/SConstruct
Log:
Update the scons build for recent source file changes.

Revert to separate checks for x86 and x86_64 hosts, since the asm
is no longer unified. Update the source file lists to make lib/Makefile.am.

Note that the scons build doesn't apply any symbol export control.
This prevents building on MacOS X (again) where we have our choice
of not linking libtheoraenc to libtheoradec, and getting unresolved
symbols, or linking them and getting duplicate symbols.

Modified: branches/theora-thusnelda/SConstruct
===================================================================
--- branches/theora-thusnelda/SConstruct	2009-05-26 18:29:00 UTC (rev 16033)
+++ branches/theora-thusnelda/SConstruct	2009-05-26 18:29:05 UTC (rev 16034)
@@ -6,22 +6,23 @@
 def path(prefix, list): return [join(prefix, x) for x in list]
 
 encoder_sources = """
-        enc/dct_encode.c
-        enc/encode.c
-        enc/encoder_huffman.c
-        enc/encoder_idct.c
-        enc/encoder_toplevel.c
-        enc/encoder_quant.c
+	dec/fragment.c
+	dec/idct.c
+	dec/internal.c
+	enc/dct.c
+	enc/dct_decode.c
+	enc/dct_encode.c
+	enc/encfrag.c
 	enc/encapiwrapper.c
-        enc/dct.c
-        enc/dct_decode.c
-        enc/frarray.c
-        enc/frinit.c
+	enc/encode.c
+	enc/encoder_toplevel.c
+	enc/encoder_quant.c 
+	enc/frarray.c
+	enc/frinit.c
+	enc/huffenc.c
 	enc/mathops.c
-        enc/mcenc.c
+	enc/mcenc.c
 	enc/mode.c
-        enc/reconstruct.c
-        enc/dsp.c
 """
 
 decoder_sources = """
@@ -64,25 +65,40 @@
   return ret
 
 # check for appropriate inline asm support
-host_x86_test = """
+host_x86_32_test = """
     int main(int argc, char **argv) {
-#if !defined(__i386__) && !defined(__x86_64__)
-  #error not an x86 host: neither __i386__ nor __x86_64__ defined
+#if !defined(__i386__)
+  #error not an x86 host: preprocessor macro __i386__ not defined
 #endif
   return 0;
     }
     """
-def CheckHost_x86(context):
+def CheckHost_x86_32(context):
   context.Message('Checking for an x86 host...')
-  result = context.TryCompile(host_x86_test, '.c')
+  result = context.TryCompile(host_x86_32_test, '.c')
   context.Result(result)
   return result
 
+host_x86_64_test = """
+    int main(int argc, char **argv) {
+#if !defined(__x86_64__)
+  #error not an x86_64 host: preprocessor macro __x86_64__ not defined
+#endif
+  return 0;
+    }
+    """
+def CheckHost_x86_64(context):
+  context.Message('Checking for an x86_64 host...')
+  result = context.TryCompile(host_x86_64_test, '.c')
+  context.Result(result)
+  return result
+
 conf = Configure(env, custom_tests = {
   'CheckPKGConfig' : CheckPKGConfig,
   'CheckPKG' : CheckPKG,
   'CheckSDL' : CheckSDL,
-  'CheckHost_x86' : CheckHost_x86,
+  'CheckHost_x86_32' : CheckHost_x86_32,
+  'CheckHost_x86_64' : CheckHost_x86_64,
   })
   
 if not conf.CheckPKGConfig('0.15.0'): 
@@ -109,7 +125,7 @@
 if build_player_example and not conf.CheckSDL():
   build_player_example=False
 
-if conf.CheckHost_x86():
+if conf.CheckHost_x86_32():
   env.Append(CPPDEFINES='USE_ASM')
   decoder_sources += """
         dec/x86/mmxidct.c
@@ -118,13 +134,31 @@
         dec/x86/x86state.c
   """
   encoder_sources += """
-	enc/x86/dct_decode_mmx.c
-	enc/x86/dsp_mmx.c
-	enc/x86/dsp_mmxext.c
-	enc/x86/recon_mmx.c
-	enc/x86/idct_mmx.c
-	enc/x86/fdct_mmx.c
+	enc/x86/mmxenc.c
+	enc/x86/mmxencfrag.c
+	enc/x86/mmxfdct.c
+	enc/x86/x86enc.c
+	dec/x86/mmxfrag.c
+	dec/x86/mmxidct.c
   """
+elif conf.CheckHost_x86_64():
+  env.Append(CPPDEFINES='USE_ASM')
+  decoder_sources += """
+        dec/x86/mmxidct.c
+        dec/x86/mmxfrag.c
+        dec/x86/mmxstate.c
+        dec/x86/x86state.c
+  """
+  encoder_sources += """
+	enc/x86/mmxenc.c
+	enc/x86/mmxencfrag.c
+	enc/x86/mmxfdct.c
+	enc/x86/x86enc.c
+	enc/x86/sse2fdct.c
+	dec/x86/mmxfrag.c
+	dec/x86/mmxidct.c
+  """
+
 env = conf.Finish()
 
 env.Append(CPPPATH=['include'])



More information about the commits mailing list