File tree Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -36,18 +36,22 @@ CFLAGS="$CFLAGS -I$PREFIX/include -I$PREFIX/include/libusb-1.0/ -L$PREFIX/lib"
3636CXXFLAGS=" $CXXFLAGS -I$PREFIX /include -I$PREFIX /include/libusb-1.0/ -L$PREFIX /lib"
3737LDFLAGS=" $LDFLAGS -I$PREFIX /include -I$PREFIX /include -L$PREFIX /lib"
3838CONFARGS=" --prefix=$PREFIX --enable-linuxgpio"
39+ if [[ $CROSS_COMPILE != " " ]] ; then
40+ CONFARGS=" $CONFARGS --host=$CROSS_COMPILE_HOST "
41+ fi
3942CFLAGS=" -w -O2 $CFLAGS " CXXFLAGS=" -w -O2 $CXXFLAGS " LDFLAGS=" -s $LDFLAGS " ./configure $CONFARGS
4043
4144make
4245make install
4346cd ..
4447
45- if [ ` uname -s ` == " Linux" ] || [ ` uname -s ` == " Darwin" ]
48+ if [[ $TARGET_OS == " GNU/ Linux" || $TARGET_OS == " Darwin" ] ]
4649then
4750 mv objdir/bin/avrdude objdir/bin/avrdude_bin
4851 cp avrdude-6.3-files/avrdude objdir/bin/
49- if [ ` uname -s ` == " Darwin" ]
52+ if [[ $TARGET_OS == " Darwin" ] ]
5053 then
5154 sed -i ' ' ' s/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH/g' objdir/bin/avrdude
5255 fi
5356fi
57+
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ tar xfv libusb-1.0.20.tar.bz2
2929
3030cd libusb-1.0.20
3131CONFARGS=" --prefix=$PREFIX --disable-udev --enable-static --enable-shared"
32+ if [[ $CROSS_COMPILE != " " ]] ; then
33+ CONFARGS=" $CONFARGS --host=$CROSS_COMPILE_HOST "
34+ fi
3235CFLAGS=" -w -O2 $CFLAGS " CXXFLAGS=" -w -O2 $CXXFLAGS " LDFLAGS=" -s $LDFLAGS " ./configure $CONFARGS
3336make -j 1
3437make install
Original file line number Diff line number Diff line change 2828tar xfv libusb-compat-0.1.5.tar.bz2
2929
3030cd libusb-compat-0.1.5
31- if [[ $OS == " Msys" || $OS == " Cygwin" ]] ; then
31+ if [[ $OS == " Msys" || $OS == " Cygwin" || $CROSS_COMPILE_HOST == " i686-w64-mingw32 " ]] ; then
3232 patch -p1 < ../libusb-compat-0.1.5-patches/01-mingw-build.patch
3333 autoreconf --force --install
3434fi
3535
3636CONFARGS=" --prefix=$PREFIX --enable-static --enable-shared"
37+ if [[ $CROSS_COMPILE != " " ]] ; then
38+ CONFARGS=" $CONFARGS --host=$CROSS_COMPILE_HOST "
39+ fi
3740PKG_CONFIG_PATH=" $PREFIX /lib/pkgconfig" CFLAGS=" -w -O2 $CFLAGS " CXXFLAGS=" -w -O2 $CXXFLAGS " LDFLAGS=" -s $LDFLAGS " ./configure $CONFARGS
3841make -j 1
3942make install
Original file line number Diff line number Diff line change 1818OUTPUT_VERSION=6.3-arduino
1919
2020export OS=` uname -o || uname`
21+ export TARGET_OS=$OS
2122
22- if [[ $OS == " GNU/Linux" ]] ; then
23+ if [[ $CROSS_COMPILE == " mingw" ]] ; then
24+
25+ export CC=" i686-w64-mingw32-gcc"
26+ export CXX=" i686-w64-mingw32-g++"
27+ export CROSS_COMPILE_HOST=" i686-w64-mingw32"
28+ export TARGET_OS=" Windows"
29+ OUTPUT_TAG=i686-w64-mingw32
30+
31+ elif [[ $OS == " GNU/Linux" ]] ; then
2332
2433 export MACHINE=` uname -m`
2534 if [[ $MACHINE == " x86_64" ]] ; then
You can’t perform that action at this time.
0 commit comments