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