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.
11 '../native_client/build/untrusted.gypi',
16 'target_name': 'ppapi_cpp_lib',
19 'nlib_target': 'libppapi_cpp.a',
20 'nso_target': 'libppapi_cpp.so',
24 '<@(cpp_source_files)',
25 'cpp/module_embedder.h',
26 'cpp/ppp_entrypoints.cc',
30 '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
34 'target_name': 'ppapi_gles2_lib',
37 'nlib_target': 'libppapi_gles2.a',
38 'nso_target': 'libppapi_gles2.so',
45 'lib/gl/gles2/gl2ext_ppapi.c',
46 'lib/gl/gles2/gl2ext_ppapi.h',
47 'lib/gl/gles2/gles2.c',
51 '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
55 'target_name': 'ppapi_nacl_tests',
58 '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib',
60 'native_client/native_client.gyp:ppapi_lib',
63 # TODO(bradnelson): Remove this compile flag once new nacl_rev is
66 '-DGL_GLEXT_PROTOTYPES',
69 'GL_GLEXT_PROTOTYPES',
71 'nexe_target': 'ppapi_nacl_tests',
82 # TODO(bradchen): get rid of extra_deps64 and extra_deps32
83 # once native_client/build/untrusted.gypi no longer needs them.
85 '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_cpp.a',
86 '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi.a',
88 'extra_deps_newlib64': [
89 '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_cpp.a',
90 '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi.a',
92 'extra_deps_newlib32': [
93 '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi_cpp.a',
94 '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi.a',
96 'extra_deps_glibc64': [
97 '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libppapi_cpp.a',
98 '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libppapi.a',
100 'extra_deps_glibc32': [
101 '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi_cpp.a',
102 '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi.a',
105 '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi_cpp.a',
106 '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi.a',
109 '<@(test_common_source_files)',
110 '<@(test_nacl_source_files)',
114 ['target_arch!="arm"', {
121 ['target_arch!="arm" and disable_glibc==0', {
124 # NOTE: Use /lib, not /lib64 here; it is a symbolic link which
125 # doesn't work on Windows.
126 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib',
127 'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32',
128 'nacl_objdump': '>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump',
129 'nmf_glibc%': '<(PRODUCT_DIR)/>(nexe_target)_glibc.nmf',
133 'action_name': 'Generate GLIBC NMF and copy libs',
134 'inputs': ['>(out_glibc64)', '>(out_glibc32)'],
135 # NOTE: There is no explicit dependency for the lib32
136 # and lib64 directories created in the PRODUCT_DIR.
137 # They are created as a side-effect of NMF creation.
138 'outputs': ['>(nmf_glibc)'],
141 '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py',
143 '--objdump=>(nacl_objdump)',
144 '--library-path=>(libdir_glibc64)',
145 '--library-path=>(libdir_glibc32)',
146 '--library-path=<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32',
147 '--library-path=<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64',
148 '--output=>(nmf_glibc)',
149 '--stage-dependencies=<(PRODUCT_DIR)',