r300g: import the last bits of libdrm and cleanup the whole thing
[mesa.git] / src / gallium / targets / egl-static / SConscript
1 #######################################################################
2 # SConscript for egl-static target
3
4 Import('*')
5
6 env = env.Clone()
7
8 env.Append(CPPPATH = [
9 '#/include',
10 '#/src/egl/main',
11 '#/src/gallium/auxiliary',
12 '#/src/gallium/drivers',
13 '#/src/gallium/include',
14 '#/src/gallium/winsys',
15 '#/src/gallium/state_trackers/egl',
16 '#/src/gallium/state_trackers/vega',
17 '#/src/mesa',
18 ])
19
20 env.Append(CPPDEFINES = [
21 'GALLIUM_SOFTPIPE',
22 'GALLIUM_RBUG',
23 'GALLIUM_TRACE',
24 'GALLIUM_GALAHAD',
25 '_EGL_MAIN=_eglBuiltInDriverGALLIUM',
26 ])
27
28 env.Prepend(LIBS = [
29 softpipe,
30 rbug,
31 trace,
32 galahad,
33 gallium,
34 egl,
35 st_egl,
36 ])
37
38 if env['llvm']:
39 env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
40 env.Prepend(LIBS = [llvmpipe])
41
42 sources = [
43 'egl.c',
44 'egl_pipe.c',
45 'egl_st.c',
46 ]
47
48 if env['platform'] == 'windows':
49 sources.append('#src/egl/main/egl.def')
50
51 env.Append(LIBS = [
52 'gdi32',
53 'user32',
54 'kernel32',
55 'ws2_32',
56 ])
57
58 env.Prepend(LIBS = [
59 ws_gdi,
60 ])
61
62 # OpenGL ES and OpenGL
63 if env['gles']:
64 env.Append(CPPDEFINES = [
65 'FEATURE_GL=1',
66 'FEATURE_ES1=1',
67 'FEATURE_ES2=1'
68 ])
69 env.Prepend(LIBPATH = [shared_glapi.dir])
70 # manually add LIBPREFIX on windows
71 glapi_name = 'glapi' if env['platform'] != 'windows' else 'libglapi'
72 env.Prepend(LIBS = [glapi_name, glsl, mesa])
73
74 # OpenVG
75 if True:
76 env.Append(CPPDEFINES = ['FEATURE_VG=1'])
77 env.Prepend(LIBPATH = [openvg.dir])
78 # manually add LIBPREFIX on windows
79 openvg_name = 'OpenVG' if env['platform'] != 'windows' else 'libOpenVG'
80 env.Prepend(LIBS = [openvg_name, st_vega])
81
82 if env['x11']:
83 env.Prepend(LIBS = [
84 ws_xlib,
85 env['X11_LIBS'],
86 ])
87
88 if env['dri']:
89 env.ParseConfig('pkg-config --cflags --libs xfixes')
90
91 # pipe drivers
92 if env['drm']:
93 env.ParseConfig('pkg-config --cflags --libs libdrm')
94
95 if env['drm_intel']:
96 env.ParseConfig('pkg-config --cflags --libs libdrm_intel')
97 env.Append(CPPDEFINES = ['_EGL_PIPE_I915', '_EGL_PIPE_I965'])
98 env.Prepend(LIBS = [
99 i915drm,
100 i915,
101 i965drm,
102 i965,
103 ws_wrapper,
104 ])
105
106 if env['drm_radeon']:
107 env.Append(CPPDEFINES = ['_EGL_PIPE_R300', '_EGL_PIPE_R600'])
108 env.Prepend(LIBS = [
109 radeonwinsys,
110 r300,
111 r600winsys,
112 r600,
113 ])
114
115 env.Append(CPPDEFINES = ['_EGL_PIPE_VMWGFX'])
116 env.Prepend(LIBS = [
117 svgadrm,
118 svga,
119 ])
120
121 # libEGL.dll
122 env['LIBPREFIX'] = 'lib'
123 env['SHLIBPREFIX'] = 'lib'
124
125 egl_gallium = env.SharedLibrary(
126 target ='EGL',
127 source = sources,
128 )
129
130 env.Depends(egl_gallium, [openvg])
131
132 egl_gallium = env.InstallSharedLibrary(egl_gallium, version=(1, 4, 0))
133
134 env.Alias('egl-gallium', egl_gallium)