summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/drm/vmware/dri/SConscript
blob: 84319f91ff127e91f379a2ed77ef12276c98af14 (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
import os
import os.path

Import('*')

if env['platform'] == 'linux':

   if env['dri']:
      env = env.Clone()

      sources = [
        '#/src/mesa/drivers/dri/common/utils.c',
        '#/src/mesa/drivers/dri/common/vblank.c',
        '#/src/mesa/drivers/dri/common/dri_util.c',
        '#/src/mesa/drivers/dri/common/xmlconfig.c',
         ]
   
      
      env.ParseConfig('pkg-config --cflags --libs libdrm')
      
      env.Prepend(CPPPATH = [
            '#/src/mesa/state_tracker',
            '#/src/mesa/drivers/dri/common',
            '#/src/mesa/main',
            '#/src/mesa/glapi',
            '#/src/mesa',
            '#/include',
            '#/src/gallium/drivers/svga',
            '#/src/gallium/drivers/svga/include',
            ])
      
      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,
            st_dri,
            svgadrm,
            svga,
            mesa,
            gallium,
            ])
      
      # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
      env.LoadableModule(
         target ='vmwgfx_dri.so',
         source = sources,
         LIBS = env['LIBS'],
         SHLIBPREFIX = '',
         )