FreeCalypso > hg > fc-selenite
diff configure-gcc.sh @ 106:5ba0bee90efa
build system: new configuration naming mechanism
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 23 Jul 2018 16:38:50 +0000 |
parents | 5c4db73d289a |
children | 7f0681afe430 |
line wrap: on
line diff
--- a/configure-gcc.sh Mon Jul 23 07:01:39 2018 +0000 +++ b/configure-gcc.sh Mon Jul 23 16:38:50 2018 +0000 @@ -52,8 +52,6 @@ . "targets/$TARGET.conf" -BUILD_DIR="build-$TARGET-gcc" - # settings derived from the target-defined DSP version case "$DSP" in @@ -90,6 +88,8 @@ SERIAL_DYNAMIC_SWITCH=0 TR_BAUD_CONFIG=TR_BAUD_115200 +SUFFIX= + # allow the user to override these defaults shift @@ -99,6 +99,48 @@ shift done +# validate key settings and build configuration name + +case "$SRVC" in + 0) + CONFIG_NAME=vo + ;; + 1) + CONFIG_NAME=fd + ;; + 2) + CONFIG_NAME=da + ;; + *) + echo "Error: SRVC=$SRVC setting is invalid" 1>&2 + exit 1 +esac + +case "$GPRS" in + 0) + ;; + 1) + CONFIG_NAME=gprs + ;; + *) + echo "Error: GPRS=$GPRS setting is invalid" 1>&2 + exit 1 +esac + +case "$FCHG_STATE" in + 0) + ;; + 1) + CONFIG_NAME="$CONFIG_NAME-chg" + ;; + *) + echo "Error: FCHG_STATE=$FCHG_STATE setting is invalid" 1>&2 + exit 1 +esac + +CONFIG_NAME="$CONFIG_NAME$SUFFIX-gcc" +BUILD_DIR="build-$TARGET-$CONFIG_NAME" + echo "Building firmware for target $TARGET in $BUILD_DIR" if [ "$clean_flag" = 1 ] @@ -264,7 +306,9 @@ # generate the top level Makefile! -helpers/makeline def TARGET $TARGET > $BUILD_DIR/Makefile +helpers/makeline def CONFIG_NAME $CONFIG_NAME > $BUILD_DIR/Makefile +echo >> $BUILD_DIR/Makefile +helpers/makeline def TARGET $TARGET >> $BUILD_DIR/Makefile echo >> $BUILD_DIR/Makefile helpers/makeline def SUBDIR $SUBDIR >> $BUILD_DIR/Makefile echo >> $BUILD_DIR/Makefile