Upstream version 11.40.277.0
[platform/framework/web/crosswalk.git] / src / build / android / setup.gyp
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
3 # found in the LICENSE file.
4 {
5   'conditions': [
6     ['component == "shared_library"', {
7       'targets': [
8         {
9           # These libraries from the Android ndk are required to be packaged with
10           # any APK that is built with them. build/java_apk.gypi expects any
11           # libraries that should be packaged with the apk to be in
12           # <(SHARED_LIB_DIR)
13           'target_name': 'copy_system_libraries',
14           'type': 'none',
15           'conditions': [
16             ['target_arch=="arm" and arm_thumb==1', {
17               'copies': [
18                 {
19                   'destination': '<(SHARED_LIB_DIR)/',
20                   'files': [
21                     '<(android_stlport_libs_dir)/thumb/libstlport_shared.so',
22                   ],
23                 },
24               ],
25             }, {
26               'copies': [
27                 {
28                   'destination': '<(SHARED_LIB_DIR)/',
29                   'files': [
30                     '<(android_stlport_libs_dir)/libstlport_shared.so',
31                   ],
32                 },
33               ],
34             }],
35           ],
36         },
37       ],
38     }],
39   ],
40   'targets': [
41     {
42       'target_name': 'get_build_device_configurations',
43       'type': 'none',
44       'actions': [
45         {
46           'action_name': 'get configurations',
47           'inputs': [
48             'gyp/util/build_device.py',
49             'gyp/get_device_configuration.py',
50           ],
51           'outputs': [
52             '<(build_device_config_path)',
53             '<(build_device_config_path).fake',
54           ],
55           'action': [
56             'python', 'gyp/get_device_configuration.py',
57             '--output=<(build_device_config_path)',
58           ],
59         }
60       ],
61     },
62     {
63       # Target for creating common output build directories. Creating output
64       # dirs beforehand ensures that build scripts can assume these folders to
65       # exist and there are no race conditions resulting from build scripts
66       # trying to create these directories.
67       # The build/java.gypi target depends on this target.
68       'target_name': 'build_output_dirs',
69       'type': 'none',
70       'actions': [
71         {
72           'action_name': 'create_java_output_dirs',
73           'variables' : {
74             'output_dirs' : [
75               '<(PRODUCT_DIR)/apks',
76               '<(PRODUCT_DIR)/lib.java',
77               '<(PRODUCT_DIR)/test.lib.java',
78             ]
79           },
80           'inputs' : [],
81           # By not specifying any outputs, we ensure that this command isn't
82           # re-run when the output directories are touched (i.e. apks are
83           # written to them).
84           'outputs': [''],
85           'action': [
86             'mkdir',
87             '-p',
88             '<@(output_dirs)',
89           ],
90         },
91       ],
92     }, # build_output_dirs
93   ]
94 }
95