SConscript revision 027ce0c493a85c863df88b43f61aea34bcd4cd58
1Import('*')
2
3env = env.Clone()
4
5env.Prepend(CPPPATH = [
6	'#include',
7	'#include/GL/internal',
8	'#src/mesa',
9	'#src/mapi',
10	'#src/mapi/glapi',
11	#$(LIBDRM_CFLAGS)
12	#$(DRI2PROTO_CFLAGS)
13	#$(GLPROTO_CFLAGS)
14	#$(X11_INCLUDES)
15])
16
17env.Append(CPPDEFINES = [
18    '_REENTRANT',
19    #('DEFAULT_DRIVER_DIR', 'DRI_DRIVER_SEARCH_DIR')
20])
21
22env.Prepend(LIBS = [
23    glapi
24])
25
26env.PkgUseModules('X11')
27env.PkgUseModules('XCB')
28env.PkgUseModules('DRM')
29
30if env['HAVE_XF86VIDMODE']:
31    env.Append(CPPDEFINES = ['XF86VIDMODE'])
32    env.PkgUseModules('XF86VIDMODE')
33
34if False: # XXX: SHARED_GLAPI
35    env.Append(CPPDEFINES = ['GLX_SHARED_GLAPI'])
36
37sources = [
38    'clientattrib.c',
39    'clientinfo.c',
40    'create_context.c',
41    'compsize.c',
42    'eval.c',
43    'glx_error.c',
44    'glxconfig.c',
45    'glxcmds.c',
46    'glxcurrent.c',
47    'glxext.c',
48    'glxextensions.c',
49    'indirect_glx.c',
50    'indirect.c',
51    'indirect_init.c',
52    'indirect_size.c',
53    'indirect_window_pos.c',
54    'indirect_texture_compression.c',
55    'indirect_transpose_matrix.c',
56    'indirect_vertex_array.c',
57    'indirect_vertex_program.c',
58    'pixel.c',
59    'pixelstore.c',
60    'render2.c',
61    'renderpix.c',
62    'single2.c',
63    'singlepix.c',
64    'vertarr.c',
65    'xfont.c',
66    'glx_pbuffer.c',
67    'glx_query.c',
68    'drisw_glx.c',
69    'dri_common.c',
70    'dri_glx.c',
71    'XF86dri.c',
72    'glxhash.c',
73    'dri2_glx.c',
74    'dri2.c',
75    'applegl_glx.c',
76]
77
78libgl = env.SharedLibrary(
79    target ='GL',
80    source = sources,
81)
82
83libgl = env.InstallSharedLibrary(libgl, version=(1, 2))
84
85env.Alias('glx', libgl)
86env.Alias('libgl', libgl)
87