@@ -4,13 +4,18 @@ export PREFIX=/opt/lib/${CROSS_COMPILE}
44
55if [ x$CROSS_COMPILER == x ]; then
66CROSS_COMPILER=${CROSS_COMPILE} -gcc
7+ CROSS_COMPILER_CXX=${CROSS_COMPILE} -g++
78else
89export CC=$CROSS_COMPILER
910export CXX=$CROSS_COMPILER ++
11+ CROSS_COMPILER=$CC
12+ CROSS_COMPILER_CXX=$CXX
1013fi
1114cd /opt/lib/libusb-1.0.20
1215export LIBUSB_DIR=` pwd`
1316./configure --prefix=${PREFIX} --disable-udev --enable-static --disable-shared --host=${CROSS_COMPILE}
17+ make distclean
18+ ./configure --prefix=${PREFIX} --disable-udev --enable-static --disable-shared --host=${CROSS_COMPILE}
1419make
1520make install
1621
3338 cd /opt/lib/libusb-compat-0.1.5
3439 export LIBUSB0_DIR=` pwd`
3540 PKG_CONFIG_PATH=" $PREFIX /lib/pkgconfig" ./configure --prefix=${PREFIX} --enable-static --disable-shared --host=${CROSS_COMPILE}
41+ make distclean
42+ PKG_CONFIG_PATH=" $PREFIX /lib/pkgconfig" ./configure --prefix=${PREFIX} --enable-static --disable-shared --host=${CROSS_COMPILE}
3643 make
3744 make install
3845fi
@@ -46,13 +53,15 @@ if [[ $CROSS_COMPILE == "i686-w64-mingw32" ]] ; then
4653 CMAKE_EXTRA_FLAG=" $CMAKE_EXTRA_FLAG -DCMAKE_TOOLCHAIN_FILE=./cmake/Toolchain-i686-w64-mingw32.cmake"
4754fi
4855
49- cmake -DCMAKE_INSTALL_PREFIX=" $PREFIX " $CMAKE_EXTRA_FLAG -DLIBUSB_INCLUDE_DIR=" $PREFIX /include/libusb-1.0" -DLIBFTDI_LIBRARY_DIRS=" $PREFIX /lib" -DLIBUSB_LIBRARIES=" usb-1.0" ../
56+ cmake -DCMAKE_C_COMPILER= $CROSS_COMPILER -DCMAKE_CXX_COMPILER= $CROSS_COMPILER_CXX - DCMAKE_INSTALL_PREFIX=" $PREFIX " $CMAKE_EXTRA_FLAG -DLIBUSB_INCLUDE_DIR=" $PREFIX /include/libusb-1.0" -DLIBFTDI_LIBRARY_DIRS=" $PREFIX /lib" -DLIBUSB_LIBRARIES=" usb-1.0" ../
5057make
5158make install
5259
5360cd /opt/lib/libelf-0.8.13
5461export LIBELF_DIR=` pwd`
5562./configure --disable-shared --host=$CROSS_COMPILE --prefix=${PREFIX}
63+ make distclean
64+ ./configure --disable-shared --host=$CROSS_COMPILE --prefix=${PREFIX}
5665make
5766make install
5867
@@ -65,20 +74,27 @@ export CPPFLAGS="-P"
6574cd /opt/lib/ncurses-5.9
6675export NCURSES_DIR=` pwd`
6776
77+ ./configure $EXTRAFLAGS --disable-shared --without-debug --without-ada --with-termlib --enable-termcap --without-manpages --without-progs --without-tests --host=$CROSS_COMPILE --prefix=${PREFIX}
78+ make distclean
6879./configure $EXTRAFLAGS --disable-shared --without-debug --without-ada --with-termlib --enable-termcap --without-manpages --without-progs --without-tests --host=$CROSS_COMPILE --prefix=${PREFIX}
6980make
7081make install.libs
7182
7283cd /opt/lib/readline-8.0
7384export READLINE_DIR=` pwd`
7485./configure --prefix=$PREFIX --disable-shared --host=$CROSS_COMPILE
86+ make distclean
87+ ./configure --prefix=$PREFIX --disable-shared --host=$CROSS_COMPILE
7588make
7689make install-static
7790
7891if [[ $CROSS_COMPILE != " i686-w64-mingw32" && $CROSS_COMPILE != " x86_64-apple-darwin13" ]] ; then
7992cd /opt/lib/eudev-3.2.10
8093./autogen.sh
8194./configure --enable-static --disable-gudev --disable-introspection --disable-shared --disable-blkid --disable-kmod --disable-manpages --prefix=$PREFIX --host=${CROSS_COMPILE}
95+ make distclean
96+ ./autogen.sh
97+ ./configure --enable-static --disable-gudev --disable-introspection --disable-shared --disable-blkid --disable-kmod --disable-manpages --prefix=$PREFIX --host=${CROSS_COMPILE}
8298make
8399make install
84100fi
@@ -87,5 +103,8 @@ cd /opt/lib/hidapi
87103export PKG_CONFIG_PATH=$PREFIX /lib/pkgconfig
88104./bootstrap
89105./configure --prefix=$PREFIX --enable-static --disable-shared --host=$CROSS_COMPILE
106+ make distclean
107+ ./bootstrap
108+ ./configure --prefix=$PREFIX --enable-static --disable-shared --host=$CROSS_COMPILE
90109make
91110make install
0 commit comments