]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - MAKEALL
include: define CONFIG_SPL and CONFIG_TPL as 1
[karo-tx-uboot.git] / MAKEALL
diff --git a/MAKEALL b/MAKEALL
index 8fedea242e2563dcb9c1cf12a5a1648cf4e79210..ed85b7c07514f3bc31bf917253abce9707285f49 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -162,6 +162,12 @@ while true ; do
                echo "Internal error!" >&2 ; exit 1 ;;
        esac
 done
+
+GNU_MAKE=$(scripts/show-gnu-make) || {
+       echo "GNU Make not found" >&2
+       exit 1
+}
+
 # echo "Remaining arguments:"
 # for arg do echo '--> '"\`$arg'" ; done
 
@@ -418,50 +424,8 @@ LIST_arm="$(targets_by_arch arm |          \
 ## MIPS Systems                (default = big endian)
 #########################################################################
 
-LIST_mips4kc="         \
-       incaip          \
-       incaip_100MHz   \
-       incaip_133MHz   \
-       incaip_150MHz   \
-       qemu_mips       \
-       vct_platinum    \
-       vct_platinum_small      \
-       vct_platinum_onenand    \
-       vct_platinum_onenand_small      \
-       vct_platinumavc \
-       vct_platinumavc_small   \
-       vct_platinumavc_onenand \
-       vct_platinumavc_onenand_small   \
-       vct_premium     \
-       vct_premium_small       \
-       vct_premium_onenand     \
-       vct_premium_onenand_small       \
-"
-
-LIST_au1xx0="          \
-       dbau1000        \
-       dbau1100        \
-       dbau1500        \
-       dbau1550        \
-"
-
-LIST_mips="            \
-       ${LIST_mips4kc} \
-       ${LIST_mips5kc} \
-       ${LIST_au1xx0}  \
-"
-
-#########################################################################
-## MIPS Systems                (little endian)
-#########################################################################
+LIST_mips="$(targets_by_arch mips)"
 
-LIST_au1xx0_el="       \
-       dbau1550_el     \
-       pb1000          \
-"
-LIST_mips_el="                 \
-       ${LIST_au1xx0_el}       \
-"
 #########################################################################
 ## OpenRISC Systems
 #########################################################################
@@ -672,16 +636,18 @@ build_target() {
                output_dir="${OUTPUT_PREFIX}"
        fi
 
-       export BUILD_DIR="${output_dir}"
-
        target_arch=$(get_target_arch ${target})
        eval cross_toolchain=\$CROSS_COMPILE_`echo $target_arch | tr '[:lower:]' '[:upper:]'`
        if [ "${cross_toolchain}" ] ; then
-           MAKE="make CROSS_COMPILE=${cross_toolchain}"
+           MAKE="$GNU_MAKE CROSS_COMPILE=${cross_toolchain}"
        elif [ "${CROSS_COMPILE}" ] ; then
-           MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
+           MAKE="$GNU_MAKE CROSS_COMPILE=${CROSS_COMPILE}"
        else
-           MAKE=make
+           MAKE=$GNU_MAKE
+       fi
+
+       if [  "${output_dir}" != "." ] ; then
+               MAKE="${MAKE} O=${output_dir}"
        fi
 
        ${MAKE} distclean >/dev/null
@@ -698,7 +664,7 @@ build_target() {
        if [ $BUILD_MANY == 1 ] ; then
                trap - TERM
 
-               ${MAKE} -s tidy
+               ${MAKE} -s clean
 
                if [ -s ${LOG_DIR}/${target}.ERR ] ; then
                        cp ${LOG_DIR}/${target}.ERR ${OUTPUT_PREFIX}/ERR/${target}