mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-c8c354d9c3a2e79230723f1c8b0571b20d034fee / contrib / glx.sh
blob698a0d6b0796f96efc4247c8f8f8cf207b3828c8
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
7 libglx_c_pathnames="\
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/drisw_glx.c \
14 $src_dir/src/glx/g_glxglvnddispatchfuncs.c \
16 $src_dir/src/glx/clientattrib.c \
17 $src_dir/src/glx/clientinfo.c \
18 $src_dir/src/glx/compsize.c \
19 $src_dir/src/glx/create_context.c \
20 $src_dir/src/glx/eval.c \
21 $src_dir/src/glx/glx_error.c \
22 $src_dir/src/glx/glx_pbuffer.c \
23 $src_dir/src/glx/glx_query.c \
24 $src_dir/src/glx/glxcmds.c \
25 $src_dir/src/glx/glxconfig.c \
26 $src_dir/src/glx/glxcurrent.c \
27 $src_dir/src/glx/glxext.c \
28 $src_dir/src/glx/glxextensions.c \
29 $src_dir/src/glx/glxhash.c \
30 $src_dir/src/glx/indirect_glx.c \
31 $src_dir/src/glx/indirect_texture_compression.c \
32 $src_dir/src/glx/indirect_transpose_matrix.c \
33 $src_dir/src/glx/indirect_vertex_array.c \
34 $src_dir/src/glx/indirect_vertex_program.c \
35 $src_dir/src/glx/indirect_window_pos.c \
36 $src_dir/src/glx/pixel.c \
37 $src_dir/src/glx/pixelstore.c \
38 $src_dir/src/glx/query_renderer.c \
39 $src_dir/src/glx/render2.c \
40 $src_dir/src/glx/renderpix.c \
41 $src_dir/src/glx/single2.c \
42 $src_dir/src/glx/singlepix.c \
43 $src_dir/src/glx/vertarr.c \
44 $src_dir/src/glx/dri_common.c \
45 $src_dir/src/glx/dri_common_query_renderer.c \
46 $src_dir/src/glx/xfont.c \
47 $src_dir/src/glx/dri3_glx.c \
49 #-------------------------------------------------------------------------------
50 for src_pathname in $libglx_c_pathnames
52 cpp_filename=$(basename $src_pathname .c).cpp.c
53 printf "CPP $src_pathname --> $build_dir/src/glx/$cpp_filename\n"
54 $cpp $src_pathname -o $build_dir/src/glx/$cpp_filename \
55 -D_REENTRANT=1 \
56 -DGL_LIB_NAME=\"libGLX_mesa.so.0.0.0\" \
58 -I$cc_internal_fixed_incdir \
59 -I$cc_internal_incdir \
60 -I$linux_incdir \
61 -I$syslib_incdir \
63 -I$build_dir/src/gallium/frontends/dri \
64 -I$src_dir/src/gallium/frontends/dri \
65 -I$build_dir/src/gallium/auxiliary \
66 -I$src_dir/src/gallium/auxiliary \
67 -I$build_dir/src/gallium/include \
68 -I$src_dir/src/gallium/include \
69 -I$build_dir/src/mapi/glapi \
70 -I$src_dir/src/mapi/glapi \
71 -I$build_dir/src/glx \
72 -I$src_dir/src/glx \
73 -I$build_dir/src/loader_dri3 \
74 -I$src_dir/src/loader_dri3 \
75 -I$build_dir/src/loader \
76 -I$src_dir/src/loader \
77 -I$build_dir/src/x11 \
78 -I$src_dir/src/x11 \
79 -I$build_dir/src/mesa \
80 -I$src_dir/src/mesa \
81 -I$build_dir/src \
82 -I$src_dir/src \
83 -I$build_dir/include/GL/internal \
84 -I$src_dir/include/GL/internal \
85 -I$build_dir/include \
86 -I$src_dir/include \
88 $syslib_cpp_flags_defs \
89 $linux_cpp_flags_defs \
90 $cc_builtins_cpp_flags_defs \
91 $cc_attributes_cpp_flags_defs \
92 $mesa_cpp_flags_defs \
94 $external_deps_cpp_flags &
95 done
96 #-------------------------------------------------------------------------------
97 wait
98 #------------------------------------------------------------------------------
99 for src_pathname in $libglx_c_pathnames
101 cpp_filename=$(basename $src_pathname .c).cpp.c
102 asm_filename=$(basename $src_pathname .c).cpp.c.s
103 printf "CC_S $build_dir/src/glx/$cpp_filename --> $build_dir/src/glx/$asm_filename\n"
104 $cc_s $build_dir/src/glx/$cpp_filename -o $build_dir/src/glx/$asm_filename &
105 done
106 #------------------------------------------------------------------------------
107 wait
108 #------------------------------------------------------------------------------
110 for src_pathname in $libglx_c_pathnames
112 asm_filename=$(basename $src_pathname .c).cpp.c.s
113 o_filename=$(basename $src_pathname .c).cpp.c.s.o
114 os="$os $build_dir/src/glx/$o_filename"
115 printf "AS $build_dir/src/glx/$asm_filename --> $build_dir/src/glx/$o_filename\n"
116 $as $build_dir/src/glx/$asm_filename -o $build_dir/src/glx/$o_filename &
117 done
118 #------------------------------------------------------------------------------
119 wait
120 #------------------------------------------------------------------------------
121 printf "AR RCS $build_dir/libglx.a $os\n"
122 $ar_rcs $build_dir/libglx.a $os
123 #===============================================================================
124 # This is the client shared lib, which does routing among the enabled GL
125 # related APIs and hardware drivers (in our case, hardware supported by
126 # gallium drivers). For the glx API, it deals with indirect/direct rendering
127 # too.
128 mkdir -p \
129 $build_dir/install_root$libdir \
130 $build_dir/install_root$libdir_store
131 #-------------------------------------------------------------------------------
132 # XXX: if some c++ were pulled in, it is not using the c++ runtime.
133 # TODO:should depends on libpipe_loader_dynamic
134 printf "BINUTILS LD $build_dir/install_root$libdir_store/libGLX_mesa.so.0.0.0\n"
135 $binutils_ld -o $build_dir/install_root$libdir_store/libGLX_mesa.so.0.0.0 \
136 -shared \
137 -soname=libGLX_mesa.so.0 \
138 -Bsymbolic \
139 --no-undefined \
140 --gc-sections \
141 -s \
142 $syslib_ld_slib_start_files \
143 $cc_ld_slib_start_files \
144 --whole-archive \
145 $build_dir/libglx.a \
146 --no-whole-archive \
148 $build_dir/libglapi_static.a \
149 $build_dir/libpipe_loader_dynamic.a \
150 $build_dir/libloader_x11.a \
151 $build_dir/libloader.a \
152 $build_dir/libxmlconfig.a \
153 $build_dir/libmesa_util.a \
155 --as-needed \
156 $build_dir/install_root$libdir_store/libgallium_dri.so \
157 $build_dir/install_root$libdir_store/libglapi.so.0.0.0 \
158 $libx11_ld_flags \
159 $libx11_xcb_ld_flags \
160 $libxcb_ld_flags \
161 $libxext_ld_flags \
162 $libxxf86vm_ld_flags \
163 $libxshmfence_ld_flags \
164 $libxfixes_ld_flags \
165 $libdrm_ld_flags \
166 $syslibs_libm_ld_flags \
167 $syslibs_libdl_ld_flags \
168 $syslibs_libpthread_ld_flags \
169 $syslibs_libc_ld_flags \
170 --no-as-needed \
171 $cc_ld_slib_end_files \
172 $syslib_ld_slib_end_files
173 #-------------------------------------------------------------------------------
174 ln -sTf $libdir_store_virtual/libGLX_mesa.so.0.0.0 $build_dir/install_root$libdir/libGLX_mesa.so.0
175 #===============================================================================
176 mkdir -p \
177 $build_dir/install_root$incdir_store/GL/internal \
178 $build_dir/install_root$incdir_store/KHR
180 cp -f $src_dir/include/KHR/khrplatform.h $build_dir/install_root$incdir_store/KHR
181 cp -f $src_dir/include/GL/internal/dri_interface.h $build_dir/install_root$incdir_store/GL/internal
182 cp -f \
183 $src_dir/include/GL/glcorearb.h \
184 $src_dir/include/GL/gl.h \
185 $src_dir/include/GL/glext.h \
186 $src_dir/include/GL/glx.h \
187 $src_dir/include/GL/glxext.h \
188 $build_dir/install_root$incdir_store/GL
189 #===============================================================================
190 echo "<--client libglvnd glx provider components built"