blob: 6ffe69f5e46d9758b7afbb32c949ef0d95ff38dd [file] [log] [blame]
drewry@google.combd940e92009-12-07 19:13:27 +00001# -*- python -*-
2
3# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7import os
8
9env = Environment()
10
11lib_sources = env.Split("""env.cc
12 interface.cc
13 minijail.cc
14 options.cc""")
15bin_sources = env.Split("""minijail_main.cc""")
16test_sources = env.Split("""minijail_unittest.cc
17 minijail_testrunner.cc""")
18
19#test_sources = env.Split("""../base/strutil.cc""")
20
21env.Append(
22 CPPPATH=['..', '../../third_party/chrome/files', '../../common'],
23 CCFLAGS=['-g', '-fno-exceptions', '-Wall', '-Werror'],
24 LIBPATH=['../../third_party/chrome'],
25 LIBS=['cap', 'base', 'pthread', 'rt'],
26)
27
28env_lib = env.Clone()
29env_lib.SharedLibrary('minijail', lib_sources)
30
31env_bin = env.Clone()
32env_bin.Program('minijail', lib_sources + bin_sources)
33
34env_test = env.Clone()
35env_test.Append(LIBS=['gtest', 'pcrecpp'])
36env_test.Program('minijail_unittests', lib_sources + test_sources)