comparison 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
comparison
equal deleted inserted replaced
105:5c4db73d289a 106:5ba0bee90efa
49 DSP=36 49 DSP=36
50 RF=12 50 RF=12
51 DISABLE_SLEEP=0 51 DISABLE_SLEEP=0
52 52
53 . "targets/$TARGET.conf" 53 . "targets/$TARGET.conf"
54
55 BUILD_DIR="build-$TARGET-gcc"
56 54
57 # settings derived from the target-defined DSP version 55 # settings derived from the target-defined DSP version
58 56
59 case "$DSP" in 57 case "$DSP" in
60 33) 58 33)
88 ALLOW_CSIM_GSM=1 86 ALLOW_CSIM_GSM=1
89 MEMSUPER=0 87 MEMSUPER=0
90 SERIAL_DYNAMIC_SWITCH=0 88 SERIAL_DYNAMIC_SWITCH=0
91 TR_BAUD_CONFIG=TR_BAUD_115200 89 TR_BAUD_CONFIG=TR_BAUD_115200
92 90
91 SUFFIX=
92
93 # allow the user to override these defaults 93 # allow the user to override these defaults
94 94
95 shift 95 shift
96 while [ $# != 0 ] 96 while [ $# != 0 ]
97 do 97 do
98 eval "$1" 98 eval "$1"
99 shift 99 shift
100 done 100 done
101
102 # validate key settings and build configuration name
103
104 case "$SRVC" in
105 0)
106 CONFIG_NAME=vo
107 ;;
108 1)
109 CONFIG_NAME=fd
110 ;;
111 2)
112 CONFIG_NAME=da
113 ;;
114 *)
115 echo "Error: SRVC=$SRVC setting is invalid" 1>&2
116 exit 1
117 esac
118
119 case "$GPRS" in
120 0)
121 ;;
122 1)
123 CONFIG_NAME=gprs
124 ;;
125 *)
126 echo "Error: GPRS=$GPRS setting is invalid" 1>&2
127 exit 1
128 esac
129
130 case "$FCHG_STATE" in
131 0)
132 ;;
133 1)
134 CONFIG_NAME="$CONFIG_NAME-chg"
135 ;;
136 *)
137 echo "Error: FCHG_STATE=$FCHG_STATE setting is invalid" 1>&2
138 exit 1
139 esac
140
141 CONFIG_NAME="$CONFIG_NAME$SUFFIX-gcc"
142 BUILD_DIR="build-$TARGET-$CONFIG_NAME"
101 143
102 echo "Building firmware for target $TARGET in $BUILD_DIR" 144 echo "Building firmware for target $TARGET in $BUILD_DIR"
103 145
104 if [ "$clean_flag" = 1 ] 146 if [ "$clean_flag" = 1 ]
105 then 147 then
262 build_lib libsys_fl 304 build_lib libsys_fl
263 build_lib libsys_ir 305 build_lib libsys_ir
264 306
265 # generate the top level Makefile! 307 # generate the top level Makefile!
266 308
267 helpers/makeline def TARGET $TARGET > $BUILD_DIR/Makefile 309 helpers/makeline def CONFIG_NAME $CONFIG_NAME > $BUILD_DIR/Makefile
310 echo >> $BUILD_DIR/Makefile
311 helpers/makeline def TARGET $TARGET >> $BUILD_DIR/Makefile
268 echo >> $BUILD_DIR/Makefile 312 echo >> $BUILD_DIR/Makefile
269 helpers/makeline def SUBDIR $SUBDIR >> $BUILD_DIR/Makefile 313 helpers/makeline def SUBDIR $SUBDIR >> $BUILD_DIR/Makefile
270 echo >> $BUILD_DIR/Makefile 314 echo >> $BUILD_DIR/Makefile
271 helpers/makeline def LIBS $LIBS >> $BUILD_DIR/Makefile 315 helpers/makeline def LIBS $LIBS >> $BUILD_DIR/Makefile
272 echo >> $BUILD_DIR/Makefile 316 echo >> $BUILD_DIR/Makefile