freedreno/rnn: Make rnn_decode_enum() respect variants
[mesa.git] / src / SConscript
1 import filecmp
2 import os
3 import subprocess
4 from sys import executable as python_cmd
5
6 Import('*')
7
8 if env['platform'] == 'windows':
9 SConscript('getopt/SConscript')
10
11 SConscript('util/SConscript')
12 SConscript('compiler/SConscript')
13
14 if env['hostonly']:
15 # We are just compiling the things necessary on the host for cross
16 # compilation
17 Return()
18
19
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."""
25
26 args = [ python_cmd, Dir('#').abspath + '/bin/git_sha1_gen.py', '--output', filename ]
27 try:
28 subprocess.call(args)
29 except:
30 print("Warning: exception in write_git_sha1_h_file()")
31 return
32
33
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']])
38
39
40
41 if env['platform'] != 'windows':
42 SConscript('loader/SConscript')
43
44 SConscript('mapi/glapi/gen/SConscript')
45 SConscript('mapi/glapi/SConscript')
46
47 SConscript('mesa/SConscript')
48
49 SConscript('gallium/SConscript')
50