11e6c10f4be9e36cc052a6b47fb2cb1eae60caa00Chia-I Wu#######################################################################
21e6c10f4be9e36cc052a6b47fb2cb1eae60caa00Chia-I Wu# SConscript for EGL
31e6c10f4be9e36cc052a6b47fb2cb1eae60caa00Chia-I Wu
41e6c10f4be9e36cc052a6b47fb2cb1eae60caa00Chia-I Wu
51e6c10f4be9e36cc052a6b47fb2cb1eae60caa00Chia-I WuImport('*')
61e6c10f4be9e36cc052a6b47fb2cb1eae60caa00Chia-I Wu
7601498ae73e654c2de997ea75075613a694d604dJosé Fonsecaenv = env.Clone()
8601498ae73e654c2de997ea75075613a694d604dJosé Fonseca
9601498ae73e654c2de997ea75075613a694d604dJosé Fonsecaenv.Append(CPPDEFINES = [
10a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu    '_EGL_BUILT_IN_DRIVER_GALLIUM',
11601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    '_EGL_DRIVER_SEARCH_DIR=\\"\\"',
12601498ae73e654c2de997ea75075613a694d604dJosé Fonseca])
13601498ae73e654c2de997ea75075613a694d604dJosé Fonseca
14a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wuif env['platform'] == 'windows':
15a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu    env.Append(CPPDEFINES = [
16a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu        '_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_WINDOWS',
17a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu        '_EGL_OS_WINDOWS',
18a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu        '_EGL_GET_CORE_ADDRESSES',
19a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu        'KHRONOS_DLL_EXPORTS',
20a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu    ])
21a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wuelse:
22a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu    env.Append(CPPDEFINES = [
23a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu        '_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11',
24a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu        '_EGL_OS_UNIX',
25a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu    ])
26a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu
27601498ae73e654c2de997ea75075613a694d604dJosé Fonsecaenv.Append(CPPPATH = [
28601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    '#/include',
29601498ae73e654c2de997ea75075613a694d604dJosé Fonseca])
30601498ae73e654c2de997ea75075613a694d604dJosé Fonseca
31601498ae73e654c2de997ea75075613a694d604dJosé Fonsecaegl_sources = [
32601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglapi.c',
33601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglarray.c',
34601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglconfig.c',
35601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglcontext.c',
36601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglcurrent.c',
37601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'egldisplay.c',
38601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'egldriver.c',
39601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglfallbacks.c',
40601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglglobals.c',
41601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglimage.c',
42601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'egllog.c',
43601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglmisc.c',
44601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglmode.c',
45601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglscreen.c',
46601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglstring.c',
47601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglsurface.c',
48601498ae73e654c2de997ea75075613a694d604dJosé Fonseca    'eglsync.c',
49601498ae73e654c2de997ea75075613a694d604dJosé Fonseca]
50601498ae73e654c2de997ea75075613a694d604dJosé Fonseca
51a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wuegl = env.ConvenienceLibrary(
52a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu    target = 'egl',
53a8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3Chia-I Wu    source = egl_sources,
54601498ae73e654c2de997ea75075613a694d604dJosé Fonseca)
55601498ae73e654c2de997ea75075613a694d604dJosé Fonseca
56601498ae73e654c2de997ea75075613a694d604dJosé FonsecaExport('egl')
57