summaryrefslogtreecommitdiff
path: root/src/gallium/targets/xorg-vmwgfx/SConscript
blob: 099d49cf1b7672726986ba3313073cf16f749b67 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
import os.path

Import('*')

env = env.Clone()

env.ParseConfig('pkg-config --cflags --libs libdrm xorg-server')

if env['kms']:
    env.ParseConfig('pkg-config --cflags --libs libkms')

env.Prepend(CPPPATH = [
    '#/include',
    '#/src/gallium',
    '#/src/mesa',
    '#/src/gallium/drivers/svga',
    '#/src/gallium/drivers/svga/include',
])

env.Append(CPPDEFINES = [
])

if env['gcc']:
    env.Append(CPPDEFINES = [
        'HAVE_STDINT_H',
        'HAVE_SYS_TYPES_H',
    ])

env.Append(CFLAGS = [
    '-std=gnu99',
    '-D_FILE_OFFSET_BITS=64',
])

env.Prepend(LIBPATH = [
])

env.Prepend(LIBS = [
    trace,
    rbug,
    st_xorg,
    svgadrm,
    svga,
    gallium,
])

sources = [
    'vmw_ioctl.c',
    'vmw_ctrl.c',
    'vmw_screen.c',
    'vmw_target.c',
    'vmw_video.c',
    'vmw_xorg.c',
]

# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
module = env.LoadableModule(
    target ='vmwgfx_drv.so',
    source = sources,
    LIBS = env['LIBS'],
    SHLIBPREFIX = '',
)

env.Alias('xorg-vmwgfx', module)