summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common/SConscript
blob: 2763380cd8ac799418812f2e810a176d50f409b1 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
###################################
# SConcscript file for dri targets

Import('*')

drienv = env.Clone()

drienv.Replace(CPPPATH = [
    '#src/mesa/drivers/dri/common',
    xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
    '#include',
    '#include/GL/internal',
    '#src/mapi',
    '#src/gallium/include',
    '#src/gallium/auxiliary',
    '#src/gallium/drivers',
    '#src/gallium/winsys',
    '#src/mesa',
    '#src/mesa/main',
    '#src/mesa/glapi',
    '#src/mesa/math',
    '#src/mesa/transform',
    '#src/mesa/shader',
    '#src/mesa/swrast',
    '#src/mesa/swrast_setup',
    '#src/egl/main',
    '#src/egl/drivers/dri',
])

driswenv = drienv.Clone()
driswenv.Append(CPPDEFINES = [
    '__NOT_HAVE_DRM_H',
    'HAVE_DLADDR',
])

drienv.PkgUseModules('DRM')

dri_common_utils = drienv.SharedObject(
    target = 'utils.o',
    source = '#src/mesa/drivers/dri/common/utils.c'
)

dri_common_xmlconfig = drienv.SharedObject(
    target = 'xmlconfig.o',
    source = '#src/mesa/drivers/dri/common/xmlconfig.c'
)

dri_common_dri_util = drienv.SharedObject(
    target = 'dri_util.o',
    source = '#src/mesa/drivers/dri/common/dri_util.c'
)

dri_common_drisw_util = driswenv.SharedObject(
    target = 'drisw_util.o',
    source = '#src/mesa/drivers/dri/common/dri_util.c'
)


COMMON_DRI_SW_OBJECTS = [
    dri_common_utils,
    dri_common_xmlconfig,
    dri_common_drisw_util,
]

COMMON_DRI_DRM_OBJECTS = [
    dri_common_utils,
    dri_common_xmlconfig,
    dri_common_dri_util,
]

drienv.AppendUnique(LIBS = [
    'expat',
])

driswenv.AppendUnique(LIBS = [
    'expat',
])

#
# megadrivers_stub
#
env = env.Clone()

env.Append(CPPPATH = [
    '#/include',
    '#/src/',
    '#/src/mapi',
    '#/src/mesa',
])

env.Append(CPPDEFINES = [
    '__NOT_HAVE_DRM_H',
    'HAVE_DLADDR',
])

sources = env.ParseSourceList('Makefile.sources', 'megadriver_stub_FILES')

megadrivers_stub = env.ConvenienceLibrary(
	target = 'megadrivers_stub',
	source = sources,
)

env.Alias('megadrivers_stub', megadrivers_stub)

Export([
    'drienv',
    'driswenv',
    'COMMON_DRI_SW_OBJECTS',
    'COMMON_DRI_DRM_OBJECTS',
    'megadrivers_stub',
])