OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 # This file is meant to be included into a target to provide a rule | 5 # This file is meant to be included into a target to provide a rule |
6 # to build Android APKs in a consistent manner. | 6 # to build Android APKs in a consistent manner. |
7 # | 7 # |
8 # To use this, create a gyp target with the following form: | 8 # To use this, create a gyp target with the following form: |
9 # { | 9 # { |
10 # 'target_name': 'my_package_apk', | 10 # 'target_name': 'my_package_apk', |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 ], | 250 ], |
251 'input_libraries': [ | 251 'input_libraries': [ |
252 '<@(native_libs_paths)', | 252 '<@(native_libs_paths)', |
253 '<@(extra_native_libs)', | 253 '<@(extra_native_libs)', |
254 '<@(linker_input_libraries)', | 254 '<@(linker_input_libraries)', |
255 ], | 255 ], |
256 }, | 256 }, |
257 'includes': ['../build/android/write_ordered_libraries.gypi'], | 257 'includes': ['../build/android/write_ordered_libraries.gypi'], |
258 }, | 258 }, |
259 { | 259 { |
260 'action_name': 'native_libraries_template_data_<(_target_name)', | |
261 'message': 'Creating native_libraries_list.h for <(_target_name)', | |
262 'inputs': [ | |
263 '<(DEPTH)/build/android/gyp/util/build_utils.py', | |
264 '<(DEPTH)/build/android/gyp/create_native_libraries_header.py', | |
265 '<(ordered_libraries_file)', | |
266 ], | |
267 'outputs': [ | |
268 '<(native_libraries_template_data_file)', | |
269 '<(native_libraries_template_version_file)', | |
270 ], | |
271 'action': [ | |
272 'python', '<(DEPTH)/build/android/gyp/create_native_libraries_header
.py', | |
273 '--ordered-libraries=<(ordered_libraries_file)', | |
274 '--version-name=<(native_lib_version_name)', | |
275 '--native-library-list=<(native_libraries_template_data_file)', | |
276 '--version-output=<(native_libraries_template_version_file)', | |
277 ], | |
278 }, | |
279 { | |
280 'action_name': 'native_libraries_<(_target_name)', | 260 'action_name': 'native_libraries_<(_target_name)', |
281 'variables': { | 261 'variables': { |
282 'conditions': [ | 262 'conditions': [ |
283 ['use_chromium_linker == 1', { | 263 ['use_chromium_linker == 1', { |
284 'variables': { | 264 'variables': { |
285 'linker_gcc_preprocess_defines': [ | 265 'linker_gcc_preprocess_defines': [ |
286 '--defines', 'ENABLE_CHROMIUM_LINKER', | 266 '--defines', 'ENABLE_CHROMIUM_LINKER', |
287 ], | 267 ], |
288 } | 268 } |
289 }, { | 269 }, { |
(...skipping 27 matching lines...) Expand all Loading... |
317 'gcc_preprocess_defines': [ | 297 'gcc_preprocess_defines': [ |
318 '<@(linker_load_from_zip_file_preprocess_defines)', | 298 '<@(linker_load_from_zip_file_preprocess_defines)', |
319 '<@(linker_gcc_preprocess_defines)', | 299 '<@(linker_gcc_preprocess_defines)', |
320 '<@(linker_tests_gcc_preprocess_defines)', | 300 '<@(linker_tests_gcc_preprocess_defines)', |
321 ], | 301 ], |
322 }, | 302 }, |
323 'message': 'Creating NativeLibraries.java for <(_target_name)', | 303 'message': 'Creating NativeLibraries.java for <(_target_name)', |
324 'inputs': [ | 304 'inputs': [ |
325 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 305 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
326 '<(DEPTH)/build/android/gyp/gcc_preprocess.py', | 306 '<(DEPTH)/build/android/gyp/gcc_preprocess.py', |
327 '<(native_libraries_template_data_file)', | 307 '<(ordered_libraries_file)', |
328 '<(native_libraries_template_version_file)', | |
329 '<(native_libraries_template)', | 308 '<(native_libraries_template)', |
330 ], | 309 ], |
331 'outputs': [ | 310 'outputs': [ |
332 '<(native_libraries_java_stamp)', | 311 '<(native_libraries_java_stamp)', |
333 ], | 312 ], |
334 'action': [ | 313 'action': [ |
335 'python', '<(DEPTH)/build/android/gyp/gcc_preprocess.py', | 314 'python', '<(DEPTH)/build/android/gyp/gcc_preprocess.py', |
336 '--include-path=<(native_libraries_template_data_dir)', | 315 '--include-path=', |
337 '--output=<(native_libraries_java_file)', | 316 '--output=<(native_libraries_java_file)', |
338 '--template=<(native_libraries_template)', | 317 '--template=<(native_libraries_template)', |
339 '--stamp=<(native_libraries_java_stamp)', | 318 '--stamp=<(native_libraries_java_stamp)', |
| 319 '--defines', 'NATIVE_LIBRARIES_LIST=@FileArg(<(ordered_libraries_fil
e):java_libraries_list)', |
| 320 '--defines', 'NATIVE_LIBRARIES_VERSION_NUMBER="<(native_lib_version_
name)"', |
340 '<@(gcc_preprocess_defines)', | 321 '<@(gcc_preprocess_defines)', |
341 ], | 322 ], |
342 }, | 323 }, |
343 { | 324 { |
344 'action_name': 'strip_native_libraries', | 325 'action_name': 'strip_native_libraries', |
345 'variables': { | 326 'variables': { |
346 'ordered_libraries_file%': '<(ordered_libraries_file)', | 327 'ordered_libraries_file%': '<(ordered_libraries_file)', |
347 'stripped_libraries_dir%': '<(stripped_libraries_dir)', | 328 'stripped_libraries_dir%': '<(stripped_libraries_dir)', |
348 'input_paths': [ | 329 'input_paths': [ |
349 '<@(native_libs_paths)', | 330 '<@(native_libs_paths)', |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 '<(apk_install_record)', | 423 '<(apk_install_record)', |
443 '<(build_device_config_path)', | 424 '<(build_device_config_path)', |
444 '<(ordered_libraries_file)', | 425 '<(ordered_libraries_file)', |
445 ], | 426 ], |
446 'outputs': [ | 427 'outputs': [ |
447 '<(link_stamp)' | 428 '<(link_stamp)' |
448 ], | 429 ], |
449 'action': [ | 430 'action': [ |
450 'python', '<(DEPTH)/build/android/gyp/create_device_library_link
s.py', | 431 'python', '<(DEPTH)/build/android/gyp/create_device_library_link
s.py', |
451 '--build-device-configuration=<(build_device_config_path)', | 432 '--build-device-configuration=<(build_device_config_path)', |
452 '--libraries-json=<(ordered_libraries_file)', | 433 '--libraries=@FileArg(<(ordered_libraries_file):libraries)', |
453 '--script-host-path=<(symlink_script_host_path)', | 434 '--script-host-path=<(symlink_script_host_path)', |
454 '--script-device-path=<(symlink_script_device_path)', | 435 '--script-device-path=<(symlink_script_device_path)', |
455 '--target-dir=<(device_library_dir)', | 436 '--target-dir=<(device_library_dir)', |
456 '--apk=<(incomplete_apk_path)', | 437 '--apk=<(incomplete_apk_path)', |
457 '--stamp=<(link_stamp)', | 438 '--stamp=<(link_stamp)', |
458 '--configuration-name=<(CONFIGURATION_NAME)', | 439 '--configuration-name=<(CONFIGURATION_NAME)', |
459 ], | 440 ], |
460 }, | 441 }, |
461 ], | 442 ], |
462 'conditions': [ | 443 'conditions': [ |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 '-DEMMA_INSTRUMENT=<(emma_instrument)', | 879 '-DEMMA_INSTRUMENT=<(emma_instrument)', |
899 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', | 880 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', |
900 | 881 |
901 '-Dbasedir=.', | 882 '-Dbasedir=.', |
902 '-buildfile', | 883 '-buildfile', |
903 '<(DEPTH)/build/android/ant/apk-package.xml', | 884 '<(DEPTH)/build/android/ant/apk-package.xml', |
904 ] | 885 ] |
905 }, | 886 }, |
906 ], | 887 ], |
907 } | 888 } |
OLD | NEW |