freetype:update and moved to /usr/lib
[nyanlinux.git] / builders / xf86-input-evdev-b48c2b70283912f2ea664a82d40065aeed5d0900 / contrib / linux-glibc.sh
blob512a17503d59720a6a4771fe57f964669ee6eed4
1 #!/bin/sh
2 version_0=21
3 version_1=1
4 version_2=99
5 version_3=1
6 #===================================================================================================
7 # build dir and src dir
8 build_dir=$(readlink -f .)
9 printf "build_dir=$build_dir\n"
10 # we are in contrib subdir
11 src_dir=$(readlink -f $(dirname $0)/..)
12 printf "src_dir=$src_dir\n"
13 #===================================================================================================
14 # the current configur-able variables may be individually overridden with the
15 # content of the file in $1 or $build_dir/local_conf.sh. Look for "unset" in
16 # those scripts to find what you can override to tune the build.
17 if test -f "$1"; then
18 . "$1"
19 else
20 if test -f $build_dir/local_conf.sh; then
21 . $build_dir/local_conf.sh
24 #===================================================================================================
25 if test "${cpp-unset}" = unset; then
26 cpp=false
28 #===================================================================================================
29 if test "${slib_cc-unset}" = unset; then
30 slib_cc=false
32 if test "${slib_cc_ld_start_files-unset}" = unset; then
33 slib_cc_ld_start_files=
35 if test "${slib_cc_ld_end_files-unset}" = unset; then
36 slib_cc_ld_end_files=
38 #===================================================================================================
39 if test "${slib_binutils_ld-unset}" = unset; then
40 slib_binutils_ld=false
42 if test "${readelf-unset}" = unset; then
43 readelf=
45 #===================================================================================================
46 if test "${xorgproto_cppflags-unset}" = unset; then
47 xorgproto_cppflags=
49 #===================================================================================================
50 # It wants pixman, libpciaccess, headers
51 if test "${xserver_cppflags-unset}" = unset; then
52 xserver_cppflags=
54 #===================================================================================================
55 if test "${libudev_cppflags-unset}" = unset; then
56 libudev_cppflags=
58 if test "${libudev_ldflags-unset}" = unset; then
59 libudev_ldflags=
61 #===================================================================================================
62 if test "${mtdev_cppflags-unset}" = unset; then
63 mtdev_cppflags=
65 if test "${mtdev_ldflags-unset}" = unset; then
66 mtdev_ldflags=
68 #===================================================================================================
69 if test "${libevdev_cppflags-unset}" = unset; then
70 libevdev_cppflags=
72 if test "${libevdev_ldflags-unset}" = unset; then
73 libevdev_ldflags=
75 #===================================================================================================
76 # usually the glibc
77 if test "${crt_cppflags-unset}" = unset; then
78 crt_cppflags=
80 if test "${crt_ldflags-unset}" = unset; then
81 crt_ldflags=
83 if test "${slib_cc_ld_start_files-unset}" = unset; then
84 crt_ld_start_files=
86 if test "${slib_cc_ld_end_files-unset}" = unset; then
87 crt_ld_end_files=
89 #===================================================================================================
90 # evdev is linux thing
91 if test "${linux_uapi_cppflags-unset}" = unset; then
92 linux_uapi_cppflags=
94 #===================================================================================================
95 if test "${pixman_cppflags-unset}" = unset; then
96 pixman_cppflags=
98 #===================================================================================================
99 if test "${libpciaccess_cppflags-unset}" = unset; then
100 libpciaccess_cppflags=
102 #===================================================================================================
103 2.10.6
104 cppflags="\
105 -DPACKAGE_VERSION_MAJOR=2 \
106 -DPACKAGE_VERSION_MINOR=10 \
107 -DPACKAGE_VERSION_PATCHLEVEL=6 \
108 -DHAVE_LIBUDEV \
110 $xserver_cppflags \
111 $pixman_cppflags \
112 $libpciaccess_cppflags \
113 $xorgproto_cppflags \
114 $libudev_cppflags \
115 $mtdev_cppflags \
116 $libevdev_cppflags \
117 $linux_uapi_cppflags \
118 $crt_cppflags \
120 -I$build_dir/include \
121 -I$src_dir/include \
123 -I$build_dir/src \
124 -I$src_dir/src \
126 #===================================================================================================
127 src_c_pathnames="\
128 $src_dir/src/emuMB.c \
129 $src_dir/src/emuThird.c \
130 $src_dir/src/emuWheel.c \
131 $src_dir/src/draglock.c \
132 $src_dir/src/apple.c \
134 $src_dir/src/evdev.c \
136 #===================================================================================================
137 for src_c_pathname in $src_c_pathnames
139 cpp_filename=$(basename $src_c_pathname .c).cpp.c
141 printf "CPP $src_c_pathname-->$build_dir/$cpp_filename\n"
142 $cpp $cppflags $src_c_pathname -o $build_dir/$cpp_filename &
143 done
144 wait
145 #===================================================================================================
146 for src_c_pathname in $src_c_pathnames
148 cpp_filename=$(basename $src_c_pathname .c).cpp.c
149 obj_filename=$(basename $src_c_pathname .c).cpp.c.o
150 objs="$objs $build_dir/$obj_filename"
152 printf "SLIB_CC $build_dir/$cpp_filename-->$build_dir/$obj_filename\n"
153 $slib_cc $build_dir/$cpp_filename -o $build_dir/$obj_filename &
154 done
155 wait
156 #===================================================================================================
157 printf "BINUTILS LD $build_dir/evdev_drv.so\n"
158 $slib_binutils_ld \
159 -shared \
160 -o $build_dir/evdev_drv.so \
161 -s \
162 -soname=evdev_drv.so \
163 $crt_ld_start_files \
164 $slib_cc_ld_start_files \
165 $objs \
166 $libmtdev_ldflags \
167 $libevdev_ldflags \
168 $libudev_ldflags \
169 $crt_ldflags \
170 $slib_cc_ld_end_files \
171 $crt_ld_end_files
172 #---------------------------------------------------------------------------------------------------
173 if test "${readelf-unset}" != unset; then
174 $readelf -a -W $build_dir/evdev_drv.so >$build_dir/evdev_drv.so.re