1 # libglvnd EGL provider for xserver glamor, xorg or xwayland
2 echo "building libglvnd egl provider for dri on drm(kms/gbm/dma-buf) components-->"
3 #===============================================================================
4 mkdir
-p $build_dir/src
/egl
5 #-------------------------------------------------------------------------------
7 $build_dir/src/egl/generate/g_egldispatchstubs.c \
9 $src_dir/src/egl/main/eglapi.c \
10 $src_dir/src/egl/main/eglarray.c \
11 $src_dir/src/egl/main/eglconfig.c \
12 $src_dir/src/egl/main/eglcontext.c \
13 $src_dir/src/egl/main/eglcurrent.c \
14 $src_dir/src/egl/main/eglconfigdebug.c \
15 $src_dir/src/egl/main/egldevice.c \
16 $src_dir/src/egl/main/egldisplay.c \
17 $src_dir/src/egl/main/eglglobals.c \
18 $src_dir/src/egl/main/eglimage.c \
19 $src_dir/src/egl/main/egllog.c \
20 $src_dir/src/egl/main/eglsurface.c \
21 $src_dir/src/egl/main/eglsync.c \
22 $src_dir/src/egl/main/eglglvnd.c \
23 $src_dir/src/egl/main/egldispatchstubs.c \
25 $build_dir/src/egl/drivers/dri2/egl_dri2.c \
27 $src_dir/src/egl/drivers/dri2/platform_surfaceless.c \
28 $src_dir/src/egl/drivers/dri2/platform_drm.c \
29 $src_dir/src/egl/drivers/dri2/platform_device.c \
31 #-------------------------------------------------------------------------------
32 for src_pathname
in $libegl_c_pathnames
34 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
35 printf "CPP $src_pathname --> $build_dir/src/egl/$cpp_filename\n"
36 $cpp $src_pathname -o $build_dir/src
/egl
/$cpp_filename \
37 -DHAVE_DRM_PLATFORM=1 \
38 -D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_DRM \
40 -I$cc_internal_fixed_incdir \
41 -I$cc_internal_incdir \
45 -I$build_dir/src
/gallium
/frontends
/dri \
46 -I$src_dir/src
/gallium
/frontends
/dri \
47 -I$build_dir/src
/gallium
/auxiliary \
48 -I$src_dir/src
/gallium
/auxiliary \
49 -I$build_dir/src
/gallium
/include \
50 -I$src_dir/src
/gallium
/include \
51 -I$build_dir/src
/gbm
/backends
/dri \
52 -I$src_dir/src
/gbm
/backends
/dri \
53 -I$build_dir/src
/gbm
/main \
54 -I$src_dir/src
/gbm
/main \
55 -I$build_dir/src
/loader_dri3 \
56 -I$src_dir/src
/loader_dri3 \
57 -I$build_dir/src
/loader \
58 -I$src_dir/src
/loader \
59 -I$build_dir/src
/egl
/drivers
/dri2 \
60 -I$src_dir/src
/egl
/drivers
/dri2 \
61 -I$build_dir/src
/egl
/main \
62 -I$src_dir/src
/egl
/main \
63 -I$build_dir/src
/egl
/generate \
64 -I$src_dir/src
/egl
/generate \
65 -I$build_dir/src
/mesa \
69 -I$build_dir/include \
72 $syslib_cpp_flags_defs \
73 $linux_cpp_flags_defs \
74 $cc_builtins_cpp_flags_defs \
75 $cc_attributes_cpp_flags_defs \
76 $mesa_cpp_flags_defs \
78 $external_deps_cpp_flags &
80 #-------------------------------------------------------------------------------
82 #-------------------------------------------------------------------------------
83 for src_pathname
in $libegl_c_pathnames
85 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
86 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
87 printf "CC_S $build_dir/src/egl/$cpp_filename --> $build_dir/src/egl/$asm_filename\n"
88 $cc_s $build_dir/src
/egl
/$cpp_filename -o $build_dir/src
/egl
/$asm_filename &
90 #------------------------------------------------------------------------------
92 #------------------------------------------------------------------------------
94 for src_pathname
in $libegl_c_pathnames
96 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
97 o_filename
=$
(basename $src_pathname .c
).cpp.c.s.o
98 os
="$os $build_dir/src/egl/$o_filename"
99 printf "AS $build_dir/src/egl/$asm_filename --> $build_dir/src/egl/$o_filename\n"
100 $as $build_dir/src
/egl
/$asm_filename -o $build_dir/src
/egl
/$o_filename &
102 #------------------------------------------------------------------------------
104 #------------------------------------------------------------------------------
105 printf "AR RCS $build_dir/libegl.a $os\n"
106 $ar_rcs $build_dir/libegl.a
$os
107 #===============================================================================
109 #===============================================================================
111 $build_dir/install_root
$libdir \
112 $build_dir/install_root
$libdir_store
113 #-------------------------------------------------------------------------------
114 # if some c++ code was pulled, it is not using the c++ runtime
115 # TODO: should not use libloader_x11 (unless libloader pulls libloader_x11
116 # implicitely), but should depend on libpipe_loader_dynamic.
117 printf "BINUTILS LD $build_dir/install_root$libdir_store/libEGL_mesa.so.0.0.0\n"
118 $binutils_ld -o $build_dir/install_root
$libdir_store/libEGL_mesa.so
.0.0.0 \
120 -soname=libEGL_mesa.so
.0 \
125 $syslib_ld_slib_start_files \
126 $cc_ld_slib_start_files \
128 $build_dir/libegl.a \
131 $build_dir/libpipe_loader_dynamic.a \
132 $build_dir/libloader.a \
133 $build_dir/libxmlconfig.a \
134 $build_dir/libmesa_util.a \
138 $build_dir/install_root
$libdir_store/libgallium_dri.so \
139 $build_dir/install_root
$libdir_store/libglapi.so
.0.0.0 \
140 $build_dir/install_root
$libdir_store/libgbm.so
.1.0.0 \
142 $syslibs_libm_ld_flags \
143 $syslibs_libdl_ld_flags \
144 $syslibs_libpthread_ld_flags \
145 $syslibs_libc_ld_flags \
147 $cc_ld_slib_end_files \
148 $syslib_ld_slib_end_files
149 #-------------------------------------------------------------------------------
150 ln -sTf $libdir_store_virtual/libEGL_mesa.so
.0.0.0 $build_dir/install_root
$libdir/libEGL_mesa.so
.0
151 #===============================================================================
153 $build_dir/install_root
$datadir/glvnd
/egl_vendor.d \
154 $build_dir/install_root
$datadir_store/glvnd
/egl_vendor.d
155 cat >$build_dir/install_root
$datadir_store/glvnd
/egl_vendor.d
/50_mesa.json
<<EOF
157 "file_format_version" : "1.0.0",
159 "library_path" : "libEGL_mesa.so.0"
163 ln -sTf $datadir_store_virtual/glvnd
/egl_vendor.d
/50_mesa.json
$build_dir/install_root
$datadir/glvnd
/egl_vendor.d
/50_mesa.json
164 #===============================================================================
165 mkdir
-p $build_dir/install_root
$incdir_store/EGL
167 $src_dir/include
/EGL
/eglext.h \
168 $src_dir/include
/EGL
/egl.h \
169 $src_dir/include
/EGL
/eglmesaext.h \
170 $src_dir/include
/EGL
/eglplatform.h \
171 $build_dir/install_root
$incdir_store/EGL
172 #===============================================================================
173 echo "<--libglvnd egl provider for dri on drm(kms/gbm/dma-buf) components"