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

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

Issue 2051003: Initial patch from Will. (Closed) Base URL: ssh://git@chromiumos-git/chromiumos
Patch Set: Address style nits. Created 10 years, 7 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 # -*- python -*- 1 # -*- python -*-
2 2
3 # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import os 7 import os
8 8
9 env = Environment() 9 env = Environment()
10 10
11 pam_sources = env.Split("""utils.cc 11 pam_sources = env.Split("""utils.cc
12 pam_prompt_wrapper.cc
13 credentials.cc
14 username_password.cc 12 username_password.cc
15 username_password_fetcher.cc 13 username_password_fetcher.cc
16 authenticator.cc 14 credentials.cc
15 pam_prompt_wrapper.cc
17 pam_offline.cc""") 16 pam_offline.cc""")
18 17
19 test_sources = env.Split("""pam_offline_testrunner.cc 18 test_sources = env.Split("""pam_offline_testrunner.cc
20 username_password_unittest.cc 19 username_password_unittest.cc
21 pam_prompt_wrapper_unittest.cc 20 pam_prompt_wrapper_unittest.cc
22 username_password_fetcher_unittest.cc 21 username_password_fetcher_unittest.cc
23 authenticator_unittest.cc
24 pam_offline_unittest.cc 22 pam_offline_unittest.cc
25 """) 23 """)
26 24
27 env.Append( 25 env.Append(
28 CPPPATH=['..'], 26 CPPPATH=['..'],
29 CCFLAGS=['-g'], 27 CCFLAGS=['-g'],
30 LINKFLAGS=['-fPIC'], 28 LINKFLAGS=['-fPIC'],
31 LIBS=['pam', 'ssl', 'base', 'rt', 'pthread', 'chromeos'], 29 LIBS=['pam', 'ssl', 'base', 'rt', 'pthread', 'chromeos', 'crosapi'],
32 ) 30 )
31
32 env.ParseConfig('pkg-config --cflags --libs dbus-glib-1')
33
33 for key in Split('CC CXX AR RANLIB LD NM CFLAGS CCFLAGS'): 34 for key in Split('CC CXX AR RANLIB LD NM CFLAGS CCFLAGS'):
34 value = os.environ.get(key) 35 value = os.environ.get(key)
35 if value != None: 36 if value != None:
36 env[key] = Split(value) 37 env[key] = Split(value)
37 env['CCFLAGS'] += ['-fPIC', '-fno-exceptions', '-Wall'] 38 env['CCFLAGS'] += ['-fPIC', '-fno-exceptions', '-Wall']
38 39
39 # Fix issue with scons not passing some vars through the environment. 40 # Fix issue with scons not passing some vars through the environment.
40 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH SYSROOT'): 41 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH SYSROOT'):
41 if os.environ.has_key(key): 42 if os.environ.has_key(key):
42 env['ENV'][key] = os.environ[key] 43 env['ENV'][key] = os.environ[key]
43 44
44 # Enable local account only if user has specified one 45 # Enable local account only if user has specified one
45 if os.path.exists('pam_localaccount.h'): 46 if os.path.exists('pam_localaccount.h'):
46 print """ 47 print """
47 WARNING: pam local account is enabled! If you don't want this, remove 48 WARNING: pam local account is enabled! If you don't want this, remove
48 pam_localaccount.h. 49 pam_localaccount.h.
49 """ 50 """
50 env.Append(CPPDEFINES=['CHROMEOS_PAM_LOCALACCOUNT']) 51 env.Append(CPPDEFINES=['CHROMEOS_PAM_LOCALACCOUNT'])
51 52
52 env_lib = env.Clone() 53 env_lib = env.Clone()
53 env_lib.SharedLibrary('chromeos_pam_offline', pam_sources) 54 env_lib.SharedLibrary('chromeos_pam_offline', pam_sources)
54 55
55 env_test = env.Clone() 56 env_test = env.Clone()
56 env_test.Append(LIBS=['gtest']) 57 env_test.Append(LIBS=['gtest'])
57 env_test.Program('pam_offline_unittests', pam_sources + test_sources) 58 env_test.Program('pam_offline_unittests', pam_sources + test_sources)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698