Clean-up and bug fixes in AudioOutputController:
[chromium-blink-merge.git] / ppapi / ppapi_untrusted.gyp
blobe28e289f4b61e6a398938d8852e232558b7e2135
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         'nso_target': 'libppapi_cpp.so',
21         'build_glibc': 1,
22         'build_newlib': 1,
23         'sources': [
24           '<@(cpp_source_files)',
25           'cpp/module_embedder.h',
26           'cpp/ppp_entrypoints.cc',
27         ],
28       },
29       'dependencies': [
30         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
31       ],
32     },
33     {
34       'target_name': 'ppapi_gles2_lib',
35       'type': 'none',
36       'variables': {
37         'nlib_target': 'libppapi_gles2.a',
38         'nso_target': 'libppapi_gles2.so',
39         'build_glibc': 1,
40         'build_newlib': 1,
41         'include_dirs': [
42           'lib/gl/include',
43         ],
44         'sources': [
45           'lib/gl/gles2/gl2ext_ppapi.c',
46           'lib/gl/gles2/gl2ext_ppapi.h',
47           'lib/gl/gles2/gles2.c',
48         ],
49       },
50       'dependencies': [
51         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
52       ],
53     },
54     {
55       'target_name': 'ppapi_nacl_tests',
56       'type': 'none',
57       'dependencies': [
58          '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib',
59          'ppapi_cpp_lib',
60          'native_client/native_client.gyp:ppapi_lib',
61       ],
62       'variables': {
63         # TODO(bradnelson): Remove this compile flag once new nacl_rev is
64         # above 9362.
65         'compile_flags': [
66           '-DGL_GLEXT_PROTOTYPES',
67         ],
68         'defines': [
69           'GL_GLEXT_PROTOTYPES',
70         ],
71         'nexe_target': 'ppapi_nacl_tests',
72         'build_newlib': 1,
73         'include_dirs': [
74           'lib/gl/include',
75           '..',
76         ],
77         'link_flags': [
78           '-lppapi_cpp',
79           '-lppapi',
80           '-pthread',
81         ],
82         # TODO(bradchen): get rid of extra_deps64 and extra_deps32
83         # once native_client/build/untrusted.gypi no longer needs them.
84         'extra_deps_newlib64': [
85           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_cpp.a',
86           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi.a',
87         ],
88         'extra_deps_newlib32': [
89           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi_cpp.a',
90           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi.a',
91         ],
92         'extra_deps_glibc64': [
93           '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libppapi_cpp.so',
94           '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libppapi.so',
95         ],
96         'extra_deps_glibc32': [
97           '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi_cpp.so',
98           '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi.so',
99         ],
100         'extra_deps_arm': [
101           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi_cpp.a',
102           '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi.a',
103         ],
104         'sources': [
105           '<@(test_common_source_files)',
106           '<@(test_nacl_source_files)',
107         ],
108       },
109       'conditions': [
110         ['target_arch!="arm"', {
111           'variables': {
112             'compile_flags': [
113               '-mno-tls-use-call',
114             ],
115           },
116         }],
117         ['target_arch!="arm" and disable_glibc==0', {
118           'variables': {
119             'build_glibc': 1,
120             # NOTE: Use /lib, not /lib64 here; it is a symbolic link which
121             # doesn't work on Windows.
122             'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib',
123             'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32',
124             'nacl_objdump': '>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump',
125             'nmf_glibc%': '<(PRODUCT_DIR)/>(nexe_target)_glibc.nmf',
126           },
127           'actions': [
128           {
129             'action_name': 'Generate GLIBC NMF and copy libs',
130             'inputs': ['>(out_glibc64)', '>(out_glibc32)'],
131             # NOTE: There is no explicit dependency for the lib32
132             # and lib64 directories created in the PRODUCT_DIR.
133             # They are created as a side-effect of NMF creation.
134             'outputs': ['>(nmf_glibc)'],
135             'action': [
136               'python',
137               '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py',
138               '>@(_inputs)',
139               '--objdump=>(nacl_objdump)',
140               '--library-path=>(libdir_glibc64)',
141               '--library-path=>(libdir_glibc32)',
142               '--library-path=<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32',
143               '--library-path=<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64',
144               '--output=>(nmf_glibc)',
145               '--stage-dependencies=<(PRODUCT_DIR)',
146             ],
147             'msvs_cygwin_shell': 1,
148           },
149         ],
150         }],
151       ],
152     },
153   ],