OLD | NEW |
(Empty) | |
| 1 # -*- python -*- |
| 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 Import('env') |
| 7 |
| 8 # Underlay $SOURCE_ROOT/gpu in this directory. |
| 9 Dir('.').addRepository(Dir('#/../gpu')) |
| 10 |
| 11 # To enable getting the generated include files and sources and also common and |
| 12 # client GPU command buffer sources. |
| 13 env.Append(CPPPATH= |
| 14 ['${SOURCE_ROOT}/native_client/src/shared/ppapi_proxy/untrusted', |
| 15 '$SOURCE_ROOT/gpu']) |
| 16 |
| 17 env.Append(CPPDEFINES=['XP_UNIX']) |
| 18 env.FilterOut(CCFLAGS=['-Wswitch-enum']) |
| 19 env.Append(CCFLAGS=['-Wno-long-long']) |
| 20 |
| 21 # The PPAPI RPCs are specified abstractly via .srpc files. |
| 22 # Once a .srpc file is added to the UntrustedSrpc rules below, the low-level |
| 23 # server/client proxies and stubs can be generated automatically using |
| 24 # scons srpcgen |
| 25 # The .cc files are written to ./ and .h files - to ./untrusted/srpcgen/. |
| 26 # The generated files must be committed when changes are made to .srpc files. |
| 27 |
| 28 env.UntrustedSrpc(is_client=False, |
| 29 srpc_files=['completion_callback.srpc', |
| 30 'ppp.srpc', |
| 31 'ppp_audio.srpc', |
| 32 'ppp_find.srpc', |
| 33 'ppp_input_event.srpc', |
| 34 'ppp_instance.srpc', |
| 35 'ppp_messaging.srpc', |
| 36 'ppp_printing.srpc', |
| 37 'ppp_scrollbar.srpc', |
| 38 'ppp_selection.srpc', |
| 39 'ppp_widget.srpc', |
| 40 'ppp_zoom.srpc', |
| 41 ], |
| 42 name='PppRpcs', |
| 43 h_file='ppp_rpc.h', |
| 44 cc_file='ppp_rpc_server.cc', |
| 45 guard='GEN_PPAPI_PROXY_PPP_RPC_H_') |
| 46 |
| 47 env.UntrustedSrpc(is_client=True, |
| 48 srpc_files=['nacl_file.srpc', |
| 49 'ppb.srpc', |
| 50 'ppb_audio.srpc', |
| 51 'ppb_audio_config.srpc', |
| 52 'ppb_core.srpc', |
| 53 'ppb_cursor_control.srpc', |
| 54 'ppb_file_io.srpc', |
| 55 'ppb_file_ref.srpc', |
| 56 'ppb_file_system.srpc', |
| 57 'ppb_find.srpc', |
| 58 'ppb_font.srpc', |
| 59 'ppb_graphics_2d.srpc', |
| 60 'ppb_graphics_3d.srpc', |
| 61 'ppb_image_data.srpc', |
| 62 'ppb_input_event.srpc', |
| 63 'ppb_instance.srpc', |
| 64 'ppb_messaging.srpc', |
| 65 'ppb_pdf.srpc', |
| 66 'ppb_scrollbar.srpc', |
| 67 'ppb_testing.srpc', |
| 68 'ppb_url_loader.srpc', |
| 69 'ppb_url_request_info.srpc', |
| 70 'ppb_url_response_info.srpc', |
| 71 'ppb_widget.srpc', |
| 72 'ppb_zoom.srpc', |
| 73 ], |
| 74 name='PpbRpcs', |
| 75 h_file='ppb_rpc.h', |
| 76 cc_file='ppb_rpc_client.cc', |
| 77 guard='GEN_PPAPI_PROXY_PPB_RPC_H_', |
| 78 thread_check=True) |
| 79 |
| 80 env.UntrustedSrpc(is_client=True, |
| 81 srpc_files=['upcall.srpc'], |
| 82 name='PpbUpcalls', |
| 83 h_file='upcall.h', |
| 84 cc_file='upcall_client.cc', |
| 85 guard='GEN_PPAPI_PROXY_UPCALL_H_') |
| 86 |
| 87 command_buffer_common_srcs = [ |
| 88 'command_buffer/common/cmd_buffer_common.cc', |
| 89 'command_buffer/common/gles2_cmd_format.cc', |
| 90 'command_buffer/common/gles2_cmd_utils.cc', |
| 91 ] |
| 92 |
| 93 command_buffer_client_srcs = [ |
| 94 'command_buffer/client/cmd_buffer_helper.cc', |
| 95 'command_buffer/client/fenced_allocator.cc', |
| 96 'command_buffer/client/gles2_c_lib.cc', |
| 97 'command_buffer/client/gles2_cmd_helper.cc', |
| 98 'command_buffer/client/gles2_implementation.cc', |
| 99 'command_buffer/client/program_info_manager.cc', |
| 100 'command_buffer/client/gles2_lib.cc', |
| 101 'command_buffer/client/mapped_memory.cc', |
| 102 'command_buffer/client/ring_buffer.cc', |
| 103 'command_buffer/common/id_allocator.cc', |
| 104 ] |
| 105 |
| 106 command_buffer_srcs = command_buffer_common_srcs + command_buffer_client_srcs; |
| 107 |
| 108 libppruntime = env.NaClSdkLibrary( |
| 109 'libppruntime', |
| 110 ['command_buffer_nacl.cc', |
| 111 'input_event_data.cc', |
| 112 'object_serialize.cc', |
| 113 'plugin_callback.cc', |
| 114 'plugin_globals.cc', |
| 115 'plugin_instance_data.cc', |
| 116 'plugin_main.cc', |
| 117 'plugin_nacl_file.cc', |
| 118 'plugin_opengles.cc', |
| 119 'plugin_ppb.cc', |
| 120 'plugin_ppb_audio.cc', |
| 121 'plugin_ppb_audio_config.cc', |
| 122 'plugin_ppb_buffer.cc', |
| 123 'plugin_ppb_core.cc', |
| 124 'plugin_ppb_cursor_control.cc', |
| 125 'plugin_ppb_file_io.cc', |
| 126 'plugin_ppb_file_system.cc', |
| 127 'plugin_ppb_file_ref.cc', |
| 128 'plugin_ppb_find.cc', |
| 129 'plugin_ppb_font.cc', |
| 130 'plugin_ppb_graphics_2d.cc', |
| 131 'plugin_ppb_graphics_3d.cc', |
| 132 'plugin_ppb_image_data.cc', |
| 133 'plugin_ppb_input_event.cc', |
| 134 'plugin_ppb_instance.cc', |
| 135 'plugin_ppb_memory.cc', |
| 136 'plugin_ppb_messaging.cc', |
| 137 'plugin_ppb_pdf.cc', |
| 138 'plugin_ppb_scrollbar.cc', |
| 139 'plugin_ppb_testing.cc', |
| 140 'plugin_ppb_url_loader.cc', |
| 141 'plugin_ppb_url_request_info.cc', |
| 142 'plugin_ppb_url_response_info.cc', |
| 143 'plugin_ppb_var.cc', |
| 144 'plugin_ppb_widget.cc', |
| 145 'plugin_ppb_zoom.cc', |
| 146 'plugin_ppp_find_rpc_server.cc', |
| 147 'plugin_ppp_input_event_rpc_server.cc', |
| 148 'plugin_ppp_instance_rpc_server.cc', |
| 149 'plugin_ppp_messaging_rpc_server.cc', |
| 150 'plugin_ppp_printing_rpc_server.cc', |
| 151 'plugin_ppp_scrollbar_rpc_server.cc', |
| 152 'plugin_ppp_selection_rpc_server.cc', |
| 153 'plugin_ppp_widget_rpc_server.cc', |
| 154 'plugin_ppp_zoom_rpc_server.cc', |
| 155 'plugin_ppp_rpc_server.cc', |
| 156 'plugin_resource.cc', |
| 157 'plugin_resource_tracker.cc', |
| 158 'plugin_threading.cc', |
| 159 'plugin_upcall.cc', |
| 160 'proxy_var.cc', |
| 161 'proxy_var_cache.cc', |
| 162 'utility.cc', |
| 163 # Autogenerated files |
| 164 'ppp_rpc_server.cc', |
| 165 'ppb_rpc_client.cc', |
| 166 'upcall_client.cc'] + command_buffer_srcs, |
| 167 LIBS=['pthread', |
| 168 'srpc', |
| 169 'gio', |
| 170 'platform', |
| 171 ]) |
| 172 |
| 173 header_install = env.AddHeaderToSdk(['ppruntime.h']) |
| 174 env.AddLibraryToSdk(libppruntime) |
| 175 |
| 176 # Clients that overload main() will use ppruntime.h. |
| 177 env.Requires(libppruntime, header_install) |
OLD | NEW |