4 from sys import executable as python_cmd
8 if env['platform'] == 'windows':
9 SConscript('getopt/SConscript')
11 SConscript('util/SConscript')
12 SConscript('compiler/SConscript')
15 # We are just compiling the things necessary on the host for cross
20 def write_git_sha1_h_file(filename):
21 """Mesa looks for a git_sha1.h file at compile time in order to display
22 the current git hash id in the GL_VERSION string. This function tries
23 to retrieve the git hashid and write the header file. An empty file
24 will be created if anything goes wrong."""
26 args = [ python_cmd, Dir('#').abspath + '/bin/git_sha1_gen.py', '--output', filename ]
30 print("Warning: exception in write_git_sha1_h_file()")
34 # Create the git_sha1.h header file
35 write_git_sha1_h_file("git_sha1.h")
36 # and update CPPPATH so the git_sha1.h header can be found
37 env.Append(CPPPATH = ["#" + env['build_dir']])
41 if env['platform'] != 'windows':
42 SConscript('loader/SConscript')
44 SConscript('mapi/glapi/gen/SConscript')
45 SConscript('mapi/glapi/SConscript')
47 SConscript('mesa/SConscript')
49 SConscript('gallium/SConscript')