1 # client libglvnd glx provider, direct rendering mode with dri
2 echo "building client libglvnd glx provider components-->"
3 #===============================================================================
4 mkdir
-p $build_dir/src
/glx
5 #-------------------------------------------------------------------------------
6 # filenames should be different since we build in one directory
8 $build_dir/src/mapi/glapi/indirect.c \
9 $build_dir/src/mapi/glapi/indirect_init.c \
10 $build_dir/src/mapi/glapi/indirect_size.c \
12 $src_dir/src/glx/glxglvnd.c \
13 $src_dir/src/glx/g_glxglvnddispatchfuncs.c \
15 $src_dir/src/glx/clientattrib.c \
16 $src_dir/src/glx/clientinfo.c \
17 $src_dir/src/glx/compsize.c \
18 $src_dir/src/glx/create_context.c \
19 $src_dir/src/glx/eval.c \
20 $src_dir/src/glx/glx_error.c \
21 $src_dir/src/glx/glx_pbuffer.c \
22 $src_dir/src/glx/glx_query.c \
23 $src_dir/src/glx/glxcmds.c \
24 $src_dir/src/glx/glxconfig.c \
25 $src_dir/src/glx/glxcurrent.c \
26 $src_dir/src/glx/glxext.c \
27 $src_dir/src/glx/glxextensions.c \
28 $src_dir/src/glx/glxhash.c \
29 $src_dir/src/glx/indirect_glx.c \
30 $src_dir/src/glx/indirect_texture_compression.c \
31 $src_dir/src/glx/indirect_transpose_matrix.c \
32 $src_dir/src/glx/indirect_vertex_array.c \
33 $src_dir/src/glx/indirect_vertex_program.c \
34 $src_dir/src/glx/indirect_window_pos.c \
35 $src_dir/src/glx/pixel.c \
36 $src_dir/src/glx/pixelstore.c \
37 $src_dir/src/glx/query_renderer.c \
38 $src_dir/src/glx/render2.c \
39 $src_dir/src/glx/renderpix.c \
40 $src_dir/src/glx/single2.c \
41 $src_dir/src/glx/singlepix.c \
42 $src_dir/src/glx/vertarr.c \
43 $src_dir/src/glx/dri_common.c \
44 $src_dir/src/glx/dri_common_query_renderer.c \
45 $src_dir/src/glx/dri_common_interop.c \
46 $src_dir/src/glx/xfont.c \
47 $src_dir/src/glx/drisw_glx.c \
48 $src_dir/src/glx/dri2.c \
49 $src_dir/src/glx/dri2_glx.c \
50 $src_dir/src/glx/dri3_glx.c \
52 #-------------------------------------------------------------------------------
53 for src_pathname
in $libglx_c_pathnames
55 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
56 printf "CPP $src_pathname --> $build_dir/src/glx/$cpp_filename\n"
57 $cpp $src_pathname -o $build_dir/src
/glx
/$cpp_filename \
59 -DGL_LIB_NAME=\"libGLX_mesa.so
.0.0.0\" \
61 -I$cc_internal_fixed_incdir \
62 -I$cc_internal_incdir \
66 -I$build_dir/src
/mapi
/glapi \
67 -I$src_dir/src
/mapi
/glapi \
68 -I$build_dir/src
/glx \
70 -I$build_dir/src
/loader \
71 -I$src_dir/src
/loader \
74 -I$build_dir/include
/GL
/internal \
75 -I$src_dir/include
/GL
/internal \
76 -I$build_dir/include \
79 $syslib_cpp_flags_defs \
80 $linux_cpp_flags_defs \
81 $cc_builtins_cpp_flags_defs \
82 $cc_attributes_cpp_flags_defs \
83 $mesa_cpp_flags_defs \
85 $external_deps_cpp_flags &
87 #-------------------------------------------------------------------------------
89 #------------------------------------------------------------------------------
90 for src_pathname
in $libglx_c_pathnames
92 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
93 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
94 printf "CC_S $build_dir/src/glx/$cpp_filename --> $build_dir/src/glx/$asm_filename\n"
95 $cc_s $build_dir/src
/glx
/$cpp_filename -o $build_dir/src
/glx
/$asm_filename &
97 #------------------------------------------------------------------------------
99 #------------------------------------------------------------------------------
101 for src_pathname
in $libglx_c_pathnames
103 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
104 o_filename
=$
(basename $src_pathname .c
).cpp.c.s.o
105 os
="$os $build_dir/src/glx/$o_filename"
106 printf "AS $build_dir/src/glx/$asm_filename --> $build_dir/src/glx/$o_filename\n"
107 $as $build_dir/src
/glx
/$asm_filename -o $build_dir/src
/glx
/$o_filename &
109 #------------------------------------------------------------------------------
111 #------------------------------------------------------------------------------
112 printf "AR RCS $build_dir/libglx.a $os\n"
113 $ar_rcs $build_dir/libglx.a
$os
114 #===============================================================================
115 # This is the client shared lib, which does routing among the enabled GL
116 # related APIs and hardware drivers (in our case, hardware supported by
117 # gallium drivers). For the glx API, it deals with indirect/direct rendering
120 $build_dir/install_root
$libdir \
121 $build_dir/install_root
$libdir_store
122 #-------------------------------------------------------------------------------
123 # XXX: if some c++ were pulled in, it is not using the c++ runtime.
124 printf "BINUTILS LD $build_dir/install_root$libdir_store/libGLX_mesa.so.0.0.0\n"
125 $binutils_ld -o $build_dir/install_root
$libdir_store/libGLX_mesa.so
.0.0.0 \
127 -soname=libGLX_mesa.so
.0 \
132 $syslib_ld_slib_start_files \
133 $cc_ld_slib_start_files \
135 $build_dir/libglx.a \
138 $build_dir/libglapi_static.a \
139 $build_dir/libloader_dri3_helper.a \
140 $build_dir/libloader.a \
141 $build_dir/libxmlconfig.a \
142 $build_dir/libmesa_util.a \
145 $build_dir/install_root
$libdir_store/libglapi.so
.0.0.0 \
147 $libx11_xcb_ld_flags \
150 $libxxf86vm_ld_flags \
151 $libxshmfence_ld_flags \
152 $libxfixes_ld_flags \
154 $syslibs_libm_ld_flags \
155 $syslibs_libdl_ld_flags \
156 $syslibs_libpthread_ld_flags \
157 $syslibs_libc_ld_flags \
159 $cc_ld_slib_end_files \
160 $syslib_ld_slib_end_files
161 #-------------------------------------------------------------------------------
162 ln -sTf $libdir_store_virtual/libGLX_mesa.so
.0.0.0 $build_dir/install_root
$libdir/libGLX_mesa.so
.0
163 #===============================================================================
165 $build_dir/install_root
$incdir_store/GL
/internal \
166 $build_dir/install_root
$incdir_store/KHR
168 cp -f $src_dir/include
/KHR
/khrplatform.h
$build_dir/install_root
$incdir_store/KHR
169 cp -f $src_dir/include
/GL
/internal
/dri_interface.h
$build_dir/install_root
$incdir_store/GL
/internal
171 $src_dir/include
/GL
/glcorearb.h \
172 $src_dir/include
/GL
/gl.h \
173 $src_dir/include
/GL
/glext.h \
174 $src_dir/include
/GL
/glx.h \
175 $src_dir/include
/GL
/glxext.h \
176 $build_dir/install_root
$incdir_store/GL
177 #===============================================================================
178 echo "<--client libglvnd glx provider components built"