1#######################################################################
2# SConscript for gdi winsys
3
4Import('*')
5
6env = env.Clone()
7
8env.Append(CPPPATH = [
9    '#src/gallium/state_trackers/wgl',
10    '#src/gallium/winsys/sw',
11])
12
13env.Append(LIBS = [
14    'gdi32',
15    'user32',
16    'kernel32',
17    'ws2_32',
18])
19
20sources = ['libgl_gdi.c']
21drivers = []
22
23if True:
24    drivers += [softpipe]
25
26if env['llvm']:
27    env.Append(CPPDEFINES = 'HAVE_LLVMPIPE')
28    drivers += [llvmpipe]
29
30if env['gcc'] and env['machine'] != 'x86_64':
31    # DEF parser in certain versions of MinGW is busted, as does not behave as
32    # MSVC.  mingw-w64 works fine.
33    sources += ['#src/gallium/state_trackers/wgl/opengl32.mingw.def']
34else:
35    sources += ['#src/gallium/state_trackers/wgl/opengl32.def']
36    
37drivers += [trace, rbug]
38
39env['no_import_lib'] = 1
40
41# when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and
42# shared_glapi respectively
43if env['gles']:
44    env.Prepend(LIBPATH = [shared_glapi.dir])
45    glapi = [bridge_glapi, 'libglapi']
46
47opengl32 = env.SharedLibrary(
48    target ='opengl32',
49    source = sources,
50    LIBS = wgl + ws_gdi + glapi + mesa + drivers + gallium + glsl + env['LIBS'],
51)
52
53env.Alias('opengl32', opengl32)
54env.Alias('libgl-gdi', opengl32)
55