Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: src/platform/cryptohome/SConstruct

Issue 2051003: Initial patch from Will. (Closed) Base URL: ssh://git@chromiumos-git/chromiumos
Patch Set: Address style nits. Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import sys 6 import sys
7 7
8 env = Environment() 8 env = Environment()
9 9
10 # define generic dbus server/client bindings builders 10 # define generic dbus server/client bindings builders
11 dbus_server_builder = Builder(action = 'dbus-binding-tool --mode=glib-server --p refix=`basename $SOURCE .xml` $SOURCE > $TARGET') 11 dbus_server_builder = Builder(action = 'dbus-binding-tool --mode=glib-server --p refix=`basename $SOURCE .xml` $SOURCE > $TARGET')
12 dbus_client_builder = Builder(action = 'dbus-binding-tool --mode=glib-client --p refix=`basename $SOURCE .xml` $SOURCE > $TARGET') 12 dbus_client_builder = Builder(action = 'dbus-binding-tool --mode=glib-client --p refix=`basename $SOURCE .xml` $SOURCE > $TARGET')
13 env.Append(BUILDERS = { 'DbusServerBindings' : dbus_server_builder, 13 env.Append(BUILDERS = { 'DbusServerBindings' : dbus_server_builder,
14 'DbusClientBindings' : dbus_client_builder}) 14 'DbusClientBindings' : dbus_client_builder})
15 # setup sources 15 # setup sources
16 serverlib_sources = env.Split("""authenticator.cc 16 serverlib_sources = env.Split("""interface.cc
17 interface.cc 17 mount.cc
18 » » » » service.cc 18 secure_blob.cc
19 » » » » username_passhash.cc 19 service.cc
20 username_passkey.cc
21 vault_keyset.cc
20 """) 22 """)
21 server_sources = env.Split("""cryptohomed.cc""") 23 server_sources = env.Split("""cryptohomed.cc""")
22 example_sources = env.Split("""example_client.cc 24 client_sources = env.Split("""cryptohome.cc
25 secure_blob.cc
26 username_passkey.cc
23 """) 27 """)
24 test_sources = env.Split("""authenticator_unittest.cc 28 test_sources = env.Split("""service_unittest.cc
25 » service_unittest.cc 29 mount_unittest.cc
26 » » » username_passhash_unittest.cc 30 username_passkey_unittest.cc
27 cryptohome_testrunner.cc 31 cryptohome_testrunner.cc
28 """) 32 """)
29 33
30 34
31 35
32 env.Append( 36 env.Append(
33 CPPPATH=['.', '..'], 37 CPPPATH=['.', '..'],
34 CPPFLAGS=['-pie', '-fstack-protector-all', 38 CPPFLAGS=['-pie', '-fstack-protector-all',
35 '-fno-exceptions', '-O2', '-Wall', '-Werror'], 39 '-fno-exceptions', '-O2', '-Wall', '-Werror'],
36 LIBS = ['base', 'chromeos', 'rt', 'crypto'], 40 LIBS = ['base', 'chromeos', 'rt', 'crypto', 'ecryptfs', 'keyutils'],
37 ) 41 )
38 for key in Split('CC CXX AR RANLIB LD NM CFLAGS CCFLAGS'): 42 for key in Split('CC CXX AR RANLIB LD NM CFLAGS CCFLAGS'):
39 value = os.environ.get(key) 43 value = os.environ.get(key)
40 if value != None: 44 if value != None:
41 env[key] = value 45 env[key] = value
42 46
43 # Fix issue with scons not passing some vars through the environment. 47 # Fix issue with scons not passing some vars through the environment.
44 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH SYSROOT'): 48 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH SYSROOT'):
45 if os.environ.has_key(key): 49 if os.environ.has_key(key):
46 env['ENV'][key] = os.environ[key] 50 env['ENV'][key] = os.environ[key]
47 51
48 env.Append(LIBPATH = ['.']) 52 env.Append(LIBPATH = ['.'])
49 env.ParseConfig('pkg-config --cflags --libs gobject-2.0 dbus-1 dbus-glib-1') 53 env.ParseConfig('pkg-config --cflags --libs gobject-2.0 dbus-1 dbus-glib-1')
50 54
51 env_serverlib = env.Clone() 55 env_serverlib = env.Clone()
52 env_serverlib.DbusServerBindings('bindings/server.h', 'cryptohome.xml') 56 env_serverlib.DbusServerBindings('bindings/server.h', 'cryptohome.xml')
53 env_serverlib.SharedLibrary('cryptohome_service', serverlib_sources) 57 env_serverlib.SharedLibrary('cryptohome_service', serverlib_sources)
54 58
55 env_server = env.Clone() 59 env_server = env.Clone()
56 env_server.Append(LIBS=['cryptohome_service']) 60 env_server.Append(LIBS=['cryptohome_service'])
57 env_server.Program('cryptohomed', server_sources) 61 env_server.Program('cryptohomed', server_sources)
58 62
59 # TODO(wad) we'll probably want a separate runner for client roundtrip tests 63 # TODO(wad) we'll probably want a separate runner for client roundtrip tests
60 env_tests = env.Clone() 64 env_tests = env.Clone()
61 env_tests.Append(LIBS=['cryptohome_service', 'gtest', 'gmock']) 65 env_tests.Append(LIBS=['cryptohome_service', 'gtest', 'gmock'])
62 env_tests.Program('cryptohome_testrunner', test_sources) 66 env_tests.Program('cryptohome_testrunner', test_sources)
63 67
64 env_client = env.Clone() 68 env_client = env.Clone()
65 env_client.DbusClientBindings('bindings/client.h', 'cryptohome.xml') 69 env_client.DbusClientBindings('bindings/client.h', 'cryptohome.xml')
66 env_client.Program('example_client', example_sources) 70 env_client.Program('cryptohome', client_sources)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698