diff trunk/carfac/SConstruct @ 684:49af9a8d5a53

Initial translation of SAI code to C++. This only implements the simple (as opposed to the layered) SAI, as implemented in SAI_Run.m.
author ronw@google.com
date Fri, 31 May 2013 21:46:48 +0000
parents 10dc41e4d2f2
children d0612798f6de
line wrap: on
line diff
--- a/trunk/carfac/SConstruct	Wed May 29 20:33:06 2013 +0000
+++ b/trunk/carfac/SConstruct	Fri May 31 21:46:48 2013 +0000
@@ -43,22 +43,6 @@
 import commands
 import os
 
-carfac_sources = [
-    'carfac_common.cc',
-    'agc_params.h',
-    'agc_coeffs.h',
-    'agc_state.h',
-    'carfac_output.cc',
-    'car_params.h',
-    'car_coeffs.h',
-    'ihc_params.h',
-    'car_state.h',
-    'ihc_coeffs.h',
-    'ihc_state.h',
-    'ear.cc',
-    'carfac.cc'
-    ]
-
 env = Environment(CPPPATH=[os.environ['EIGEN_PATH']])
 GCC_VERSION = commands.getoutput(env['CXX'] + ' -dumpversion')
 if GCC_VERSION.startswith('4.6'):
@@ -66,6 +50,22 @@
 else:
   env.MergeFlags(['-std=c++11'])
 
+carfac_sources = [
+    'agc_coeffs.h',
+    'agc_params.h',
+    'agc_state.h',
+    'car_coeffs.h',
+    'carfac.cc',
+    'carfac_common.cc',
+    'carfac_output.cc',
+    'car_params.h',
+    'car_state.h',
+    'ear.cc',
+    'ihc_coeffs.h',
+    'ihc_params.h',
+    'ihc_state.h',
+    'sai.cc',
+    ]
 env.Library(target = 'carfac', source = carfac_sources)
 
 env.Command('tmp/libgtest.a', [],
@@ -75,8 +75,12 @@
                 'cd tmp && cmake . && make',
             ])
 
-test_program = env.Program(target = 'carfac_test',
-                           source = ['carfac_test.cc'],
+test_sources = [
+    'carfac_test.cc',
+    'sai_test.cc',
+    ]
+test_program = env.Program(target = 'test',
+                           source = test_sources,
                            LIBS = ['carfac', 'gtest', 'gtest_main', 'pthread'],
                            LIBPATH = ['.', 'tmp'])
 test_alias = Alias('test', [test_program], test_program[0].abspath)