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.
20 if test -f $build_dir/local_conf.sh
; then
21 .
$build_dir/local_conf.sh
24 #===================================================================================================
25 if test "${cpp-unset}" = unset; then
28 #===================================================================================================
29 if test "${slib_cc-unset}" = unset; then
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
38 #===================================================================================================
39 if test "${slib_binutils_ld-unset}" = unset; then
40 slib_binutils_ld
=false
42 if test "${readelf-unset}" = unset; then
45 #===================================================================================================
46 if test "${xorgproto_cppflags-unset}" = unset; then
49 #===================================================================================================
50 # It wants pixman, libpciaccess, headers
51 if test "${xserver_cppflags-unset}" = unset; then
54 #===================================================================================================
55 if test "${libudev_cppflags-unset}" = unset; then
58 if test "${libudev_ldflags-unset}" = unset; then
61 #===================================================================================================
62 if test "${mtdev_cppflags-unset}" = unset; then
65 if test "${mtdev_ldflags-unset}" = unset; then
68 #===================================================================================================
69 if test "${libevdev_cppflags-unset}" = unset; then
72 if test "${libevdev_ldflags-unset}" = unset; then
75 #===================================================================================================
77 if test "${crt_cppflags-unset}" = unset; then
80 if test "${crt_ldflags-unset}" = unset; then
83 if test "${slib_cc_ld_start_files-unset}" = unset; then
86 if test "${slib_cc_ld_end_files-unset}" = unset; then
89 #===================================================================================================
90 # evdev is linux thing
91 if test "${linux_uapi_cppflags-unset}" = unset; then
94 #===================================================================================================
95 if test "${pixman_cppflags-unset}" = unset; then
98 #===================================================================================================
99 if test "${libpciaccess_cppflags-unset}" = unset; then
100 libpciaccess_cppflags
=
102 #===================================================================================================
105 -DPACKAGE_VERSION_MAJOR=2 \
106 -DPACKAGE_VERSION_MINOR=10 \
107 -DPACKAGE_VERSION_PATCHLEVEL=6 \
112 $libpciaccess_cppflags \
113 $xorgproto_cppflags \
117 $linux_uapi_cppflags \
120 -I$build_dir/include \
126 #===================================================================================================
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 &
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 &
156 #===================================================================================================
157 printf "BINUTILS LD $build_dir/evdev_drv.so\n"
160 -o $build_dir/evdev_drv.so \
162 -soname=evdev_drv.so \
163 $crt_ld_start_files \
164 $slib_cc_ld_start_files \
170 $slib_cc_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