b4ccc5b805a17ddf2cdd4b78326d17c1aa74d622
[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['HAVE_X11']:
83 env.Prepend(LIBS = [
84 ws_xlib,
85 ])
86 env.PkgUseModules('X11')
87
88 # pipe drivers
89 if env['HAVE_DRM']:
90 env.PkgUseModules('DRM')
91
92 if env['HAVE_DRM_INTEL']:
93 env.PkgUseModules('DRM_INTEL')
94 env.Append(CPPDEFINES = ['_EGL_PIPE_I915'])
95 env.Prepend(LIBS = [
96 i915drm,
97 i915,
98 ws_wrapper,
99 ])
100
101 env.Append(CPPDEFINES = ['_EGL_PIPE_VMWGFX'])
102 env.Prepend(LIBS = [
103 svgadrm,
104 svga,
105 ])
106
107 # libEGL.dll
108 env['LIBPREFIX'] = 'lib'
109 env['SHLIBPREFIX'] = 'lib'
110
111 egl_gallium = env.SharedLibrary(
112 target ='EGL',
113 source = sources,
114 )
115
116 env.Depends(egl_gallium, [openvg])
117
118 egl_gallium = env.InstallSharedLibrary(egl_gallium, version=(1, 4, 0))
119
120 env.Alias('egl-gallium', egl_gallium)