mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-09-08 10:35:17 -05:00
Initial Import
This commit is contained in:
12
dka-scripts/build-crtls.sh
Normal file
12
dka-scripts/build-crtls.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
DEVKITARM=$INSTALLDIR
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Install and build the gba crt
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
cp $(pwd)/dka-crtls/* $DEVKITARM/arm-elf/lib/
|
||||
cd $DEVKITARM/arm-elf/lib/
|
||||
$MAKE CRT=gba_crt0
|
||||
$MAKE CRT=gp32_crt0
|
||||
$MAKE CRT=er_crt0
|
||||
$MAKE CRT=gp32_gpsdk_crt0
|
||||
67
dka-scripts/build-gcc.sh
Normal file
67
dka-scripts/build-gcc.sh
Normal file
@@ -0,0 +1,67 @@
|
||||
#---------------------------------------------------------------------------------
|
||||
# Check Parameters
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
prefix=$INSTALLDIR
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build and install binutils
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
mkdir -p $target/binutils
|
||||
cd $target/binutils
|
||||
|
||||
../../$BINUTILS_SRCDIR/configure \
|
||||
--prefix=$prefix --target=$target --disable-nls --disable-shared --disable-debug \
|
||||
--disable-threads --with-gcc --with-gnu-as --with-gnu-ld --with-stabs \
|
||||
2>&1 | tee binutils_configure.log
|
||||
|
||||
|
||||
$MAKE | tee binutils_make.log 2>&1
|
||||
$MAKE install | tee binutils_install.log 2>&1
|
||||
|
||||
cd $BUILDSCRIPTDIR
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build and install just the c compiler
|
||||
#---------------------------------------------------------------------------------
|
||||
mkdir -p $target/gcc
|
||||
cd $target/gcc
|
||||
|
||||
|
||||
../../$GCC_SRCDIR/configure \
|
||||
--enable-languages=c,c++ \
|
||||
--with-cpu=arm7tdmi\
|
||||
--enable-interwork --enable-multilib\
|
||||
--with-gcc --with-gnu-ld --with-gnu-as --with-stabs \
|
||||
--disable-shared --disable-threads --disable-win32-registry --disable-nls\
|
||||
--target=$target \
|
||||
--with-newlib \
|
||||
--prefix=$prefix -v\
|
||||
2>&1 | tee gcc_configure.log
|
||||
|
||||
$MAKE all-gcc | tee gcc_make.log 2>&1
|
||||
$MAKE install-gcc | tee gcc_install.log 2>&1
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build and install newlib
|
||||
#---------------------------------------------------------------------------------
|
||||
cd $BUILDSCRIPTDIR
|
||||
mkdir -p $target/newlib
|
||||
cd $target/newlib
|
||||
|
||||
../../$NEWLIB_SRCDIR/configure --target=$target --prefix=$prefix | tee newlib_configure.log 2>&1
|
||||
|
||||
$MAKE all | tee newlib_make.log 2>&1
|
||||
$MAKE install | tee newlib_install.log 2>&1
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build and install the final compiler
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
cd $BUILDSCRIPTDIR
|
||||
cd $target/gcc
|
||||
|
||||
$MAKE | tee gcc_final_make.log 2>&1
|
||||
$MAKE install | tee gcc_final_install.log 2>&1
|
||||
26
dka-scripts/build-tools.sh
Normal file
26
dka-scripts/build-tools.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
prefix=$INSTALLDIR
|
||||
|
||||
gcc -O2 tools/gba/gbafix.c
|
||||
|
||||
if [ -f a.out ]
|
||||
then
|
||||
exeext=
|
||||
rm a.out
|
||||
else
|
||||
if [ -f a.exe ]
|
||||
then
|
||||
exeext=.exe
|
||||
rm a.exe
|
||||
else
|
||||
echo "Error: Failed to build tools"
|
||||
exit -1
|
||||
fi
|
||||
fi
|
||||
|
||||
g++ tools/bmp2bin.cpp -o $prefix/bin/bmp2bin$exeext -static -O2 -s -D__LITTLE_ENDIAN__
|
||||
gcc tools/gbafix.c -o $prefix/bin/gbafix$exeext -static -O2 -s
|
||||
|
||||
cd tools/b2fxec
|
||||
$MAKE -C tools/gp32/b2fxec
|
||||
cp b2fxec$exeext $prefix/bin/b2fxec$exeext
|
||||
$MAKE -C tools/gp32/b2fxec clean
|
||||
Reference in New Issue
Block a user