Home | History | Annotate | Line # | Download | only in src
      1  1.1.1.2  mrg import filecmp
      2  1.1.1.2  mrg import os
      3  1.1.1.2  mrg import subprocess
      4  1.1.1.2  mrg from sys import executable as python_cmd
      5      1.1  mrg 
      6  1.1.1.2  mrg Import('*')
      7      1.1  mrg 
      8      1.1  mrg if env['platform'] == 'windows':
      9      1.1  mrg     SConscript('getopt/SConscript')
     10      1.1  mrg 
     11  1.1.1.2  mrg SConscript('util/xmlpool/SConscript')
     12      1.1  mrg SConscript('util/SConscript')
     13  1.1.1.2  mrg SConscript('compiler/SConscript')
     14      1.1  mrg 
     15      1.1  mrg if env['hostonly']:
     16      1.1  mrg     # We are just compiling the things necessary on the host for cross
     17      1.1  mrg     # compilation
     18      1.1  mrg     Return()
     19      1.1  mrg 
     20      1.1  mrg 
     21  1.1.1.2  mrg def write_git_sha1_h_file(filename):
     22  1.1.1.2  mrg     """Mesa looks for a git_sha1.h file at compile time in order to display
     23  1.1.1.2  mrg     the current git hash id in the GL_VERSION string.  This function tries
     24  1.1.1.2  mrg     to retrieve the git hashid and write the header file.  An empty file
     25  1.1.1.2  mrg     will be created if anything goes wrong."""
     26  1.1.1.2  mrg 
     27  1.1.1.2  mrg     args = [ python_cmd, Dir('#').abspath + '/bin/git_sha1_gen.py', '--output', filename ]
     28  1.1.1.2  mrg     try:
     29  1.1.1.2  mrg         subprocess.call(args)
     30  1.1.1.2  mrg     except:
     31  1.1.1.2  mrg         print("Warning: exception in write_git_sha1_h_file()")
     32  1.1.1.2  mrg         return
     33  1.1.1.2  mrg 
     34  1.1.1.2  mrg 
     35  1.1.1.2  mrg # Create the git_sha1.h header file
     36  1.1.1.2  mrg write_git_sha1_h_file("git_sha1.h")
     37  1.1.1.2  mrg # and update CPPPATH so the git_sha1.h header can be found
     38  1.1.1.2  mrg env.Append(CPPPATH = ["#" + env['build_dir']])
     39  1.1.1.2  mrg 
     40  1.1.1.2  mrg 
     41  1.1.1.2  mrg 
     42  1.1.1.2  mrg if env['platform'] != 'windows':
     43  1.1.1.2  mrg     SConscript('loader/SConscript')
     44  1.1.1.2  mrg 
     45      1.1  mrg SConscript('mapi/glapi/gen/SConscript')
     46      1.1  mrg SConscript('mapi/glapi/SConscript')
     47      1.1  mrg 
     48      1.1  mrg # Haiku C++ libGL dispatch (renderers depend on libgl)
     49      1.1  mrg if env['platform'] in ['haiku']:
     50      1.1  mrg     SConscript('hgl/SConscript')
     51      1.1  mrg 
     52      1.1  mrg SConscript('mesa/SConscript')
     53      1.1  mrg 
     54      1.1  mrg if not env['embedded']:
     55      1.1  mrg     if env['platform'] not in ('cygwin', 'darwin', 'freebsd', 'haiku', 'windows'):
     56      1.1  mrg         SConscript('glx/SConscript')
     57  1.1.1.2  mrg     if env['platform'] == 'haiku':
     58  1.1.1.2  mrg         SConscript('egl/SConscript')
     59      1.1  mrg 
     60      1.1  mrg SConscript('gallium/SConscript')
     61      1.1  mrg 
     62