mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-023e78b4d7e9f8666cf09dbd218bd71266853da3 / contrib / loader.sh
blob7a4843569661d48452c80d059f4e4eb8555b705b
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/loader_dri3_helper.c \
10 #-------------------------------------------------------------------------------
11 for src_pathname in $loader_c_pathnames
13 cpp_filename=$(basename $src_pathname .c).cpp.c
14 printf "CPP $src_pathname --> $build_dir/src/loader/$cpp_filename\n"
15 $cpp $src_pathname -o $build_dir/src/loader/$cpp_filename \
16 -DUSE_DRICONF=1 \
17 -DDEFAULT_DRIVER_DIR=\"$dri_driver_search_dir\" \
19 -I$cc_internal_fixed_incdir \
20 -I$cc_internal_incdir \
21 -I$linux_incdir \
22 -I$syslib_incdir \
24 -I$build_dir/src/util \
25 -I$src_dir/src/util \
26 -I$build_dir/src/loader \
27 -I$src_dir/src/loader \
28 -I$build_dir/src \
29 -I$src_dir/src \
30 -I$build_dir/include \
31 -I$src_dir/include \
33 $syslib_cpp_flags_defs \
34 $linux_cpp_flags_defs \
35 $cc_builtins_cpp_flags_defs \
36 $cc_attributes_cpp_flags_defs \
37 $mesa_cpp_flags_defs \
39 $external_deps_cpp_flags &
40 done
41 #-------------------------------------------------------------------------------
42 wait
43 #------------------------------------------------------------------------------
44 for src_pathname in $loader_c_pathnames
46 cpp_filename=$(basename $src_pathname .c).cpp.c
47 asm_filename=$(basename $src_pathname .c).cpp.c.s
48 printf "CC_S $build_dir/src/loader/$cpp_filename --> $build_dir/src/loader/$asm_filename\n"
49 $cc_s $build_dir/src/loader/$cpp_filename -o $build_dir/src/loader/$asm_filename &
50 done
51 #------------------------------------------------------------------------------
52 wait
53 #------------------------------------------------------------------------------
54 for src_pathname in $loader_c_pathnames
56 asm_filename=$(basename $src_pathname .c).cpp.c.s
57 o_filename=$(basename $src_pathname .c).cpp.c.s.o
58 printf "AS $build_dir/src/loader/$asm_filename --> $build_dir/src/loader/$o_filename\n"
59 $as $build_dir/src/loader/$asm_filename -o $build_dir/src/loader/$o_filename &
60 done
61 #------------------------------------------------------------------------------
62 wait
63 #------------------------------------------------------------------------------
64 # this is for a loader on x11/dri platform to go in the generic loader archive
65 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"
66 $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 &
67 #------------------------------------------------------------------------------
68 # this is for a loader on x11/(dri level 3) platform
69 printf "AR RCS $build_dir/libloader_dri3_helper.a $build_dir/src/loader/loader_dri3_helper.cpp.c.s.o\n"
70 $ar_rcs $build_dir/libloader_dri3_helper.a $build_dir/src/loader/loader_dri3_helper.cpp.c.s.o
71 #------------------------------------------------------------------------------
72 wait
73 #===============================================================================
74 echo "<--loader components built"