summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl/SConscript
blob: 9ade76ecbb20fa6e3f2288d32997a02163652fb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#######################################################################
# SConscript for egl state_tracker

Import('*')

env = env.Clone()

env.Append(CPPPATH = [
    '#/src/egl/main',
    '#/src/gallium/winsys/sw',
    '.',
])

sources = [
    'common/egl_g3d.c',
    'common/egl_g3d_api.c',
    'common/egl_g3d_image.c',
    'common/egl_g3d_st.c',
    'common/egl_g3d_sync.c',
    'common/native_helper.c',
]

if env['platform'] == 'windows':
    env.Append(CPPDEFINES = ['HAVE_GDI_BACKEND'])
    sources.append('gdi/native_gdi.c')
else:
    if env['x11']:
        env.Append(CPPDEFINES = ['HAVE_X11_BACKEND'])
        env.Prepend(CPPPATH = [
            '#/src/glx',
            '#/src/mapi',
        ])
        sources.append([
            'x11/native_x11.c',
            'x11/native_dri2.c',
            'x11/native_ximage.c',
            'x11/x11_screen.c',
            'x11/glxinit.c'])
        if env['dri']:
            env.Append(CPPDEFINES = ['GLX_DIRECT_RENDERING'])
            sources.append(['#/src/glx/dri2.c'])
    if env['drm']:
        env.Append(CPPDEFINES = ['HAVE_DRM_BACKEND'])
        sources.append(['drm/native_drm.c', 'drm/modeset.c'])

st_egl = env.ConvenienceLibrary(
    target = 'st_egl',
    source = sources,
)
Export('st_egl')