blob: d60e882f828e9836efb8fcd2849a7251cac4395c [file] [log] [blame]
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +00001#!/bin/sh
2# __________ __ ___.
3# Open \______ \ ____ ____ | | _\_ |__ _______ ___
4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/
8# $Id$
9#
10
Daniel Stenberg235b50b2004-10-04 13:02:41 +000011# global CC options for all platforms
12CCOPTS="-W -Wall -O -nostdlib -ffreestanding -Wstrict-prototypes"
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +000013
Robert Hakc3320ae2002-10-17 09:08:05 +000014#
15# Begin Function Definitions
16#
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +000017input() {
18 read response
19 echo $response
20}
21
Daniel Stenbergfc1e9252004-09-22 08:58:50 +000022shcc () {
23 CC=sh-elf-gcc
24 LD=sh-elf-ld
25 AR=sh-elf-ar
26 AS=sh-elf-as
27 OC=sh-elf-objcopy
Daniel Stenberg235b50b2004-10-04 13:02:41 +000028 GCCOPTS="$CCOPTS -m1"
Linus Nielsen Feltzingc21e7e72004-10-07 07:08:57 +000029 GCCOPTIMIZE="-fomit-frame-pointer -fschedule-insns"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +000030}
31
Daniel Stenberg72fdf372005-01-04 15:00:06 +000032calmrisccc () {
33 CC=calmrisc16-unknown-elf-gcc
34 LD=calmrisc16-unknown-elf-ld
35 AR=calmrisc16-unknown-elf-ar
36 AS=calmrisc16-unknown-elf-as
37 OC=calmrisc16-unknown-elf-objcopy
Daniel Stenberg11f69882005-01-09 23:02:39 +000038 GCCOPTS="$CCOPTS"
Daniel Stenberg72fdf372005-01-04 15:00:06 +000039 GCCOPTIMIZE="-fomit-frame-pointer"
40}
41
Daniel Stenbergfc1e9252004-09-22 08:58:50 +000042coldfirecc () {
43 CC=m68k-elf-gcc
44 LD=m68k-elf-ld
45 AR=m68k-elf-ar
46 AS=m68k-elf-as
47 OC=m68k-elf-objcopy
Linus Nielsen Feltzingbb4872e2004-11-19 00:44:07 +000048 GCCOPTS="$CCOPTS -g -m5200 -Wa\,-m5249"
Linus Nielsen Feltzingc21e7e72004-10-07 07:08:57 +000049 GCCOPTIMIZE="-fomit-frame-pointer"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +000050}
51
Robert Hak672b0e22002-10-17 09:19:34 +000052whichsim () {
Daniel Stenberg60fe9df2002-08-02 12:06:07 +000053
54if [ -z "$simver" ]; then
55
56 ##################################################################
57 # Figure out win32/x11 GUI
58 #
59 echo ""
60 echo "Build (W)in32 or (X)11 GUI version? (X)"
61
62 option=`input`;
63
64 case $option in
65 [Ww])
66 simver="win32"
67 ;;
68 *)
69 simver="x11"
70 ;;
71 esac
Daniel Stenbergea9c5bb2003-02-26 09:13:47 +000072 echo "Selected $simver simulator"
Daniel Stenberg60fe9df2002-08-02 12:06:07 +000073fi
Robert Hak672b0e22002-10-17 09:19:34 +000074}
75
76
77simul () {
Daniel Stenberg60fe9df2002-08-02 12:06:07 +000078
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +000079sed > Makefile \
Daniel Stenberg5c9c16f2004-05-26 11:07:16 +000080 -e "s,@ROOTDIR@,${rootdir},g" \
Daniel Stenbergf0929202003-01-16 14:37:30 +000081 -e "s,@ARCHOS@,${archos},g" \
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +000082 -e "s,@DEBUG@,${debug},g" \
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +000083 -e "s,@KEYPAD@,${keypad},g" \
84 -e "s,@PWD@,${pwd},g" \
Daniel Stenbergebe963d2002-09-20 06:38:38 +000085 -e "s,@LANGUAGE@,${language},g" \
Daniel Stenbergf69c7032004-06-14 15:05:58 +000086 -e "s,@TARGET@,${target},g" \
Daniel Stenbergc9d41b42004-11-24 16:45:08 +000087 -e "s,@PLUGINS@,${plugins},g" \
Daniel Stenberg60fe9df2002-08-02 12:06:07 +000088 -e "s,@SIMVER@,${simver},g" \
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +000089<<EOF
Björn Stenbergcd225732002-08-11 09:17:47 +000090## Automaticly generated. http://rockbox.haxx.se
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +000091
Daniel Stenbergfc1e9252004-09-22 08:58:50 +000092export ARCHOS=@ARCHOS@
93export ROOTDIR=@ROOTDIR@
94export FIRMDIR=\$(ROOTDIR)/firmware
95export APPSDIR=\$(ROOTDIR)/apps
96export TOOLSDIR=\$(ROOTDIR)/tools
97export DOCSDIR=\$(ROOTDIR)/docs
98export APPSDIR=@ROOTDIR@/apps
99export SIMDIR=\$(ROOTDIR)/uisimulator/@SIMVER@
100export DEBUG=@DEBUG@
101export KEYPAD=@KEYPAD@
102export OBJDIR=@PWD@
103export SIMVER=@SIMVER@
104export TARGET=@TARGET@
105export LANGUAGE=@LANGUAGE@
106export VERSION=\$(shell date +%y%m%d-%H%M)
Daniel Stenbergc9d41b42004-11-24 16:45:08 +0000107export ENABLEDPLUGINS=@PLUGINS@
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +0000108
Linus Nielsen Feltzinge53bdf02002-07-26 14:13:03 +0000109.PHONY:
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +0000110
111all: sim
112
113sim:
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000114 \$(MAKE) -C \$(SIMDIR)
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +0000115
Daniel Stenberg6246ce52002-08-15 10:07:27 +0000116clean:
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000117 \$(MAKE) -C \$(SIMDIR) clean
Daniel Stenberge8cad942004-08-24 09:37:30 +0000118 rm -rf rockbox.zip
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +0000119
Daniel Stenberg6246ce52002-08-15 10:07:27 +0000120tags:
121 @rm -f TAGS
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000122 make -C \$(SIMDIR) tags
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +0000123
Daniel Stenbergf69c7032004-06-14 15:05:58 +0000124zip:
Daniel Stenbergd1851e32004-08-24 15:13:08 +0000125 \$(TOOLSDIR)/buildzip.pl -r "\$(ROOTDIR)" sim\$(TARGET)
Daniel Stenbergf69c7032004-06-14 15:05:58 +0000126
127install:
128 @echo "installing a full setup in your archos dir"
129 @(make zip && cd archos && unzip -oq ../rockbox.zip)
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +0000130EOF
131
Daniel Stenberge45a8f52002-06-06 13:33:38 +0000132 echo "Created Makefile"
Daniel Stenberg45abe612002-05-31 08:38:35 +0000133
Daniel Stenberge45a8f52002-06-06 13:33:38 +0000134 if [ -d "archos" ]; then
135 echo "sub directory archos already present"
136 else
137 mkdir archos
138 echo "created an archos subdirectory for simulating the hard disk"
139 fi
Daniel Stenberg45abe612002-05-31 08:38:35 +0000140
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +0000141}
142
Robert Hakc3320ae2002-10-17 09:08:05 +0000143picklang() {
144 # figure out which languages that are around
Daniel Stenberg5c9c16f2004-05-26 11:07:16 +0000145 for file in $rootdir/apps/lang/*.lang; do
Robert Hakc3320ae2002-10-17 09:08:05 +0000146 clean=`echo $file | sed -e 's:.*/::g' | cut "-d." -f1`
147 langs="$langs $clean"
148 done
149
150 num=1
151 for one in $langs; do
152 echo "$num. $one"
153 num=`expr $num + 1`
154 done
155
156 read pick
157 return $pick;
158}
159
160whichlang() {
161 num=1
162 for one in $langs; do
163 if [ "$num" = "$pick" ]; then
164 echo $one
165 return
166 fi
167 num=`expr $num + 1`
168 done
169}
170
Robert Hakc3320ae2002-10-17 09:08:05 +0000171target=$1
172debug=$2
173
174if test "$1" = "--help"; then
175 echo "Rockbox configure script."
176 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
177 echo "Do *NOT* run this within the tools directory!"
178 exit
179fi
180
181if test -r "configure"; then
182 # this is a check for a configure script in the current directory, it there
183 # is one, try to figure out if it is this one!
184
185 if { grep "^# Jukebox" configure >/dev/null 2>&1 ; } then
186 echo "WEEEEEEEEP. Don't run this configure script within the tools directory."
187 echo "It will only cause you pain and grief. Instead do this:"
188 echo ""
189 echo " cd .."
190 echo " mkdir build-dir"
191 echo " cd build-dir"
192 echo " ../tools/configure"
193 echo ""
194 echo "Much happiness will arise from this. Enjoy"
195 exit
196 fi
197fi
198
Daniel Stenbergc38ccba2002-05-31 08:21:20 +0000199if [ "$target" = "--help" -o \
200 "$target" = "-h" ]; then
201 echo "Just invoke the script and answer the questions."
202 echo "This script will write a Makefile for you"
203 exit
204fi
205
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +0000206# get our current directory
207pwd=`pwd`;
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +0000208
Daniel Stenberg67096582002-05-23 10:10:44 +0000209if [ "$target" = "update" ]; then
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000210 echo "configure update is unfortunately no longer supported"
211 exit
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +0000212else
213
Daniel Stenbergea9c5bb2003-02-26 09:13:47 +0000214echo "This script will setup your Rockbox build environment."
215echo "Further docs here: http://rockbox.haxx.se/docs/"
Daniel Stenberg58f4d0d2002-05-31 07:22:38 +0000216echo ""
217
Daniel Stenberg67096582002-05-23 10:10:44 +0000218fi
219
Daniel Stenberg5c9c16f2004-05-26 11:07:16 +0000220if [ -z "$rootdir" ]; then
221 ##################################################################
222 # Figure out where the source code root is!
223 #
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +0000224
Daniel Stenberg5c9c16f2004-05-26 11:07:16 +0000225 firmfile="crt0.S" # a file to check for in the firmware root dir
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +0000226
Daniel Stenberg052d21a2004-05-26 11:18:40 +0000227 for dir in . .. ../.. ../rockbox*; do
Daniel Stenberg5c9c16f2004-05-26 11:07:16 +0000228 if [ -f $dir/firmware/$firmfile ]; then
229 rootdir=$dir
230 break
Daniel Stenberg31e0cd62003-04-22 22:18:57 +0000231 fi
232 done
233
Daniel Stenberg5c9c16f2004-05-26 11:07:16 +0000234 if [ -z "$rootdir" ]; then
235 echo "This script couldn't find your source code root directory. Please enter the"
236 echo "full path to the source code directory here:"
237
238 firmdir=`input`
239 fi
240
241 #####################################################################
242 # Convert the possibly relative directory name to an absolute version
243 #
244 now=`pwd`
245 cd $rootdir
246 rootdir=`pwd`
247
Daniel Stenberg052d21a2004-05-26 11:18:40 +0000248 echo "Using this source code root directory:"
249 echo $rootdir
250 echo ""
251
Daniel Stenberg5c9c16f2004-05-26 11:07:16 +0000252 # cd back to the build dir
253 cd $now
Daniel Stenberg31e0cd62003-04-22 22:18:57 +0000254fi
255
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000256if [ -z "$archos" ]; then
257
258##################################################################
259# Figure out target platform
260#
261
262 echo "Enter target platform: (default is Archos Recorder)"
263
264 echo "1 - Archos Player/Studio"
265 echo "2 - Archos Recorder"
266 echo "3 - Archos FM Recorder"
267 echo "4 - Archos Recorder v2"
Daniel Stenberg72fdf372005-01-04 15:00:06 +0000268 echo "5 - Archos Gmini 120"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000269 echo "7 - Archos Ondio SP"
270 echo "8 - Archos Ondio FM"
271 echo "9 - Iriver H100"
272
273 getit=`input`;
274
275 case $getit in
276
277 1)
278 archos="player"
279 target="-DARCHOS_PLAYER"
280 shcc
Daniel Stenberga97fe252004-10-07 08:08:05 +0000281 tool="$rootdir/tools/scramble"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000282 output="archos.mod"
283 appextra="player"
Jens Arnold48201772004-11-20 00:55:25 +0000284 archosrom="$pwd/rombox.ucl"
285 flash="$pwd/rockbox.ucl"
Daniel Stenberg8e55d0c2004-09-22 21:40:45 +0000286 plugins="yes"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000287 ;;
288
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000289 3)
290 archos="fmrecorder"
291 target="-DARCHOS_FMRECORDER"
292 shcc
Daniel Stenberga97fe252004-10-07 08:08:05 +0000293 tool="$rootdir/tools/scramble -fm"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000294 output="ajbrec.ajz"
295 appextra="recorder"
Linus Nielsen Feltzing8737b372004-11-23 07:47:35 +0000296 archosrom=""
Daniel Stenberg59bec2e2004-10-07 08:20:25 +0000297 flash="$pwd/rockbox.ucl"
Daniel Stenberg8e55d0c2004-09-22 21:40:45 +0000298 plugins="yes"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000299 ;;
300
301 4)
302 archos="recorderv2"
303 target="-DARCHOS_RECORDERV2"
304 shcc
Daniel Stenberga97fe252004-10-07 08:08:05 +0000305 tool="$rootdir/tools/scramble -v2"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000306 output="ajbrec.ajz"
307 appextra="recorder"
308 archosrom="$pwd/rombox.ucl"
Daniel Stenberg59bec2e2004-10-07 08:20:25 +0000309 flash="$pwd/rockbox.ucl"
Daniel Stenberg8e55d0c2004-09-22 21:40:45 +0000310 plugins="yes"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000311 ;;
312
Daniel Stenberg72fdf372005-01-04 15:00:06 +0000313 5)
314 archos="gmini120"
315 target="-DARCHOS_GMINI120"
316 memory=16 # fixed size (16 is a guess, remove comment when checked)
317 calmrisccc
318 tool="$rootdir/tools/scramble" # not correct but...
319 output="rockboxgmini"
320 appextra="recorder"
321 archosrom=""
322 flash=""
323 plugins="no" # disabled for now, enable later on
324 ;;
325
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000326 7)
327 archos="ondiosp"
328 target="-DARCHOS_ONDIOSP"
329 shcc
Daniel Stenberga97fe252004-10-07 08:08:05 +0000330 tool="$rootdir/tools/scramble -osp"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000331 output="ajbrec.ajz"
332 appextra="recorder"
Jörg Hohensohn86425852004-10-07 06:51:22 +0000333 archosrom="$pwd/rombox.ucl"
Daniel Stenberg59bec2e2004-10-07 08:20:25 +0000334 flash="$pwd/rockbox.ucl"
Jörg Hohensohn86425852004-10-07 06:51:22 +0000335 plugins="yes"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000336 ;;
337
338 8)
339 archos="ondiofm"
340 target="-DARCHOS_ONDIOFM"
341 shcc
Daniel Stenberga97fe252004-10-07 08:08:05 +0000342 tool="$rootdir/tools/scramble -ofm"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000343 output="ajbrec.ajz"
344 appextra="recorder"
Jörg Hohensohn86425852004-10-07 06:51:22 +0000345 archosrom="$pwd/rombox.ucl"
Daniel Stenberg59bec2e2004-10-07 08:20:25 +0000346 flash="$pwd/rockbox.ucl"
Jörg Hohensohn86425852004-10-07 06:51:22 +0000347 plugins="yes"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000348 ;;
349
350 9)
351 archos="h100"
352 target="-DIRIVER_H100"
353 memory=32 # always
354 coldfirecc
Daniel Stenberga97fe252004-10-07 08:08:05 +0000355 tool="cp"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000356 output="rockbox.iriver"
Linus Nielsen Feltzingbb4872e2004-11-19 00:44:07 +0000357 appextra="recorder"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000358 archosrom=""
Daniel Stenberg59bec2e2004-10-07 08:20:25 +0000359 flash=""
Linus Nielsen Feltzing44898af2004-10-07 08:36:25 +0000360 plugins=""
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000361 ;;
362
Linus Nielsen Feltzingba056502004-09-22 09:29:58 +0000363 *)
364 archos="recorder"
365 target="-DARCHOS_RECORDER"
366 shcc
Daniel Stenberga97fe252004-10-07 08:08:05 +0000367 tool="$rootdir/tools/scramble"
Linus Nielsen Feltzingba056502004-09-22 09:29:58 +0000368 output="ajbrec.ajz"
369 appextra="recorder"
370 archosrom="$pwd/rombox.ucl"
Daniel Stenberg59bec2e2004-10-07 08:20:25 +0000371 flash="$pwd/rockbox.ucl"
Daniel Stenberg8e55d0c2004-09-22 21:40:45 +0000372 plugins="yes"
Linus Nielsen Feltzingba056502004-09-22 09:29:58 +0000373 ;;
374
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000375 esac
376
377 echo "Platform set to $archos"
378
379fi
380
381if [ -z "$memory" ]; then
382 size="2"
383 if [ -z "$update" ]; then
384 echo "Enter size of your RAM (in MB): (defaults to 2)"
385 size=`input`;
386 fi
387
388 case $size in
389 8)
390 memory="8"
391 ;;
392 *)
393 memory="2"
394 ;;
395
396 esac
397 echo "Memory size selected: $memory MB"
398fi
399
400if [ -z "$debug" ]; then
401 ##################################################################
402 # Figure out debug on/off
403 #
404 echo "Build (N)ormal, (D)ebug or (S)imulated version? (N)"
405
406 option=`input`;
407
408 case $option in
409 [Ss])
410 debug="1"
411 simulator="yes"
412 echo "Simulator build selected"
413 whichsim
414 ;;
415 [Dd])
416 debug="1"
417 echo "Debug build selected"
Daniel Stenberg235b50b2004-10-04 13:02:41 +0000418 GCCOPTS="$GCCOPTS -g -DDEBUG"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000419 ;;
420 *)
421 debug=""
422 echo "Normal build selected"
Linus Nielsen Feltzingc21e7e72004-10-07 07:08:57 +0000423 GCCOPTS="$GCCOPTS $GCCOPTIMIZE"
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000424 ;;
425
426 esac
427fi
428
Daniel Stenberg31e0cd62003-04-22 22:18:57 +0000429
Daniel Stenbergebe963d2002-09-20 06:38:38 +0000430if [ -z "$language" ]; then
431
432 echo "Select a number for the language to use (default is english)"
433
434 picklang
435 language=`whichlang`
436
437 if [ -z "$language" ]; then
438 # pick a default
439 language="english"
440 fi
Daniel Stenbergea9c5bb2003-02-26 09:13:47 +0000441 echo "Language set to $language"
Daniel Stenbergebe963d2002-09-20 06:38:38 +0000442fi
443
Robert Hak9465d4e2002-10-17 09:14:57 +0000444if [ "yes" = "$simulator" ]; then
445 # we have already dealt with the simulator Makefile separately
Robert Hak672b0e22002-10-17 09:19:34 +0000446 simul
Robert Hak9465d4e2002-10-17 09:14:57 +0000447 exit
448fi
449
Daniel Stenberge0c12af2002-05-23 09:39:31 +0000450sed > Makefile \
Daniel Stenberg5c9c16f2004-05-26 11:07:16 +0000451 -e "s,@ROOTDIR@,${rootdir},g" \
Daniel Stenberge0c12af2002-05-23 09:39:31 +0000452 -e "s,@DEBUG@,${debug},g" \
Daniel Stenbergea9c5bb2003-02-26 09:13:47 +0000453 -e "s,@MEMORY@,${memory},g" \
Daniel Stenberge0c12af2002-05-23 09:39:31 +0000454 -e "s,@TARGET@,${target},g" \
Daniel Stenbergf0929202003-01-16 14:37:30 +0000455 -e "s,@ARCHOS@,${archos},g" \
Daniel Stenbergebe963d2002-09-20 06:38:38 +0000456 -e "s,@LANGUAGE@,${language},g" \
Daniel Stenberge0c12af2002-05-23 09:39:31 +0000457 -e "s,@PWD@,${pwd},g" \
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000458 -e "s,@CC@,${CC},g" \
459 -e "s,@LD@,${LD},g" \
460 -e "s,@AR@,${AR},g" \
461 -e "s,@AS@,${AS},g" \
462 -e "s,@OC@,${OC},g" \
463 -e "s,@TOOL@,${tool},g" \
464 -e "s,@OUTPUT@,${output},g" \
465 -e "s,@APPEXTRA@,${appextra},g" \
466 -e "s,@ARCHOSROM@,${archosrom},g" \
Daniel Stenberg59bec2e2004-10-07 08:20:25 +0000467 -e "s,@FLASHFILE@,${flash},g" \
Daniel Stenberg8e55d0c2004-09-22 21:40:45 +0000468 -e "s,@PLUGINS@,${plugins},g" \
Daniel Stenberg235b50b2004-10-04 13:02:41 +0000469 -e "s,@GCCOPTS@,${GCCOPTS},g" \
Daniel Stenberge0c12af2002-05-23 09:39:31 +0000470<<EOF
Björn Stenbergcd225732002-08-11 09:17:47 +0000471## Automaticly generated. http://rockbox.haxx.se
Daniel Stenberg67096582002-05-23 10:10:44 +0000472
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000473export ROOTDIR=@ROOTDIR@
474export FIRMDIR=\$(ROOTDIR)/firmware
475export APPSDIR=\$(ROOTDIR)/apps
476export TOOLSDIR=\$(ROOTDIR)/tools
477export DOCSDIR=\$(ROOTDIR)/docs
478export DEBUG=@DEBUG@
479export ARCHOS=@ARCHOS@
480export ARCHOSROM=@ARCHOSROM@
Daniel Stenberg59bec2e2004-10-07 08:20:25 +0000481export FLASHFILE=@FLASHFILE@
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000482export TARGET=@TARGET@
483export OBJDIR=@PWD@
484export LANGUAGE=@LANGUAGE@
485export MEMORYSIZE=@MEMORY@
486export VERSION=\$(shell date +%y%m%d-%H%M)
Daniel Stenberga97fe252004-10-07 08:08:05 +0000487export MKFIRMWARE=@TOOL@
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000488export BINARY=@OUTPUT@
489export APPEXTRA=@APPEXTRA@
Daniel Stenberg8e55d0c2004-09-22 21:40:45 +0000490export ENABLEDPLUGINS=@PLUGINS@
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000491export CC=@CC@
492export LD=@LD@
493export AR=@AR@
494export AS=@AS@
495export OC=@OC@
Daniel Stenberg235b50b2004-10-04 13:02:41 +0000496export GCCOPTS=@GCCOPTS@
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +0000497
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000498.PHONY: all clean tags zip
Daniel Stenberg3c286ec2002-05-23 13:55:26 +0000499
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000500all:
501 @\$(MAKE) -C \$(FIRMDIR)
502 @\$(MAKE) -C \$(APPSDIR)
Daniel Stenberg40c61292002-05-24 09:33:37 +0000503
Daniel Stenberg3c286ec2002-05-23 13:55:26 +0000504clean:
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000505 @\$(MAKE) -C \$(FIRMDIR) clean
506 @\$(MAKE) -C \$(APPSDIR) clean
507 @rm -f rockbox.zip TAGS
Daniel Stenbergbc35ae32002-08-15 09:32:59 +0000508
509tags:
510 @rm -f TAGS
Daniel Stenbergfc1e9252004-09-22 08:58:50 +0000511 \$(MAKE) -C \$(FIRMDIR) tags
512 \$(MAKE) -C \$(APPSDIR) tags
513 \$(MAKE) -C \$(APPSDIR)/plugins tags
514 \$(MAKE) -C \$(APPSDIR)/plugins/lib tags
Daniel Stenberg3d9f7742004-05-21 19:05:47 +0000515
516zip:
Daniel Stenbergd1851e32004-08-24 15:13:08 +0000517 \$(TOOLSDIR)/buildzip.pl -r "\$(ROOTDIR)" \$(TARGET)
Daniel Stenberg3aacd2e2002-05-23 09:11:35 +0000518EOF
Daniel Stenberge0c12af2002-05-23 09:39:31 +0000519
520echo "Created Makefile"