diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-05-31 07:22:38 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-05-31 07:22:38 +0000 |
commit | 58f4d0d6c6f70c54f96af17983dd04321cacc1b6 (patch) | |
tree | ebf41feac43f218b3d976eea87a934273c015f9a | |
parent | 2b203ca191f0c9f72449c9edf7ab14d82f76cff0 (diff) | |
download | rockbox-58f4d0d6c6f70c54f96af17983dd04321cacc1b6.tar.gz rockbox-58f4d0d6c6f70c54f96af17983dd04321cacc1b6.zip |
now manages simulator makefiles too!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@841 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-x | tools/configure | 94 |
1 files changed, 83 insertions, 11 deletions
diff --git a/tools/configure b/tools/configure index db1a2b1896..307f66aa70 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -16,9 +16,64 @@ input() { | |||
16 | echo $response | 16 | echo $response |
17 | } | 17 | } |
18 | 18 | ||
19 | echo "Setup your Rockbox build environment." | 19 | simulator() { |
20 | echo "http://bjorn.haxx.se/rockbox/" | 20 | ################################################################## |
21 | echo "" | 21 | # Figure out where the firmware code is! |
22 | # | ||
23 | |||
24 | simfile="x11/lcd-x11.c" # a file to check for in the uisimulator root dir | ||
25 | |||
26 | for dir in uisimulator . .. ../uisimulator ../../uisimulator; do | ||
27 | if [ -f "$dir/$simfile" ]; then | ||
28 | simdir="$dir/x11" | ||
29 | break | ||
30 | fi | ||
31 | done | ||
32 | |||
33 | if [ -z "$simdir" ]; then | ||
34 | echo "This script couldn't find your uisimulator/x11 directory. Please enter the" | ||
35 | echo "full path to your uisimulator/x11 directory here:" | ||
36 | |||
37 | simdir=`input` | ||
38 | fi | ||
39 | |||
40 | sed > Makefile \ | ||
41 | -e "s,@SIMDIR@,${simdir},g" \ | ||
42 | -e "s,@TARGET@,${target},g" \ | ||
43 | -e "s,@DEBUG@,${debug},g" \ | ||
44 | -e "s,@DISPLAY@,${display},g" \ | ||
45 | -e "s,@KEYPAD@,${keypad},g" \ | ||
46 | -e "s,@PWD@,${pwd},g" \ | ||
47 | <<EOF | ||
48 | ## Automaticly generated. http://bjorn.haxx.se/rockbox/ | ||
49 | |||
50 | SIMDIR=@SIMDIR@ | ||
51 | DEBUG=@DEBUG@ | ||
52 | TARGET=@TARGET@ | ||
53 | DISPLAY=@DISPLAY@ | ||
54 | KEYPAD=@KEYPAD@ | ||
55 | THISDIR="@PWD@" | ||
56 | |||
57 | .PHONE: | ||
58 | |||
59 | all: sim | ||
60 | |||
61 | sim: | ||
62 | make -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) | ||
63 | |||
64 | clean-sim: | ||
65 | make -C \$(SIMDIR) DISPLAY=\$(DISPLAY) KEYPAD=\$(KEYPAD) OBJDIR=\$(THISDIR) clean | ||
66 | |||
67 | clean: | ||
68 | make clean-sim | ||
69 | |||
70 | EOF | ||
71 | |||
72 | echo "Created Makefile" | ||
73 | } | ||
74 | |||
75 | # get our current directory | ||
76 | pwd=`pwd`; | ||
22 | 77 | ||
23 | if [ "$target" = "update" ]; then | 78 | if [ "$target" = "update" ]; then |
24 | target="" | 79 | target="" |
@@ -29,6 +84,12 @@ if [ "$target" = "update" ]; then | |||
29 | debug=`grep "^DEBUG=" Makefile | cut -d= -f2-` | 84 | debug=`grep "^DEBUG=" Makefile | cut -d= -f2-` |
30 | fi | 85 | fi |
31 | fi | 86 | fi |
87 | else | ||
88 | |||
89 | echo "Setup your Rockbox build environment." | ||
90 | echo "http://bjorn.haxx.se/rockbox/" | ||
91 | echo "" | ||
92 | |||
32 | fi | 93 | fi |
33 | 94 | ||
34 | if [ -z "$target" ]; then | 95 | if [ -z "$target" ]; then |
@@ -49,18 +110,22 @@ if [ -z "$target" ]; then | |||
49 | 110 | ||
50 | 1) | 111 | 1) |
51 | target="-DARCHOS_PLAYER_OLD" | 112 | target="-DARCHOS_PLAYER_OLD" |
113 | display="-DHAVE_LCD_CHARCELLS" | ||
114 | keypad="-DHAVE_PLAYER_KEYPAD" | ||
52 | ;; | 115 | ;; |
116 | |||
53 | 2) | 117 | 2) |
54 | target="-DARCHOS_PLAYER" | 118 | target="-DARCHOS_PLAYER" |
119 | display="-DHAVE_LCD_CHARCELLS" | ||
120 | keypad="-DHAVE_PLAYER_KEYPAD" | ||
55 | ;; | 121 | ;; |
56 | 122 | ||
57 | 3) | 123 | *|3) |
58 | target="-DARCHOS_RECORDER" | 124 | target="-DARCHOS_RECORDER" |
125 | display="-DHAVE_LCD_BITMAP" | ||
126 | keypad="-DHAVE_RECORDER_KEYPAD" | ||
59 | ;; | 127 | ;; |
60 | 128 | ||
61 | *) | ||
62 | target="-DARCHOS_RECORDER" | ||
63 | ;; | ||
64 | esac | 129 | esac |
65 | fi | 130 | fi |
66 | 131 | ||
@@ -70,12 +135,16 @@ if [ -z "$debug" ]; then | |||
70 | # Figure out debug on/off | 135 | # Figure out debug on/off |
71 | # | 136 | # |
72 | echo "" | 137 | echo "" |
73 | echo "Build DEBUG version? (y/N)" | 138 | echo "Build (N)ormal, (D)ebug or (S)imulated version? (N)" |
74 | 139 | ||
75 | option=`input`; | 140 | option=`input`; |
76 | 141 | ||
77 | case $option in | 142 | case $option in |
78 | [Yy]) | 143 | [Ss]) |
144 | debug="SIMULATOR=1" | ||
145 | simulator="yes" | ||
146 | ;; | ||
147 | [Dd]) | ||
79 | debug="DEBUG=1" | 148 | debug="DEBUG=1" |
80 | ;; | 149 | ;; |
81 | *) | 150 | *) |
@@ -85,6 +154,11 @@ if [ -z "$debug" ]; then | |||
85 | esac | 154 | esac |
86 | fi | 155 | fi |
87 | 156 | ||
157 | if [ -n "$simulator" ]; then | ||
158 | # we deal with the simulator Makefile separately | ||
159 | simulator | ||
160 | exit | ||
161 | fi | ||
88 | 162 | ||
89 | ################################################################## | 163 | ################################################################## |
90 | # Figure out where the firmware code is! | 164 | # Figure out where the firmware code is! |
@@ -126,8 +200,6 @@ if [ -z "$appsdir" ]; then | |||
126 | appsdir=`input` | 200 | appsdir=`input` |
127 | fi | 201 | fi |
128 | 202 | ||
129 | pwd=`pwd`; | ||
130 | |||
131 | sed > Makefile \ | 203 | sed > Makefile \ |
132 | -e "s,@FIRMDIR@,${firmdir},g" \ | 204 | -e "s,@FIRMDIR@,${firmdir},g" \ |
133 | -e "s,@APPSDIR@,${appsdir},g" \ | 205 | -e "s,@APPSDIR@,${appsdir},g" \ |