4 # This file is *NOT* generated by GNU Autoconf, but written by NIIBE Yutaka
6 # Copyright (C) 2010, 2011 Free Software Initiative of Japan
8 # This file is a part of NeuG, a Random Number Generator implementation.
10 # NeuG is free software: you can redistribute it and/or modify it
11 # under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 3 of the License, or
13 # (at your option) any later version.
15 # NeuG is distributed in the hope that it will be useful, but WITHOUT
16 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18 # License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program. If not, see <http://www.gnu.org/licenses/>.
33 *=*) optarg=`expr "X$option" : '[^=]*=\(.*\)'` ;;
49 echo "Unrecognized option \`$option'" >&2
50 echo "Try \`$0 --help' for more information." >&2
56 if test "$help" = "yes"; then
60 Defaults for the options are specified in brackets.
63 -h, --help display this help and exit [no]
64 --target=TARGET specify target [STBEE_MINI]
70 --with-dfu build image for DFU [<target specific>]
75 BOARD_DIR=../boards/$target
76 if test -d $BOARD_DIR; then
77 echo "Configured for target: $target"
79 echo "Unsupported target \`$target'" >&2
83 # Flash page size in byte
85 # Flash memory size in KB
91 if test "$with_dfu" = "default"; then
101 if test "$with_dfu" = "default"; then
112 if test "$with_dfu" = "yes"; then
113 echo "Configured for DFU"
115 FLASH_SIZE=`expr $FLASH_SIZE - 12`
116 DFU_DEFINE="#define DFU_SUPPORT 1"
118 echo "Configured for bare system (no-DFU)"
120 DFU_DEFINE="#undef DFU_SUPPORT"
123 sed -e "s%@BOARD_DIR@%$BOARD_DIR%" \
124 < Makefile.in > Makefile
125 sed -e "s/@ORIGIN@/$ORIGIN/" -e "s/@FLASH_SIZE@/$FLASH_SIZE/" \
126 -e "s/@FLASH_PAGE_SIZE@/$FLASH_PAGE_SIZE/" \
127 < neug.ld.in > neug.ld
128 sed -e "s/@DFU_DEFINE@/$DFU_DEFINE/" \
129 < config.h.in > config.h