Index: examples/mouselock/build.scons |
=================================================================== |
--- examples/mouselock/build.scons (revision 0) |
+++ examples/mouselock/build.scons (revision 0) |
@@ -0,0 +1,51 @@ |
+#! -*- python -*- |
Matt Ball
2011/11/10 15:03:11
I'm guessing that this was copied from one of the
der Springer
2011/11/11 19:23:01
Done.
|
+# |
+# 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 os |
+ |
+nacl_env = make_nacl_env.NaClEnvironment( |
+ use_c_plus_plus_libs=True, nacl_platform=os.getenv('NACL_TARGET_PLATFORM'), |
+ install_subdir='mouselock', 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. |
+ CCFLAGS=['-pedantic', '-Werror'], |
+ ) |
+ |
+sources = ['mouselock.cc'] |
+ |
+opt_nexes, dbg_nexes = nacl_env.AllNaClModules(sources, 'mouselock') |
+ |
+# This target is used by the SDK build system to provide a prebuilt version |
+# of the example in the SDK installer. |
+nacl_env.InstallPrebuilt('mouselock') |
+ |
+common_files = [ |
+ 'check_browser.js', |
+ ] |
+common_files = [ |
+ os.path.join(os.path.dirname(os.getcwd()), 'common', common_file) |
+ for common_file in common_files] |
+ |
+app_files = [ |
+ 'mouselock.html', |
+ 'mouselock.nmf', |
+ ] |
+ |
+# 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) |
+common_dir = os.path.join(os.path.dirname(nacl_env['NACL_INSTALL_ROOT']), |
+ 'common') |
+install_common = nacl_env.Install(dir=common_dir, source=common_files) |
+nacl_env.Alias('install', |
+ source=[install_app, install_common, install_nexes]) |