diff options
Diffstat (limited to 'tools/configure')
-rwxr-xr-x | tools/configure | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/tools/configure b/tools/configure index 2ddfb72360..bf89d88929 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -11,6 +11,8 @@ | |||
11 | target=$1 | 11 | target=$1 |
12 | debug=$2 | 12 | debug=$2 |
13 | 13 | ||
14 | extra_defines="-" | ||
15 | |||
14 | input() { | 16 | input() { |
15 | read response | 17 | read response |
16 | echo $response | 18 | echo $response |
@@ -66,8 +68,9 @@ sed > Makefile \ | |||
66 | -e "s,@KEYPAD@,${keypad},g" \ | 68 | -e "s,@KEYPAD@,${keypad},g" \ |
67 | -e "s,@PWD@,${pwd},g" \ | 69 | -e "s,@PWD@,${pwd},g" \ |
68 | -e "s,@SIMVER@,${simver},g" \ | 70 | -e "s,@SIMVER@,${simver},g" \ |
71 | -e "s,@EXTRA_DEFINES@,${extra_defines},g" \ | ||
69 | <<EOF | 72 | <<EOF |
70 | ## Automaticly generated. http://bjorn.haxx.se/rockbox/ | 73 | ## Automaticly generated. http://rockbox.haxx.se |
71 | 74 | ||
72 | SIMDIR=@SIMDIR@ | 75 | SIMDIR=@SIMDIR@ |
73 | DEBUG=@DEBUG@ | 76 | DEBUG=@DEBUG@ |
@@ -77,13 +80,14 @@ KEYPAD=@KEYPAD@ | |||
77 | THISDIR="@PWD@" | 80 | THISDIR="@PWD@" |
78 | SIMVER=@SIMVER@ | 81 | SIMVER=@SIMVER@ |
79 | VERSION=\$(shell date +%y%m%d-%H%M) | 82 | VERSION=\$(shell date +%y%m%d-%H%M) |
83 | EXTRA_DEFINES=@EXTRA_DEFINES@ | ||
80 | 84 | ||
81 | .PHONY: | 85 | .PHONY: |
82 | 86 | ||
83 | all: sim | 87 | all: sim |
84 | 88 | ||
85 | sim: | 89 | sim: |
86 | \$(MAKE) -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) | 90 | \$(MAKE) -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) EXTRA_DEFINES=\$(EXTRA_DEFINES) |
87 | 91 | ||
88 | clean-sim: | 92 | clean-sim: |
89 | \$(MAKE) -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) clean | 93 | \$(MAKE) -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) clean |
@@ -121,6 +125,7 @@ if [ "$target" = "update" ]; then | |||
121 | echo "Existing generated Makefile found. Getting defaults from it." | 125 | echo "Existing generated Makefile found. Getting defaults from it." |
122 | target=`grep "^TARGET=" Makefile | cut -d= -f2-` | 126 | target=`grep "^TARGET=" Makefile | cut -d= -f2-` |
123 | debug=`grep "^DEBUG=" Makefile | cut -d= -f2-` | 127 | debug=`grep "^DEBUG=" Makefile | cut -d= -f2-` |
128 | extra_defines=`grep "^EXTRA_DEFINES=" Makefile | cut -d= -f2-` | ||
124 | 129 | ||
125 | if [ "$debug" = "SIMULATOR=1" ]; then | 130 | if [ "$debug" = "SIMULATOR=1" ]; then |
126 | simulator="yes" | 131 | simulator="yes" |
@@ -133,7 +138,7 @@ if [ "$target" = "update" ]; then | |||
133 | else | 138 | else |
134 | 139 | ||
135 | echo "Setup your Rockbox build environment." | 140 | echo "Setup your Rockbox build environment." |
136 | echo "http://bjorn.haxx.se/rockbox/" | 141 | echo "http://rockbox.haxx.se/" |
137 | echo "" | 142 | echo "" |
138 | 143 | ||
139 | fi | 144 | fi |
@@ -175,6 +180,25 @@ if [ -z "$target" ]; then | |||
175 | esac | 180 | esac |
176 | fi | 181 | fi |
177 | 182 | ||
183 | if [ "-" == "$extra_defines" ]; then | ||
184 | if [ "-DARCHOS_RECORDER" = "$target" ] ; then | ||
185 | |||
186 | echo "Loadable fonts support? (N)" | ||
187 | getit=`input`; | ||
188 | if [ "y" = "$getit" ] ; then | ||
189 | extra_defines="-DLOADABLE_FONTS" | ||
190 | else | ||
191 | echo "Proportional font support? (N)" | ||
192 | getit=`input`; | ||
193 | if [ "y" = "$getit" ] ; then | ||
194 | extra_defines="-DLCD_PROPFONTS" | ||
195 | else | ||
196 | extra_defines="" | ||
197 | fi | ||
198 | fi | ||
199 | fi | ||
200 | fi | ||
201 | |||
178 | if [ -z "$debug" ]; then | 202 | if [ -z "$debug" ]; then |
179 | ################################################################## | 203 | ################################################################## |
180 | # Figure out debug on/off | 204 | # Figure out debug on/off |
@@ -250,9 +274,10 @@ sed > Makefile \ | |||
250 | -e "s,@APPSDIR@,${appsdir},g" \ | 274 | -e "s,@APPSDIR@,${appsdir},g" \ |
251 | -e "s,@DEBUG@,${debug},g" \ | 275 | -e "s,@DEBUG@,${debug},g" \ |
252 | -e "s,@TARGET@,${target},g" \ | 276 | -e "s,@TARGET@,${target},g" \ |
277 | -e "s,@EXTRA_DEFINES@,${extra_defines},g" \ | ||
253 | -e "s,@PWD@,${pwd},g" \ | 278 | -e "s,@PWD@,${pwd},g" \ |
254 | <<EOF | 279 | <<EOF |
255 | ## Automaticly generated. http://bjorn.haxx.se/rockbox/ | 280 | ## Automaticly generated. http://rockbox.haxx.se |
256 | 281 | ||
257 | FIRMDIR=@FIRMDIR@ | 282 | FIRMDIR=@FIRMDIR@ |
258 | APPSDIR=@APPSDIR@ | 283 | APPSDIR=@APPSDIR@ |
@@ -261,15 +286,16 @@ TARGET=@TARGET@ | |||
261 | THISDIR="@PWD@" | 286 | THISDIR="@PWD@" |
262 | VERSION=\$(shell date +%y%m%d-%H%M) | 287 | VERSION=\$(shell date +%y%m%d-%H%M) |
263 | 288 | ||
289 | EXTRA_DEFINES=@EXTRA_DEFINES@ | ||
264 | .PHONY: firmware apps | 290 | .PHONY: firmware apps |
265 | 291 | ||
266 | all: firmware apps | 292 | all: firmware apps |
267 | 293 | ||
268 | firmware: | 294 | firmware: |
269 | \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) | 295 | \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) EXTRA_DEFINES=\$(EXTRA_DEFINES) |
270 | 296 | ||
271 | apps: | 297 | apps: |
272 | \$(MAKE) -C \$(APPSDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) | 298 | \$(MAKE) -C \$(APPSDIR) TARGET=\$(TARGET) \$(DEBUG) OBJDIR=\$(THISDIR) VERSION=\$(VERSION) EXTRA_DEFINES=\$(EXTRA_DEFINES) |
273 | 299 | ||
274 | clean-firmware: | 300 | clean-firmware: |
275 | \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean | 301 | \$(MAKE) -C \$(FIRMDIR) TARGET=\$(TARGET) OBJDIR=\$(THISDIR) clean |