mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-e14d1f5bc0a0579e8a9934c96a6ca22646da06ac / contrib / loader.sh
blob220a9c1e803fca248c0a5227351ecc3defc8e180
1 echo "building loader components-->"
2 #===============================================================================
3 mkdir -p $build_dir/src/loader
4 #-------------------------------------------------------------------------------
5 loader_c_pathnames="\
6 $src_dir/src/loader/loader.c \
7 $src_dir/src/loader/loader_dri_helper.c \
8 $src_dir/src/loader_dri3/loader_dri3_helper.c \
9 $src_dir/src/x11/loader_x11.c \
11 #-------------------------------------------------------------------------------
12 for src_pathname in $loader_c_pathnames
14 cpp_filename=$(basename $src_pathname .c).cpp.c
15 printf "CPP $src_pathname --> $build_dir/src/loader/$cpp_filename\n"
16 $cpp $src_pathname -o $build_dir/src/loader/$cpp_filename \
17 -DUSE_DRICONF=1 \
18 -DDEFAULT_DRIVER_DIR=\"$dri_driver_search_dir\" \
20 -I$cc_internal_fixed_incdir \
21 -I$cc_internal_incdir \
22 -I$linux_incdir \
23 -I$syslib_incdir \
25 -I$build_dir/src/gallium/frontends/dri \
26 -I$src_dir/src/gallium/frontends/dri \
27 -I$build_dir/src/gallium/include \
28 -I$src_dir/src/gallium/include \
29 -I$build_dir/src/mesa \
30 -I$src_dir/src/mesa \
31 -I$build_dir/src/util \
32 -I$src_dir/src/util \
33 -I$build_dir/src/loader_dri3 \
34 -I$src_dir/src/loader_dri3 \
35 -I$build_dir/src/loader \
36 -I$src_dir/src/loader \
37 -I$build_dir/src \
38 -I$src_dir/src \
39 -I$build_dir/include \
40 -I$src_dir/include \
42 $syslib_cpp_flags_defs \
43 $linux_cpp_flags_defs \
44 $cc_builtins_cpp_flags_defs \
45 $cc_attributes_cpp_flags_defs \
46 $mesa_cpp_flags_defs \
48 $external_deps_cpp_flags &
49 done
50 #-------------------------------------------------------------------------------
51 wait
52 #------------------------------------------------------------------------------
53 for src_pathname in $loader_c_pathnames
55 cpp_filename=$(basename $src_pathname .c).cpp.c
56 asm_filename=$(basename $src_pathname .c).cpp.c.s
57 printf "CC_S $build_dir/src/loader/$cpp_filename --> $build_dir/src/loader/$asm_filename\n"
58 $cc_s $build_dir/src/loader/$cpp_filename -o $build_dir/src/loader/$asm_filename &
59 done
60 #------------------------------------------------------------------------------
61 wait
62 #------------------------------------------------------------------------------
63 for src_pathname in $loader_c_pathnames
65 asm_filename=$(basename $src_pathname .c).cpp.c.s
66 o_filename=$(basename $src_pathname .c).cpp.c.s.o
67 printf "AS $build_dir/src/loader/$asm_filename --> $build_dir/src/loader/$o_filename\n"
68 $as $build_dir/src/loader/$asm_filename -o $build_dir/src/loader/$o_filename &
69 done
70 #------------------------------------------------------------------------------
71 wait
72 #------------------------------------------------------------------------------
73 # this is for a loader on x11/dri platform to go in the generic loader archive
74 printf "AR RCS $build_dir/libloader.a $build_dir/src/loader/loader.cpp.c.s.o $build_dir/src/loader/loader_dri_helper.cpp.c.s.o\n"
75 $ar_rcs $build_dir/libloader.a $build_dir/src/loader/loader.cpp.c.s.o $build_dir/src/loader/loader_dri_helper.cpp.c.s.o &
76 #------------------------------------------------------------------------------
77 # this is for a loader on x11/(dri level 3) platform
78 printf "AR RCS $build_dir/libloader_dri3_helper.a $build_dir/src/loader/loader_dri3_helper.cpp.c.s.o\n"
79 $ar_rcs $build_dir/libloader_dri3_helper.a $build_dir/src/loader/loader_dri3_helper.cpp.c.s.o
80 #------------------------------------------------------------------------------
81 printf "AR RCS $build_dir/libloader_x11.a $build_dir/src/loader/loader_x11.cpp.c.s.o\n"
82 $ar_rcs $build_dir/libloader_x11.a $build_dir/src/loader/loader_x11.cpp.c.s.o
83 #------------------------------------------------------------------------------
84 wait
85 #===============================================================================
86 echo "<--loader components built"