OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 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 | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 Import('env') | 6 Import('env') |
7 | 7 |
8 # TODO(robertm): those should not be necessary once we go -std=c99 | 8 # TODO(robertm): those should not be necessary once we go -std=c99 |
9 env.FilterOut(CFLAGS=['-pedantic']) | 9 env.FilterOut(CFLAGS=['-pedantic']) |
10 env.FilterOut(CCFLAGS=['-pedantic']) | 10 env.FilterOut(CCFLAGS=['-pedantic']) |
11 | 11 |
12 basic_obj_sources = env.ComponentObject('basic_object.cc'), | 12 basic_obj_sources = env.ComponentObject('basic_object.cc'), |
13 | 13 |
14 basic_obj_target = 'ppapi_basic_object_%s.nexe' % env.get('TARGET_FULLARCH') | 14 basic_obj_target = 'ppapi_basic_object_%s' % env.get('TARGET_FULLARCH') |
15 env.Alias('ppapi_basic_object.nexe', ['$STAGING_DIR/%s' % basic_obj_target]) | 15 env.Alias('ppapi_basic_object${PROGSUFFIX}', |
| 16 ['$STAGING_DIR/%s${PROGSUFFIX}' % basic_obj_target]) |
16 basic_object_nexe = env.ComponentProgram(basic_obj_target, | 17 basic_object_nexe = env.ComponentProgram(basic_obj_target, |
17 [basic_obj_sources], | 18 [basic_obj_sources], |
18 EXTRA_LIBS=['${PPAPI_LIBS}']) | 19 EXTRA_LIBS=['${PPAPI_LIBS}']) |
19 | 20 |
20 # Note that the html and a .nmf manifest is required to run this program. | 21 # Note that the html and a .nmf manifest is required to run this program. |
21 dest_copy = env.Replicate('$STAGING_DIR', | 22 dest_copy = env.Replicate('$STAGING_DIR', |
22 ['basic_object.html', | 23 ['basic_object.html', |
23 'basic_object.nmf', | 24 'basic_object.nmf', |
24 'user_main.nmf', | 25 'user_main.nmf', |
25 env.File('${SCONSTRUCT_DIR}/tools/browser_tester/' | 26 env.File('${SCONSTRUCT_DIR}/tools/browser_tester/' |
26 'browserdata/nacltest.js')]) | 27 'browserdata/nacltest.js')]) |
27 env.Depends(basic_obj_target, dest_copy) | 28 env.Depends(basic_obj_target, dest_copy) |
28 | 29 |
29 user_main_target = 'ppapi_user_main_%s.nexe' % env.get('TARGET_FULLARCH') | 30 user_main_target = 'ppapi_user_main_%s' % env.get('TARGET_FULLARCH') |
30 env.Alias('ppapi_user_main.nexe', ['$STAGING_DIR/%s' % user_main_target]) | 31 env.Alias('ppapi_user_main${PROGSUFFIX}', |
| 32 ['$STAGING_DIR/%s${PROGSUFFIX}' % user_main_target]) |
31 user_main_nexe = env.ComponentProgram(user_main_target, | 33 user_main_nexe = env.ComponentProgram(user_main_target, |
32 [basic_obj_sources, 'user_main.cc',], | 34 [basic_obj_sources, 'user_main.cc',], |
33 EXTRA_LIBS=['${PPAPI_LIBS}']) | 35 EXTRA_LIBS=['${PPAPI_LIBS}']) |
34 | 36 |
35 env.Depends(user_main_target, dest_copy) | 37 env.Depends(user_main_target, dest_copy) |
36 | 38 |
37 node = env.PPAPIBrowserTester( | 39 node = env.PPAPIBrowserTester( |
38 'ppapi_basic_object_browser_test.out', | 40 'ppapi_basic_object_browser_test.out', |
39 url='basic_object.html', | 41 url='basic_object.html', |
40 files=[basic_object_nexe, | 42 files=[basic_object_nexe, |
41 user_main_nexe, | 43 user_main_nexe, |
42 env.File('basic_object.html'), | 44 env.File('basic_object.html'), |
43 env.File('basic_object.nmf'), | 45 env.File('basic_object.nmf'), |
44 env.File('user_main.nmf')], | 46 env.File('user_main.nmf')], |
45 args=['--enable_experimental_js']) | 47 args=['--enable_experimental_js']) |
46 | 48 |
47 env.AddNodeToTestSuite(node, | 49 env.AddNodeToTestSuite(node, |
48 ['chrome_browser_tests'], | 50 ['chrome_browser_tests'], |
49 'run_ppapi_basic_object_browser_test', | 51 'run_ppapi_basic_object_browser_test', |
50 is_broken=env.PPAPIBrowserTesterIsBroken()) | 52 is_broken=env.PPAPIBrowserTesterIsBroken()) |
51 | 53 |
52 event_target = 'ppapi_event_example_%s.nexe' % env.get('TARGET_FULLARCH') | 54 event_target = 'ppapi_event_example_%s' % env.get('TARGET_FULLARCH') |
53 env.Alias('ppapi_event_example.nexe', ['$STAGING_DIR/%s' % event_target]) | 55 env.Alias('ppapi_event_example${PROGSUFFIX}', |
| 56 ['$STAGING_DIR/%s${PROGSUFFIX}' % event_target]) |
54 event_example_nexe = env.ComponentProgram(event_target, | 57 event_example_nexe = env.ComponentProgram(event_target, |
55 ['event_example.cc',], | 58 ['event_example.cc',], |
56 EXTRA_LIBS=['${PPAPI_LIBS}', | 59 EXTRA_LIBS=['${PPAPI_LIBS}', |
57 'ppapi_cpp']) | 60 'ppapi_cpp']) |
58 | 61 |
59 # Note that the html and a .nmf manifest is required to run this program. | 62 # Note that the html and a .nmf manifest is required to run this program. |
60 dest_copy = env.Replicate('$STAGING_DIR', | 63 dest_copy = env.Replicate('$STAGING_DIR', |
61 ['event_example.html', | 64 ['event_example.html', |
62 'event_example.nmf']) | 65 'event_example.nmf']) |
63 env.Depends(event_target, dest_copy) | 66 env.Depends(event_target, dest_copy) |
OLD | NEW |