OLD | NEW |
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 | 6 |
7 # Protobuffer compilation | 7 # Protobuffer compilation |
8 """ Inputs: | 8 """ Inputs: |
9 target: list of targets to compile to | 9 target: list of targets to compile to |
10 source: list of sources to compile | 10 source: list of sources to compile |
(...skipping 22 matching lines...) Expand all Loading... |
33 '/usr/bin/protoc ' | 33 '/usr/bin/protoc ' |
34 ' --proto_path . ${SOURCES} --cpp_out .'] | 34 ' --proto_path . ${SOURCES} --cpp_out .'] |
35 return commands | 35 return commands |
36 | 36 |
37 proto_builder = Builder(generator = ProtocolBufferGenerator, | 37 proto_builder = Builder(generator = ProtocolBufferGenerator, |
38 emitter = ProtocolBufferEmitter, | 38 emitter = ProtocolBufferEmitter, |
39 single_source = 1, | 39 single_source = 1, |
40 suffix = '.pb.cc') | 40 suffix = '.pb.cc') |
41 | 41 |
42 env = Environment() | 42 env = Environment() |
| 43 for key in Split('CC CXX AR RANLIB LD NM'): |
| 44 value = os.environ.get(key) |
| 45 if value != None: |
| 46 env[key] = value |
| 47 for key in Split('CFLAGS CCFLAGS CPPPATH LIBPATH'): |
| 48 value = os.environ.get(key) |
| 49 if value != None: |
| 50 env[key] = Split(value) |
| 51 |
| 52 for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH SYSROOT'): |
| 53 if os.environ.has_key(key): |
| 54 env['ENV'][key] = os.environ[key] |
| 55 |
| 56 |
43 env['CCFLAGS'] = ' '.join("""-g | 57 env['CCFLAGS'] = ' '.join("""-g |
44 -fno-exceptions | 58 -fno-exceptions |
| 59 -fno-strict-aliasing |
45 -Wall | 60 -Wall |
46 -Werror | 61 -Werror |
47 -Wclobbered | 62 -Wclobbered |
48 -Wempty-body | 63 -Wempty-body |
49 -Wignored-qualifiers | 64 -Wignored-qualifiers |
50 -Wmissing-field-initializers | 65 -Wmissing-field-initializers |
51 -Wsign-compare | 66 -Wsign-compare |
52 -Wtype-limits | 67 -Wtype-limits |
53 -Wuninitialized | 68 -Wuninitialized |
| 69 -D__STDC_FORMAT_MACROS=1 |
54 -D_FILE_OFFSET_BITS=64 | 70 -D_FILE_OFFSET_BITS=64 |
55 -I/usr/include/libxml2""".split()); | 71 -I/usr/include/libxml2""".split()); |
| 72 env['CCFLAGS'] += (' ' + ' '.join(env['CFLAGS'])) |
56 | 73 |
57 env['LIBS'] = Split("""base | 74 env['LIBS'] = Split("""base |
| 75 bz2 |
58 curl | 76 curl |
59 gflags | 77 gflags |
60 glib-2.0 | 78 glib-2.0 |
61 gtest | 79 gtest |
62 gthread-2.0 | 80 gthread-2.0 |
63 libpcrecpp | 81 libpcrecpp |
64 protobuf | 82 protobuf |
65 pthread | 83 pthread |
66 ssl | 84 ssl |
67 xml2 | 85 xml2 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 action_pipe_unittest.cc | 134 action_pipe_unittest.cc |
117 action_processor_unittest.cc | 135 action_processor_unittest.cc |
118 bzip_extent_writer_unittest.cc | 136 bzip_extent_writer_unittest.cc |
119 cycle_breaker_unittest.cc | 137 cycle_breaker_unittest.cc |
120 decompressing_file_writer_unittest.cc | 138 decompressing_file_writer_unittest.cc |
121 delta_diff_generator_unittest.cc | 139 delta_diff_generator_unittest.cc |
122 download_action_unittest.cc | 140 download_action_unittest.cc |
123 extent_mapper_unittest.cc | 141 extent_mapper_unittest.cc |
124 extent_writer_unittest.cc | 142 extent_writer_unittest.cc |
125 file_writer_unittest.cc | 143 file_writer_unittest.cc |
126 filesystem_copier_action_unittest.cc | |
127 filesystem_iterator_unittest.cc | 144 filesystem_iterator_unittest.cc |
128 graph_utils_unittest.cc | 145 graph_utils_unittest.cc |
129 http_fetcher_unittest.cc | 146 http_fetcher_unittest.cc |
130 mock_http_fetcher.cc | 147 mock_http_fetcher.cc |
131 omaha_hash_calculator_unittest.cc | 148 omaha_hash_calculator_unittest.cc |
132 omaha_request_prep_action_unittest.cc | 149 omaha_request_prep_action_unittest.cc |
133 omaha_response_handler_action_unittest.cc | 150 omaha_response_handler_action_unittest.cc |
134 postinstall_runner_action_unittest.cc | 151 postinstall_runner_action_unittest.cc |
135 set_bootable_flag_action_unittest.cc | 152 set_bootable_flag_action_unittest.cc |
136 subprocess_unittest.cc | 153 subprocess_unittest.cc |
(...skipping 20 matching lines...) Expand all Loading... |
157 unittest_sources + test_installer_main) | 174 unittest_sources + test_installer_main) |
158 | 175 |
159 Clean(unittest_cmd, Glob('*.gcda') + Glob('*.gcno') + Glob('*.gcov') + | 176 Clean(unittest_cmd, Glob('*.gcda') + Glob('*.gcno') + Glob('*.gcov') + |
160 Split('html app.info')) | 177 Split('html app.info')) |
161 | 178 |
162 delta_generator_cmd = env.Program('delta_generator', | 179 delta_generator_cmd = env.Program('delta_generator', |
163 sources + delta_generator_sources + | 180 sources + delta_generator_sources + |
164 delta_generator_main) | 181 delta_generator_main) |
165 | 182 |
166 http_server_cmd = env.Program('test_http_server', 'test_http_server.cc') | 183 http_server_cmd = env.Program('test_http_server', 'test_http_server.cc') |
OLD | NEW |