OLD | NEW |
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2008 The Chromium 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('env', 'env_test') | 5 Import('env', 'env_test') |
6 | 6 |
7 env = env.Clone() | 7 env = env.Clone() |
8 | 8 |
9 env.Prepend( | 9 env.Prepend( |
10 CPPPATH = [ | 10 CPPPATH = [ |
11 '$CHROME_DIR/app/resources', | 11 '$CHROME_DIR/app/resources', |
12 '#/tools/build/win', | 12 '#/tools/build/win', |
13 '#/..', | 13 '#/..', |
14 ], | 14 ], |
15 CPPDEFINES = [ | 15 CPPDEFINES = [ |
16 'U_STATIC_IMPLEMENTATION', | 16 'U_STATIC_IMPLEMENTATION', |
17 ], | 17 ], |
18 CCFLAGS = [ | |
19 '/TP', | |
20 ], | |
21 ) | 18 ) |
22 | 19 |
| 20 if env['PLATFORM'] == 'win32': |
| 21 env.Prepend( |
| 22 CCFLAGS = [ |
| 23 '/TP', |
| 24 ], |
| 25 ) |
| 26 |
23 env.Append( | 27 env.Append( |
24 CPPPATH = [ | 28 CPPPATH = [ |
25 'third_party/wtl/include', | 29 'third_party/wtl/include', |
26 '$NPAPI_DIR', | 30 '$NPAPI_DIR', |
27 '$LIBXML_DIR/scons/include', | 31 '$LIBXML_DIR/scons/include', |
28 '$LIBXML_DIR/include', | 32 '$LIBXML_DIR/include', |
29 | 33 |
30 'app', | 34 'app', |
31 '$WEBKIT_DIR/build/localized_strings', | 35 '$WEBKIT_DIR/build/localized_strings', |
32 | 36 |
33 '$SKIA_DIR/include', | 37 '$SKIA_DIR/include', |
34 '$SKIA_DIR/include/corecg', | 38 '$SKIA_DIR/include/corecg', |
35 '$SKIA_DIR/platform', | 39 '$SKIA_DIR/platform', |
36 '$LIBPNG_DIR', | 40 '$LIBPNG_DIR', |
37 '$ZLIB_DIR', | 41 '$ZLIB_DIR', |
38 '$BREAKPAD_DIR/src', | 42 '$BREAKPAD_DIR/src', |
39 '$LIBJPEG_DIR', | 43 '$LIBJPEG_DIR', |
40 '$ICU38_DIR/public/common', | 44 '$ICU38_DIR/public/common', |
41 '$ICU38_DIR/public/i18n', | 45 '$ICU38_DIR/public/i18n', |
42 ], | 46 ], |
43 ) | 47 ) |
44 | 48 |
45 input_files = [ | 49 input_files = [] |
46 'animation.cc', | |
47 'child_process.cc', | |
48 'chrome_constants.cc', | |
49 'chrome_counters.cc', | |
50 'chrome_paths.cc', | |
51 'chrome_plugin_lib.cc', | |
52 'chrome_plugin_util.cc', | |
53 'chrome_process_filter.cc', | |
54 'chrome_switches.cc', | |
55 'classfactory.cc', | |
56 'clipboard_service.cc', | |
57 'common_glue.cc', | |
58 'debug_flags.cc', | |
59 'drag_drop_types.cc', | |
60 'env_util.cc', | |
61 'env_vars.cc', | |
62 'gfx/chrome_canvas.cc', | |
63 'gfx/chrome_font.cc', | |
64 'gfx/color_utils.cc', | |
65 'gfx/emf.cc', | |
66 'gfx/icon_util.cc', | |
67 'gfx/path.cc', | |
68 'gfx/url_elider.cc', | |
69 'ipc_channel.cc', | |
70 'ipc_channel_proxy.cc', | |
71 'ipc_logging.cc', | |
72 'ipc_message.cc', | |
73 'ipc_message_utils.cc', | |
74 'ipc_sync_channel.cc', | |
75 'ipc_sync_message.cc', | |
76 'jpeg_codec.cc', | |
77 'json_value_serializer.cc', | |
78 'jstemplate_builder.cc', | |
79 'l10n_util.cc', | |
80 'libxml_utils.cc', | |
81 'logging_chrome.cc', | |
82 'message_router.cc', | |
83 'net/cookie_monster_sqlite.cc', | |
84 'net/url_request_intercept_job.cc', | |
85 'notification_service.cc', | |
86 'os_exchange_data.cc', | |
87 'plugin_messages.cc', | |
88 'pref_member.cc', | |
89 'pref_names.cc', | |
90 'pref_service.cc', | |
91 'process_watcher.cc', | |
92 'rand_util.cc', | |
93 'render_messages.cc', | |
94 'resource_bundle.cc', | |
95 'resource_dispatcher.cc', | |
96 'security_filter_peer.cc', | |
97 'slide_animation.cc', | |
98 'sqlite_compiled_statement.cc', | |
99 'sqlite_utils.cc', | |
100 'task_queue.cc', | |
101 'throb_animation.cc', | |
102 'thumbnail_score.cc', | |
103 'time_format.cc', | |
104 'visitedlink_common.cc', | |
105 'win_safe_util.cc', | |
106 'win_util.cc', | |
107 'worker_thread_ticker.cc', | |
108 ] | |
109 | 50 |
110 env.ChromeStaticLibrary('common', input_files) | 51 if env['PLATFORM'] in ('posix', 'win32'): |
| 52 # TODO(port): Port to Mac. |
| 53 input_files.extend([ |
| 54 'chrome_constants.cc', |
| 55 'chrome_counters.cc', |
| 56 'chrome_switches.cc', |
| 57 'debug_flags.cc', |
| 58 'env_vars.cc', |
| 59 'gfx/color_utils.cc', |
| 60 'jpeg_codec.cc', |
| 61 'json_value_serializer.cc', |
| 62 'libxml_utils.cc', |
| 63 'net/cookie_monster_sqlite.cc', |
| 64 'notification_service.cc', |
| 65 'pref_member.cc', |
| 66 'pref_names.cc', |
| 67 'slide_animation.cc', |
| 68 'sqlite_compiled_statement.cc', |
| 69 'task_queue.cc', |
| 70 'throb_animation.cc', |
| 71 'thumbnail_score.cc', |
| 72 'visitedlink_common.cc', |
| 73 ]) |
| 74 |
| 75 if env['PLATFORM'] == 'win32': |
| 76 # TODO(port): Port these. |
| 77 input_files.extend([ |
| 78 'animation.cc', |
| 79 'child_process.cc', |
| 80 'chrome_paths.cc', |
| 81 'chrome_plugin_lib.cc', |
| 82 'chrome_plugin_util.cc', |
| 83 'chrome_process_filter.cc', |
| 84 'classfactory.cc', |
| 85 'clipboard_service.cc', |
| 86 'common_glue.cc', |
| 87 'drag_drop_types.cc', |
| 88 'env_util.cc', |
| 89 'gfx/chrome_canvas.cc', |
| 90 'gfx/chrome_font.cc', |
| 91 'gfx/emf.cc', |
| 92 'gfx/icon_util.cc', |
| 93 'gfx/path.cc', |
| 94 'gfx/url_elider.cc', |
| 95 'ipc_channel.cc', |
| 96 'ipc_channel_proxy.cc', |
| 97 'ipc_logging.cc', |
| 98 'ipc_message.cc', |
| 99 'ipc_message_utils.cc', |
| 100 'ipc_sync_channel.cc', |
| 101 'ipc_sync_message.cc', |
| 102 'jstemplate_builder.cc', |
| 103 'l10n_util.cc', |
| 104 'logging_chrome.cc', |
| 105 'message_router.cc', |
| 106 'net/url_request_intercept_job.cc', |
| 107 'os_exchange_data.cc', |
| 108 'plugin_messages.cc', |
| 109 'pref_service.cc', |
| 110 'process_watcher.cc', |
| 111 'rand_util.cc', |
| 112 'render_messages.cc', |
| 113 'resource_bundle.cc', |
| 114 'resource_dispatcher.cc', |
| 115 'security_filter_peer.cc', |
| 116 'sqlite_utils.cc', |
| 117 'time_format.cc', |
| 118 'win_safe_util.cc', |
| 119 'win_util.cc', |
| 120 'worker_thread_ticker.cc', |
| 121 ]) |
| 122 |
| 123 if env['PLATFORM'] in ('posix', 'win32'): |
| 124 # TODO(port): This should be enabled for all platforms. |
| 125 env.ChromeStaticLibrary('common', input_files) |
111 | 126 |
112 | 127 |
113 env_test = env_test.Clone() | 128 env_test = env_test.Clone() |
114 | 129 |
115 env_test.Append( | 130 env_test.Append( |
116 CPPPATH = [ | 131 CPPPATH = [ |
117 '$SKIA_DIR/include', | 132 '$SKIA_DIR/include', |
118 '$SKIA_DIR/include/corecg', | 133 '$SKIA_DIR/include/corecg', |
119 '$SKIA_DIR/platform', | 134 '$SKIA_DIR/platform', |
120 '#/..', | 135 '#/..', |
121 '$GTEST_DIR/include', | 136 '$GTEST_DIR/include', |
122 ], | 137 ], |
123 LIBS = [ | 138 LIBS = [ |
124 'base', | 139 'base', |
125 'gtest', | 140 'gtest', |
126 'icuuc', | 141 'icuuc', |
127 ], | 142 ], |
128 ) | 143 ) |
129 | 144 |
130 env_test.Append( | 145 if env_test['PLATFORM'] == 'win32': |
131 LINKFLAGS = [ | 146 env_test.Append( |
132 '/INCREMENTAL', | 147 LINKFLAGS = [ |
| 148 '/INCREMENTAL', |
133 | 149 |
134 '/safeseh', | 150 '/safeseh', |
135 '/dynamicbase', | 151 '/dynamicbase', |
136 '/ignore:4199', | 152 '/ignore:4199', |
137 '/nxcompat', | 153 '/nxcompat', |
138 | 154 |
139 '/DELAYLOAD:"dwmapi.dll"', | 155 '/DELAYLOAD:"dwmapi.dll"', |
140 '/DELAYLOAD:"uxtheme.dll"', | 156 '/DELAYLOAD:"uxtheme.dll"', |
141 | 157 |
142 '/DEBUG', | 158 '/DEBUG', |
143 '/MACHINE:X86', | 159 '/MACHINE:X86', |
144 '/FIXED:No', | 160 '/FIXED:No', |
145 ], | 161 ], |
146 LIBS = [ | 162 LIBS = [ |
147 'rpcrt4.lib', | 163 'rpcrt4.lib', |
148 'shlwapi.lib', | 164 'shlwapi.lib', |
149 'winmm.lib', | 165 'winmm.lib', |
150 ], | 166 ], |
151 ) | 167 ) |
152 | 168 |
153 ipc_tests_files = [ | 169 if env_test['PLATFORM'] == 'win32': |
154 '$BASE_DIR/perftimer$OBJSUFFIX', | 170 # TODO(port): Port this. |
155 'ipc_fuzzing_tests.cc', | 171 ipc_tests_files = [ |
156 'ipc_tests.cc', | 172 '$BASE_DIR/perftimer$OBJSUFFIX', |
157 ] | 173 'ipc_fuzzing_tests.cc', |
| 174 'ipc_tests.cc', |
| 175 ] |
158 | 176 |
159 libs = [ | 177 libs = [ |
160 'common.lib', | 178 'common.lib', |
161 ] | 179 ] |
162 | 180 |
163 ipc_tests = env_test.ChromeTestProgram('ipc_tests', ipc_tests_files + libs) | 181 ipc_tests = env_test.ChromeTestProgram('ipc_tests', ipc_tests_files + libs) |
164 | 182 |
165 i = env_test.Install('$TARGET_ROOT', ipc_tests) | 183 i = env_test.Install('$TARGET_ROOT', ipc_tests) |
166 Alias('chrome', i) | 184 Alias('chrome', i) |
167 | 185 |
OLD | NEW |