scons: Add Haiku build support
[mesa.git] / src / gallium / SConscript
1 Import('env')
2
3 #
4 # Auxiliary modules
5 #
6
7 SConscript('auxiliary/SConscript')
8
9 #
10 # Drivers
11 #
12
13 # These are common and work across all platforms
14 SConscript([
15 'drivers/galahad/SConscript',
16 'drivers/identity/SConscript',
17 'drivers/rbug/SConscript',
18 'drivers/softpipe/SConscript',
19 'drivers/trace/SConscript',
20 ])
21
22 # These drivers do not build on Haiku
23 if env['platform'] not in ['haiku']:
24 SConscript([
25 'drivers/llvmpipe/SConscript',
26 'drivers/svga/SConscript',
27 ])
28
29 if not env['msvc']:
30 # These drivers do not build on MSVC compilers
31 SConscript([
32 'drivers/i915/SConscript',
33 'drivers/r300/SConscript',
34 ])
35
36 if env['drm']:
37 # These drivers depend on drm headers
38 if env['drm_radeon']:
39 SConscript([
40 'drivers/r600/SConscript',
41 ])
42 # XXX: nouveau drivers have a tight dependency on libdrm, so to enable
43 # we need some version logic before we enable them. Also, ATM there is
44 # no nouveau target in scons
45 # if env['drm_nouveau']:
46 # SConscript([
47 # 'drivers/nouveau/SConscript',
48 # 'drivers/nv50/SConscript',
49 # 'drivers/nvc0/SConscript',
50 # 'drivers/nvfx/SConscript',
51 # ])
52
53 #
54 # State trackers
55 #
56
57 # Needed by some state trackers
58 SConscript('winsys/sw/null/SConscript')
59
60 if not env['embedded']:
61 SConscript('state_trackers/vega/SConscript')
62 if env['platform'] not in ['darwin', 'haiku']:
63 SConscript('state_trackers/egl/SConscript')
64
65 if env['x11']:
66 SConscript('state_trackers/glx/xlib/SConscript')
67
68 if env['dri']:
69 SConscript('state_trackers/dri/SConscript')
70
71 if env['dri'] and env['xorg']:
72 SConscript('state_trackers/xorg/SConscript')
73
74 if env['platform'] == 'windows':
75 SConscript('state_trackers/wgl/SConscript')
76
77 #
78 # Winsys
79 #
80
81 SConscript('winsys/SConscript')
82
83 #
84 # Targets
85 #
86
87 SConscript([
88 'targets/graw-null/SConscript',
89 ])
90
91 if not env['embedded']:
92 if env['platform'] not in ['darwin', 'haiku']:
93 SConscript([
94 'targets/egl-static/SConscript'
95 ])
96
97 if env['x11']:
98 SConscript([
99 'targets/graw-xlib/SConscript',
100 'targets/libgl-xlib/SConscript',
101 ])
102
103 if env['platform'] == 'windows':
104 SConscript([
105 'targets/graw-gdi/SConscript',
106 'targets/libgl-gdi/SConscript',
107 ])
108
109 if env['dri']:
110 SConscript([
111 'targets/SConscript.dri',
112 'targets/dri-swrast/SConscript',
113 'targets/dri-vmwgfx/SConscript',
114 #'targets/dri-nouveau/SConscript',
115 ])
116 if env['drm_intel']:
117 SConscript([
118 'targets/dri-i915/SConscript',
119 ])
120 if env['drm_radeon']:
121 SConscript([
122 'targets/dri-r300/SConscript',
123 'targets/dri-r600/SConscript',
124 ])
125
126 if env['xorg'] and env['drm']:
127 SConscript([
128 #'targets/xorg-i915/SConscript',
129 #'targets/xorg-nouveau/SConscript',
130 #'targets/xorg-radeon/SConscript',
131 ])
132
133
134 #
135 # Unit tests & tools
136 #
137
138 if not env['embedded']:
139 SConscript('tests/unit/SConscript')
140 SConscript('tests/graw/SConscript')