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 \
56 -I$src_dir/src
/loader \
57 -I$build_dir/src
/egl
/drivers
/dri2 \
58 -I$src_dir/src
/egl
/drivers
/dri2 \
59 -I$build_dir/src
/egl
/main \
60 -I$src_dir/src
/egl
/main \
61 -I$build_dir/src
/egl
/generate \
62 -I$src_dir/src
/egl
/generate \
63 -I$build_dir/src
/mesa \
67 -I$build_dir/include \
70 $syslib_cpp_flags_defs \
71 $linux_cpp_flags_defs \
72 $cc_builtins_cpp_flags_defs \
73 $cc_attributes_cpp_flags_defs \
74 $mesa_cpp_flags_defs \
76 $external_deps_cpp_flags &
78 #-------------------------------------------------------------------------------
80 #-------------------------------------------------------------------------------
81 for src_pathname
in $libegl_c_pathnames
83 cpp_filename
=$
(basename $src_pathname .c
).cpp.c
84 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
85 printf "CC_S $build_dir/src/egl/$cpp_filename --> $build_dir/src/egl/$asm_filename\n"
86 $cc_s $build_dir/src
/egl
/$cpp_filename -o $build_dir/src
/egl
/$asm_filename &
88 #------------------------------------------------------------------------------
90 #------------------------------------------------------------------------------
92 for src_pathname
in $libegl_c_pathnames
94 asm_filename
=$
(basename $src_pathname .c
).cpp.c.s
95 o_filename
=$
(basename $src_pathname .c
).cpp.c.s.o
96 os
="$os $build_dir/src/egl/$o_filename"
97 printf "AS $build_dir/src/egl/$asm_filename --> $build_dir/src/egl/$o_filename\n"
98 $as $build_dir/src
/egl
/$asm_filename -o $build_dir/src
/egl
/$o_filename &
100 #------------------------------------------------------------------------------
102 #------------------------------------------------------------------------------
103 printf "AR RCS $build_dir/libegl.a $os\n"
104 $ar_rcs $build_dir/libegl.a
$os
105 #===============================================================================
107 #===============================================================================
109 $build_dir/install_root
$libdir \
110 $build_dir/install_root
$libdir_store
111 #-------------------------------------------------------------------------------
112 # if some c++ code was pulled, it is not using the c++ runtime
113 printf "BINUTILS LD $build_dir/install_root$libdir_store/libEGL_mesa.so.0.0.0\n"
114 $binutils_ld -o $build_dir/install_root
$libdir_store/libEGL_mesa.so
.0.0.0 \
116 -soname=libEGL_mesa.so
.0 \
121 $syslib_ld_slib_start_files \
122 $cc_ld_slib_start_files \
124 $build_dir/libegl.a \
127 $build_dir/libloader.a \
128 $build_dir/libxmlconfig.a \
129 $build_dir/libmesa_util.a \
132 $build_dir/install_root
$libdir_store/libglapi.so
.0.0.0 \
133 $build_dir/install_root
$libdir_store/libgbm.so
.1.0.0 \
135 $syslibs_libm_ld_flags \
136 $syslibs_libdl_ld_flags \
137 $syslibs_libpthread_ld_flags \
138 $syslibs_libc_ld_flags \
140 $cc_ld_slib_end_files \
141 $syslib_ld_slib_end_files
142 #-------------------------------------------------------------------------------
143 ln -sTf $libdir_store_virtual/libEGL_mesa.so
.0.0.0 $build_dir/install_root
$libdir/libEGL_mesa.so
.0
144 #===============================================================================
146 $build_dir/install_root
$datadir/glvnd
/egl_vendor.d \
147 $build_dir/install_root
$datadir_store/glvnd
/egl_vendor.d
148 cat >$build_dir/install_root
$datadir_store/glvnd
/egl_vendor.d
/50_mesa.json
<<EOF
150 "file_format_version" : "1.0.0",
152 "library_path" : "libEGL_mesa.so.0"
156 ln -sTf $datadir_store_virtual/glvnd
/egl_vendor.d
/50_mesa.json
$build_dir/install_root
$datadir/glvnd
/egl_vendor.d
/50_mesa.json
157 #===============================================================================
158 mkdir
-p $build_dir/install_root
$incdir_store/EGL
160 $src_dir/include
/EGL
/eglext.h \
161 $src_dir/include
/EGL
/egl.h \
162 $src_dir/include
/EGL
/eglmesaext.h \
163 $src_dir/include
/EGL
/eglplatform.h \
164 $build_dir/install_root
$incdir_store/EGL
165 #===============================================================================
166 echo "<--libglvnd egl provider for dri on drm(kms/gbm/dma-buf) components"