12 # Override source directory
13 SRCDIR
=$SRCDIR/..
/src
/binutils
14 TARGET
=microblaze-xilinx-elf
15 SYSROOT
=$RELDIR/$TARGET
16 BLDDIR
=$BLDDIR/bld_bin
19 DESC
="Build\t\t: binutils-$BINVER"
22 echo -e "Target\t\t: $TARGET"
23 echo -e "CWD\t\t: $CURDIR"
24 echo -e "CFLAGS\t\t: $CFLAGS"
25 echo -e "Version String\t: $TOOL_VERSION"
26 echo -e "Platform\t: $PLATFORM"
27 echo -e "Build started\t: `date`"
29 rm -rf $BLDDIR/binutils
32 mkdir
-p $BLDDIR/build
35 if [ ! -d $RELDIR ]; then mkdir
-p $RELDIR; fi
39 # Create build directory
42 # Use back-rev gcc if available
43 if [ -d /usr
/local
/bin
/gcc-3.4
.6 ]; then
44 PATH
=/usr
/local
/bin
/gcc-3.4
.6/bin
:$PATH
47 echo -n "Configuring..."
51 --program-prefix="mb-" \
52 CFLAGS_FOR_TARGET
=-O2 \
53 CFLAGS_FOR_BUILD
=-O2 \
54 --with-sysroot=$SYSROOT \
55 > $BLDDIR/log
/binutils-config.log
2>&1
58 if [ $NOBUILD = 0 ]; then
59 echo -n "Compiling..."
60 $MAKE all CFLAGS
="$CFLAGS" \
61 > $BLDDIR/log
/binutils-make.log
2>&1
63 print_err
" rc = " $rc
64 echo -n "Installing..."
65 $MAKE install CFLAGS
="$CFLAGS" \
66 > $BLDDIR/log
/binutils-install.log
2>&1
68 print_err
" rc = " $rc
70 # Copy libbfd.a to release area
71 mkdir
-p $RELDIR/$TARGET/lib
72 cp $BLDDIR/build
/bfd
/libbfd.a
$RELDIR/$TARGET/lib
74 print_err
"Installing libbfd.a... rc = " $rc
77 mkdir
-p $RELDIR/include
78 cp $BLDDIR/build
/bfd
/bfd.h
$RELDIR/include
79 cp $SRCDIR/include
/ansidecl.h
$RELDIR/include
80 cp $SRCDIR/include
/bfdlink.h
$RELDIR/include
81 cp $SRCDIR/include
/symcat.h
$RELDIR/include
83 print_err
"Installing libbfd headers... rc = " $rc
85 echo -n "Configuring Gprof..."
88 $SRCDIR/gprof
/configure \
91 --program-prefix="mb-" \
92 > $BLDDIR/log
/gprof-config.log
2>&1
94 print_err
" rc = " $rc
96 echo -n "Compiling Gprof..."
97 $MAKE all CFLAGS
="$CFLAGS" \
98 > $BLDDIR/log
/gprof-make.log
2>&1
100 print_err
" rc = " $rc
101 echo -n "Installing Gprof..."
102 $MAKE install CFLAGS
="$CFLAGS" \
103 > $BLDDIR/log
/gprof-install.log
2>&1
105 print_err
" rc = " $rc
109 #if [ $NOCLEAN = 0 ]; then
113 echo "Build completed: `date`."