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 if env['HAVE_DRM_RADEON']: 102 env.PkgUseModules('DRM_RADEON') 103 env.Append(CPPDEFINES = ['_EGL_PIPE_R300', '_EGL_PIPE_R600']) 104 env.Prepend(LIBS = [ 105 radeonwinsys, 106 r300, 107 r600, 108 ]) 109 110 env.Append(CPPDEFINES = ['_EGL_PIPE_VMWGFX']) 111 env.Prepend(LIBS = [ 112 svgadrm, 113 svga, 114 ]) 115 116 # libEGL.dll 117 env['LIBPREFIX'] = 'lib' 118 env['SHLIBPREFIX'] = 'lib' 119 120 egl_gallium = env.SharedLibrary( 121 target ='EGL', 122 source = sources, 123 ) 124 125 env.Depends(egl_gallium, [openvg]) 126 127 egl_gallium = env.InstallSharedLibrary(egl_gallium, version=(1, 4, 0)) 128 129 env.Alias('egl-gallium', egl_gallium) 130