Make release-all able to take $MAKE for non-gnumake systems

inspired by 764d4ca from matthiasr
This commit is contained in:
Stefan `Sec` Zehl 2012-01-28 18:01:52 +01:00
parent d75bc7c953
commit b5c12b8666
1 changed files with 10 additions and 4 deletions

View File

@ -1,5 +1,11 @@
#!/bin/sh -e #!/bin/sh -e
# We currently don't use crypto, so this script is deprecated.
if [ -z ${MAKE} ]; then
which gmake >/dev/null && MAKE=gmake || MAKE=make
fi
TARG=../release TARG=../release
if [ ! -d ../firmware ] ; then if [ ! -d ../firmware ] ; then
@ -32,9 +38,9 @@ echo "###"
echo "### Building final" echo "### Building final"
echo "###" echo "###"
export FINAL=y export FINAL=y
make clean $MAKE clean
./l0dable/mktable.pl ./l0dable/mktable.pl
make APP=final $MAKE APP=final
cp firmware.elf $TARG/final.elf cp firmware.elf $TARG/final.elf
cp firmware.bin $TARG/final.bin cp firmware.bin $TARG/final.bin
@ -48,7 +54,7 @@ cp ../tools/image/lcd/i42.lcd $TARG/files/nick.lcd
echo "###" echo "###"
echo "### Gathering loadables" echo "### Gathering loadables"
echo "###" echo "###"
(cd l0dable && make) (cd l0dable && $MAKE)
mv l0dable/*.c0d $TARG/files/ mv l0dable/*.c0d $TARG/files/
mv l0dable/*.int $TARG/files/ mv l0dable/*.int $TARG/files/
mv l0dable/*.nik $TARG/files/ mv l0dable/*.nik $TARG/files/
@ -59,7 +65,7 @@ if grep -q 'define ENCRYPT_L0DABLE' SECRETS ; then
echo "###" echo "###"
echo "### Building crypto" echo "### Building crypto"
echo "###" echo "###"
(cd ../tools/crypto && make) (cd ../tools/crypto && $MAKE)
echo "###" echo "###"
echo "### Crypting loadables" echo "### Crypting loadables"