a9e9f2682a7eb36ffac1a5b3222e3ef8bb2fe44f
[profile/ivi/mesa.git] / src / gallium / winsys / drm / SConscript
1 Import('*')
2
3 if env['dri']:
4
5         drienv = env.Clone()
6
7         drienv.Replace(CPPPATH = [
8                 '#src/mesa/drivers/dri/common',
9                 '#include',
10                 '#include/GL/internal',
11                 '#src/gallium/include',
12                 '#src/gallium/auxiliary',
13                 '#src/gallium/drivers',
14                 '#src/mesa',
15                 '#src/mesa/main',
16                 '#src/mesa/glapi',
17                 '#src/mesa/math',
18                 '#src/mesa/transform',
19                 '#src/mesa/shader',
20                 '#src/mesa/swrast',
21                 '#src/mesa/swrast_setup',
22                 '#src/egl/main',
23                 '#src/egl/drivers/dri',
24         ])
25
26         drienv.ParseConfig('pkg-config --cflags --libs libdrm')
27
28         COMMON_GALLIUM_SOURCES = [
29                 '#src/mesa/drivers/dri/common/utils.c',
30                 '#src/mesa/drivers/dri/common/vblank.c',
31                 '#src/mesa/drivers/dri/common/dri_util.c',
32                 '#src/mesa/drivers/dri/common/xmlconfig.c',
33         ]
34
35         COMMON_BM_SOURCES = [
36                 '#src/mesa/drivers/dri/common/dri_bufmgr.c',
37                 '#src/mesa/drivers/dri/common/dri_drmpool.c',
38         ]
39
40         Export([
41                 'drienv',
42                 'COMMON_GALLIUM_SOURCES',
43                 'COMMON_BM_SOURCES',
44         ])
45
46         # TODO: Installation
47         #install: $(LIBNAME)
48         #       $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR)
49         #       $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR)
50
51         if 'intel' in env['winsys']:
52                 SConscript([
53                         'intel/SConscript',
54                 ])
55
56         if 'radeon' in env['winsys']:
57                 SConscript([
58                         'radeon/SConscript',
59                 ])