| OLD | NEW |
| 1 #!/usr/bin/python2.4 | 1 #!/usr/bin/python2.4 |
| 2 # Copyright 2008, Google Inc. | 2 # Copyright 2008, Google Inc. |
| 3 # All rights reserved. | 3 # All rights reserved. |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
| 7 # met: | 7 # met: |
| 8 # | 8 # |
| 9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
| 10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 | 30 |
| 31 """Windows DirectX 9.0c tool for SCons.""" | 31 """Windows DirectX 9.0c tool for SCons.""" |
| 32 | 32 |
| 33 | 33 |
| 34 def generate(env): | 34 def generate(env): |
| 35 # NOTE: SCons requires the use of this name, which fails gpylint. | 35 # NOTE: SCons requires the use of this name, which fails gpylint. |
| 36 """SCons entry point for this tool.""" | 36 """SCons entry point for this tool.""" |
| 37 | 37 |
| 38 env['DIRECTX9_DIR'] = '$DIRECTX9_0_C_DIR' | 38 env['DIRECTX9_DIR'] = '$DIRECTX9_0_C_DIR' |
| 39 env.AppendENVPath('INCLUDE', env.Dir('$DIRECTX9_DIR/include').abspath) | 39 env.Append( |
| 40 env.AppendENVPath('LIB', env.Dir('$DIRECTX9_DIR/lib').abspath) | 40 LIBPATH=['$DIRECTX9_DIR/lib'], |
| 41 CCFLAGS=['/I$DIRECTX9_DIR/include'], |
| 42 ) |
| 41 | 43 |
| 42 | 44 |
| 43 def exists(env): | 45 def exists(env): |
| 44 """Returns true if tool exists.""" | 46 """Returns true if tool exists.""" |
| 45 # NOTE: SCons requires the use of this name, which fails gpylint. | 47 # NOTE: SCons requires the use of this name, which fails gpylint. |
| 46 | 48 |
| 47 # If directory explicitly specified, we exist | 49 # If directory explicitly specified, we exist |
| 48 if env.get('DIRECTX9_0_C_DIR'): | 50 if env.get('DIRECTX9_0_C_DIR'): |
| 49 return 1 | 51 return 1 |
| 50 else: | 52 else: |
| 51 # TODO(rspangler): Don't know how to find it otherwise! | 53 # TODO(rspangler): Don't know how to find it otherwise! |
| 52 return 0 | 54 return 0 |
| OLD | NEW |