#######################################################################
# SConscript for egl-gdi target

Import('*')

env = env.Clone()

env.Append(CPPPATH = [
        '#/src/gallium/state_trackers/egl',
        '#/src/gallium/state_trackers/vega',
        '#/src/egl/main',
        '#/src/mesa',
])

env.Append(CPPDEFINES = [
        'FEATURE_VG=1',
        'GALLIUM_SOFTPIPE',
        'GALLIUM_RBUG',
        'GALLIUM_TRACE',
])

env.Append(LIBS = [
    'gdi32',
    'user32',
    'kernel32',
    'ws2_32',
])

env.Prepend(LIBS = [
    st_egl_gdi,
    ws_gdi,
    identity,
    trace,
    rbug,
    softpipe,
    vgapi,
    st_vega,
    gallium,
    egl,
])

if env['llvm']:
    env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
    env.Prepend(LIBS = [llvmpipe])

egl_gallium = env.SharedLibrary(
    target ='egl_gallium',
    source = 'egl-static.c',
)

env['no_import_lib'] = 1

egl_gdi = env.InstallSharedLibrary(egl_gallium)

env.Alias('egl-gdi', egl_gdi)
