Skip to content

Commit

Permalink
Do not use a separate build dir for build
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed May 13, 2016
1 parent 8c65a9c commit 899196f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
17 changes: 7 additions & 10 deletions avrdude-6.3.build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

mkdir -p objdir
cd objdir
PREFIX=`pwd`
cd -

if [[ ! -f avrdude-6.3.tar.gz ]] ;
then
wget http://download.savannah.gnu.org/releases/avrdude/avrdude-6.3.tar.gz
Expand All @@ -26,21 +31,13 @@ cd avrdude-6.3
for p in ../avrdude-6.3-patches/*.patch; do echo Applying $p; patch -p0 < $p; done
autoreconf --force --install
./bootstrap
cd -

mkdir -p objdir
cd objdir
PREFIX=`pwd`
cd -

CFLAGS="$CFLAGS -I$PREFIX/include -I$PREFIX/include/libusb-1.0/ -L$PREFIX/lib"
CXXFLAGS="$CXXFLAGS -I$PREFIX/include -I$PREFIX/include/libusb-1.0/ -L$PREFIX/lib"
LDFLAGS="$LDFLAGS -I$PREFIX/include -I$PREFIX/include -L$PREFIX/lib"

mkdir -p avrdude-build
cd avrdude-build
CONFARGS="--prefix=$PREFIX --enable-linuxgpio"
CFLAGS="-w -O2 $CFLAGS" CXXFLAGS="-w -O2 $CXXFLAGS" LDFLAGS="-s $LDFLAGS" ../avrdude-6.3/configure $CONFARGS
CFLAGS="-w -O2 $CFLAGS" CXXFLAGS="-w -O2 $CXXFLAGS" LDFLAGS="-s $LDFLAGS" ./configure $CONFARGS

make
make install
cd ..
Expand Down
2 changes: 1 addition & 1 deletion clean.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

rm -rf avrdude avrdude-6.3 libusb-1.0.20 libusb-compat-0.1.5 *-build
rm -rf avrdude avrdude-6.3 libusb-1.0.20 libusb-compat-0.1.5

rm -rf objdir/{info,man,share}

5 changes: 2 additions & 3 deletions libusb-1.0.20.build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ fi

tar xfv libusb-1.0.20.tar.bz2

mkdir -p libusb-1.0.20-build
cd libusb-1.0.20-build
cd libusb-1.0.20
CONFARGS="--prefix=$PREFIX --disable-udev --enable-static --enable-shared"
CFLAGS="-w -O2 $CFLAGS" CXXFLAGS="-w -O2 $CXXFLAGS" LDFLAGS="-s $LDFLAGS" ../libusb-1.0.20/configure $CONFARGS
CFLAGS="-w -O2 $CFLAGS" CXXFLAGS="-w -O2 $CXXFLAGS" LDFLAGS="-s $LDFLAGS" ./configure $CONFARGS
make -j 1
make install
cd ..
Expand Down
7 changes: 3 additions & 4 deletions libusb-compat-0.1.5.build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,16 @@ then
fi

tar xfv libusb-compat-0.1.5.tar.bz2

cd libusb-compat-0.1.5
if [[ $OS == "Msys" || $OS == "Cygwin" ]] ; then
patch -p1 < ../libusb-compat-0.1.5-patches/01-mingw-build.patch
autoreconf --force --install
fi
cd -

mkdir -p libusb-compat-0.1.5-build
cd libusb-compat-0.1.5-build
CONFARGS="--prefix=$PREFIX --enable-static --enable-shared"
PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig" CFLAGS="-w -O2 $CFLAGS" CXXFLAGS="-w -O2 $CXXFLAGS" LDFLAGS="-s $LDFLAGS" ../libusb-compat-0.1.5/configure $CONFARGS
PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig" CFLAGS="-w -O2 $CFLAGS" CXXFLAGS="-w -O2 $CXXFLAGS" LDFLAGS="-s $LDFLAGS" ./configure $CONFARGS
make -j 1
make install
cd ..

0 comments on commit 899196f

Please sign in to comment.