7 if env['platform'] == 'windows':
8 SConscript('getopt/SConscript')
10 SConscript('util/xmlpool/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 tempfile = "git_sha1.h.tmp"
27 with open(tempfile, "w") as f:
28 args = [ 'sh', Dir('#').abspath + '/bin/git_sha1_gen.sh' ]
30 subprocess.Popen(args, stdout=f).wait()
32 print "Warning: exception in write_git_sha1_h_file()"
35 if not os.path.exists(filename) or not filecmp.cmp(tempfile, filename):
36 # The filename does not exist or it's different from the new file,
37 # so replace old file with new.
38 if os.path.exists(filename):
40 os.rename(tempfile, filename)
44 # Create the git_sha1.h header file
45 write_git_sha1_h_file("git_sha1.h")
46 # and update CPPPATH so the git_sha1.h header can be found
47 env.Append(CPPPATH = ["#" + env['build_dir']])
51 if env['platform'] != 'windows':
52 SConscript('loader/SConscript')
54 # When env['gles'] is set, the targets defined in mapi/glapi/SConscript are not
55 # used. libgl-xlib and libgl-gdi adapt themselves to use the targets defined
56 # in mapi/glapi-shared/SConscript. mesa/SConscript also adapts itself to
57 # enable OpenGL ES support.
58 SConscript('mapi/glapi/gen/SConscript')
59 SConscript('mapi/glapi/SConscript')
61 # Haiku C++ libGL dispatch (renderers depend on libgl)
62 if env['platform'] in ['haiku']:
63 SConscript('hgl/SConscript')
65 SConscript('mesa/SConscript')
67 if not env['embedded']:
68 if env['platform'] not in ('cygwin', 'darwin', 'freebsd', 'haiku', 'windows'):
69 SConscript('glx/SConscript')
70 if env['platform'] == 'haiku':
71 SConscript('egl/SConscript')
74 SConscript('mapi/shared-glapi/SConscript')
76 SConscript('gallium/SConscript')