ash: Update launcher background to 0.8 black.
[chromium-blink-merge.git] / ppapi / ppapi_untrusted.gyp
blob2fbdb7be6aba64203863ec8706990069aab09719
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.
5 # This GYP file defines untrusted (NaCl) targets.  All targets in this
6 # file should be conditionally depended upon via 'disable_nacl!=1' to avoid
7 # requiring NaCl sources for building.
10   'includes': [
11     '../native_client/build/untrusted.gypi',
12     'ppapi_sources.gypi',
13   ],
14   'targets': [
15     {
16       'target_name': 'ppapi_cpp_lib',
17       'type': 'none',
18       'variables': {
19         'nlib_target': 'libppapi_cpp.a',
20         'build_glibc': 1,
21         'build_newlib': 1,
22         'sources': [
23           '<@(cpp_source_files)',
24           'cpp/module_embedder.h',
25           'cpp/ppp_entrypoints.cc',
26         ],
27       },
28       'dependencies': [
29         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
30       ],
31     },
32     {
33       'target_name': 'ppapi_nacl_tests',
34       'type': 'none',
35       'dependencies': [
36          'ppapi_cpp_lib',
37          'native_client/native_client.gyp:ppapi_lib',
38          'native_client/native_client.gyp:nacl_irt',
39       ],
40       'variables': {
41         # TODO(bradnelson): Remove this compile flag once new nacl_rev is
42         # above 9362.
43         'compile_flags': [
44           '-DGL_GLEXT_PROTOTYPES',
45         ],
46         'defines': [
47           'GL_GLEXT_PROTOTYPES',
48         ],
49         'nexe_target': 'ppapi_nacl_tests',
50         'build_newlib': 1,
51         'include_dirs': [
52           'lib/gl/include',
53           '..',
54         ],
55         'link_flags': [
56           '-lppapi_cpp',
57           '-lppapi',
58           '-lplatform',
59           '-lpthread',
60           '-lgio',
61         ],
62         # TODO(bradchen): get rid of extra_deps64 and extra_deps32
63         # once native_client/build/untrusted.gypi no longer needs them.
64         'extra_deps64': [
65           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_cpp.a',
66           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi.a',
67         ],
68         'extra_deps_newlib64': [
69           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_cpp.a',
70           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi.a',
71         ],
72         'extra_deps_newlib32': [
73           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi_cpp.a',
74           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi.a',
75         ],
76         'extra_deps_glibc64': [
77           '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libppapi_cpp.a',
78           '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libppapi.a',
79         ],
80         'extra_deps_glibc32': [
81           '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi_cpp.a',
82           '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi.a',
83         ],
84         'extra_deps_arm': [
85           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi_cpp.a',
86           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi.a',
87         ],
88         'sources': [
89           '<@(test_common_source_files)',
90           '<@(test_nacl_source_files)',
91         ],
92       },
93       'conditions': [
94         ['target_arch!="arm"', {
95           'variables': {
96             'compile_flags': [
97               '-mno-tls-use-call',
98             ],
99           },
100         }],
101         ['target_arch!="arm" and disable_glibc==0', {
102           'variables': {
103             'build_glibc': 1,
104             # NOTE: Use /lib, not /lib64 here; it is a symbolic link which
105             # doesn't work on Windows.
106             'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib',
107             'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32',
108             'nacl_objdump': '>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump',
109             'nmf_glibc%': '<(PRODUCT_DIR)/>(nexe_target)_glibc.nmf',
110           },
111           'actions': [
112           {
113             'action_name': 'Generate GLIBC NMF and copy libs',
114             'inputs': ['>(out_glibc64)', '>(out_glibc32)'],
115             # NOTE: There is no explicit dependency for the lib32
116             # and lib64 directories created in the PRODUCT_DIR.
117             # They are created as a side-effect of NMF creation.
118             'outputs': ['>(nmf_glibc)'],
119             'action': [
120               'python',
121               '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py',
122               '>@(_inputs)',
123               '--objdump=>(nacl_objdump)',
124               '--library-path=>(libdir_glibc64)',
125               '--library-path=>(libdir_glibc32)',
126               '--output=>(nmf_glibc)',
127               '--stage-dependencies=<(PRODUCT_DIR)',
128               '--toolchain=glibc',
129             ],
130           },
131         ],
132         }],
133       ],
134     },
135   ],