OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import os |
| 6 import sys |
| 7 |
| 8 env = Environment() |
| 9 |
| 10 # setup sources |
| 11 lib_sources = env.Split("""crypto.cc |
| 12 secure_blob.cc |
| 13 tpm.cc |
| 14 tpm_init.cc |
| 15 """) |
| 16 client_sources = env.Split("""main.cc |
| 17 """) + lib_sources |
| 18 |
| 19 env.Append( |
| 20 CPPPATH=['.', '..'], |
| 21 CPPFLAGS=['-pie', '-fstack-protector-all', '-fPIC', |
| 22 '-fno-exceptions', '-O2', '-Wall', '-Werror'], |
| 23 LIBS = ['base', 'chromeos', 'crypto', 'rt', 'pthread', 'tspi'], |
| 24 ) |
| 25 for key in Split('CC CXX AR RANLIB LD NM CFLAGS CCFLAGS'): |
| 26 value = os.environ.get(key) |
| 27 if value != None: |
| 28 env[key] = value |
| 29 |
| 30 # Fix issue with scons not passing some vars through the environment. |
| 31 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH SYSROOT'): |
| 32 if os.environ.has_key(key): |
| 33 env['ENV'][key] = os.environ[key] |
| 34 |
| 35 env.Append(LIBPATH = ['.']) |
| 36 |
| 37 env_lib = env.Clone() |
| 38 env_lib.Library('tpm_init', lib_sources) |
| 39 |
OLD | NEW |