diff options
Diffstat (limited to 'native_client_sdk/src/examples/tumbler/build.scons')
-rw-r--r-- | native_client_sdk/src/examples/tumbler/build.scons | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/native_client_sdk/src/examples/tumbler/build.scons b/native_client_sdk/src/examples/tumbler/build.scons new file mode 100644 index 0000000..4c42b7c --- /dev/null +++ b/native_client_sdk/src/examples/tumbler/build.scons @@ -0,0 +1,55 @@ +#! -*- python -*- +# +# Copyright (c) 2011 The Native Client Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import make_nacl_env +import nacl_utils +import os + +nacl_env = make_nacl_env.NaClEnvironment( + use_c_plus_plus_libs=True, nacl_platform=os.getenv('NACL_TARGET_PLATFORM'), + install_subdir='tumbler', lib_prefix='..') +nacl_env.Append( + # Add a CPPPATH that enables the full-path #include directives, such as + # #include "examples/sine_synth/sine_synth.h" + CPPPATH=[os.path.dirname(os.path.dirname(os.getcwd()))], + # Strict ANSI compliance. + EXTRA_CCFLAGS=['-pedantic'], + LIBS=['ppapi_gles2'], + ) + +sources = [ + 'cube.cc', + 'opengl_context.cc', + 'scripting_bridge.cc', + 'shader_util.cc', + 'transforms.cc', + 'tumbler.cc', + 'tumbler_module.cc', + ] + +opt_nexes, dbg_nexes = nacl_env.AllNaClModules(sources, 'tumbler') + +# This target is used by the SDK build system to provide a prebuilt version +# of the example in the SDK installer. +nacl_env.InstallPrebuilt('tumbler') + +app_files = [ + 'tumbler.html', + 'tumbler.nmf', + 'bind.js', + 'dragger.js', + 'trackball.js', + 'tumbler.js', + 'vector3.js', + ] + +# Split the install of the .nexes from the other app sources so that the strip +# action is applied to the .nexes only. +install_nexes = nacl_env.NaClStrippedInstall(dir=nacl_env['NACL_INSTALL_ROOT'], + source=opt_nexes) +install_app = nacl_env.Install(dir=nacl_env['NACL_INSTALL_ROOT'], + source=app_files) +nacl_env.Alias('install', source=install_app + install_nexes) |