summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-09-23 09:00:44 +0000
committerThomas Martitz <kugel@rockbox.org>2009-09-23 09:00:44 +0000
commiteab9a72abd93c768653f772ced6c74a816ed17d1 (patch)
treef65941990a561849f39fd7ec86879dffd266b3e3
parent77c4a38f0566384eefd7bd6cd35d9bc1675ffea6 (diff)
downloadrockbox-eab9a72abd93c768653f772ced6c74a816ed17d1.tar.gz
rockbox-eab9a72abd93c768653f772ced6c74a816ed17d1.zip
Fix checkwps (configure actually) to compile without SDL, and add samsung YH* to targets.txt
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22794 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--tools/checkwps/targets.txt3
-rwxr-xr-xtools/configure74
2 files changed, 50 insertions, 27 deletions
diff --git a/tools/checkwps/targets.txt b/tools/checkwps/targets.txt
index 228602ed21..e109a7c9a1 100644
--- a/tools/checkwps/targets.txt
+++ b/tools/checkwps/targets.txt
@@ -39,3 +39,6 @@ SANSA_FUZE fuze
39ELIO_TPJ1022 tpj1022 39ELIO_TPJ1022 tpj1022
40ONDA_VX747 ondavx747 40ONDA_VX747 ondavx747
41ONDA_VX777 ondavx777 41ONDA_VX777 ondavx777
42SAMSUNG_YH820 yh820
43SAMSUNG_YH920 yh920
44SAMSUNG_YH925 yh925
diff --git a/tools/configure b/tools/configure
index 693113e19f..4eb6a295f8 100755
--- a/tools/configure
+++ b/tools/configure
@@ -42,11 +42,17 @@ crosswincc () {
42 # naive approach to selecting a mingw cross-compiler on linux/*nix 42 # naive approach to selecting a mingw cross-compiler on linux/*nix
43 echo "Enabling win32 crosscompiling" 43 echo "Enabling win32 crosscompiling"
44 44
45 sdl=`findtool sdl-config`
46 sdl_cflags=""
47 sdl_libs=""
45 prefixtools i586-mingw32msvc- 48 prefixtools i586-mingw32msvc-
46 49 if [ $1 = "sdl" -a -z "$sdl"]; then
50 sdl_cflags="`sdl-config --cflags`"
51 sdl_libs="`sdl-config --libs`"
52 fi
47 # add cross-compiler option(s) 53 # add cross-compiler option(s)
48 GCCOPTS="$GCCOPTS `sdl-config --cflags`" 54 GCCOPTS="$GCCOPTS " + $sdl_cflags
49 LDOPTS="`sdl-config --libs` -mconsole" 55 LDOPTS="-mconsole" + $sdl_libs
50 56
51 output="rockboxui.exe" # use this as output binary name 57 output="rockboxui.exe" # use this as output binary name
52 crosscompile="yes" 58 crosscompile="yes"
@@ -81,15 +87,21 @@ simcc () {
81 GCCOPTS='-W -Wall -g -fno-builtin' 87 GCCOPTS='-W -Wall -g -fno-builtin'
82 88
83 output="rockboxui" # use this as default output binary name 89 output="rockboxui" # use this as default output binary name
84
85 # generic sdl-config checker
86 sdl=`findtool sdl-config` 90 sdl=`findtool sdl-config`
87 91 sdl_cflags=""
88 if [ -z "$sdl" ]; then 92 sdl_libs=""
89 echo "configure didn't find sdl-config, which indicates that you" 93
90 echo "don't have SDL (properly) installed. Please correct and" 94 if [ $1 = "sdl" ]; then
91 echo "re-run configure!" 95 if [ -z "$sdl" ]; then
92 exit 1 96 echo "configure didn't find sdl-config, which indicates that you"
97 echo "don't have SDL (properly) installed. Please correct and"
98 echo "re-run configure!"
99 exit 1
100 else
101 # generic sdl-config checker
102 sdl_cflags=`sdl-config --cflags`
103 sdl_libs=`sdl-config --libs`
104 fi
93 fi 105 fi
94 106
95 # default share option, override below if needed 107 # default share option, override below if needed
@@ -100,8 +112,8 @@ simcc () {
100 echo "Cygwin host detected" 112 echo "Cygwin host detected"
101 113
102 # sdl version 114 # sdl version
103 GCCOPTS="$GCCOPTS `sdl-config --cflags`" 115 GCCOPTS="$GCCOPTS $sdl_cflags"
104 LDOPTS="`sdl-config --libs` -mconsole" 116 LDOPTS="-mconsole $sdl_libs"
105 117
106 output="rockboxui.exe" # use this as output binary name 118 output="rockboxui.exe" # use this as output binary name
107 ;; 119 ;;
@@ -110,35 +122,38 @@ simcc () {
110 echo "MinGW host detected" 122 echo "MinGW host detected"
111 123
112 # sdl version 124 # sdl version
113 GCCOPTS="$GCCOPTS `sdl-config --cflags`" 125 GCCOPTS="$GCCOPTS $sdl_cflags"
114 LDOPTS="`sdl-config --libs` -mconsole" 126 LDOPTS="-mconsole $sdl_libs"
115 127
116 output="rockboxui.exe" # use this as output binary name 128 output="rockboxui.exe" # use this as output binary name
117 ;; 129 ;;
118 130
119 Linux) 131 Linux)
120 echo "Linux host detected" 132 echo "Linux host detected"
121 if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then 133 GCCOPTS="$GCCOPTS $sdl_cflags"
134 LDOPTS="$sdl_libs"
135 # cannot crosscompile without SDL installed
136 if [ -n "$sdl" ]; then
137 if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then
122 # Enable crosscompiling if sdl-config is from Windows SDL 138 # Enable crosscompiling if sdl-config is from Windows SDL
123 crosswincc 139 # overrides GCCOPTS and LDOPTS
124 else 140 crosswincc $1
125 GCCOPTS="$GCCOPTS `sdl-config --cflags`" 141 fi
126 LDOPTS="`sdl-config --libs`"
127 fi 142 fi
128 ;; 143 ;;
129 144
130 FreeBSD) 145 FreeBSD)
131 echo "FreeBSD host detected" 146 echo "FreeBSD host detected"
132 # sdl version 147 # sdl version
133 GCCOPTS="$GCCOPTS `sdl-config --cflags`" 148 GCCOPTS="$GCCOPTS $sdl_cflags"
134 LDOPTS="`sdl-config --libs`" 149 LDOPTS="$sdl_libs"
135 ;; 150 ;;
136 151
137 Darwin) 152 Darwin)
138 echo "Darwin host detected" 153 echo "Darwin host detected"
139 # sdl version 154 # sdl version
140 GCCOPTS="$GCCOPTS `sdl-config --cflags`" 155 GCCOPTS="$GCCOPTS $sdl_cflags"
141 LDOPTS="`sdl-config --libs`" 156 LDOPTS="$sdl_libs"
142 SHARED_FLAG="-dynamiclib -Wl\,-single_module" 157 SHARED_FLAG="-dynamiclib -Wl\,-single_module"
143 ;; 158 ;;
144 159
@@ -181,7 +196,12 @@ EOF
181 # little endian 196 # little endian
182 endian="little" 197 endian="little"
183 fi 198 fi
184 echo "Simulator environment deemed $endian endian" 199
200 if [ $1 = "sdl" ]; then
201 echo "Simulator environment deemed $endian endian"
202 elif [ $1 = "checkwps" ]; then
203 echo "CheckWPS environment deemed $endian endian"
204 fi
185 205
186 # use wildcard here to make it work even if it was named *.exe like 206 # use wildcard here to make it work even if it was named *.exe like
187 # on cygwin 207 # on cygwin
@@ -2513,7 +2533,7 @@ fi
2513 ;; 2533 ;;
2514 [Cc]) 2534 [Cc])
2515 uname=`uname` 2535 uname=`uname`
2516 simcc 2536 simcc "checkwps"
2517 toolset=''; 2537 toolset='';
2518 t_cpu=''; 2538 t_cpu='';
2519 GCCOPTS=''; 2539 GCCOPTS='';
@@ -2565,7 +2585,7 @@ uname=`uname`
2565 2585
2566if [ "yes" = "$simulator" ]; then 2586if [ "yes" = "$simulator" ]; then
2567 # setup compiler and things for simulator 2587 # setup compiler and things for simulator
2568 simcc 2588 simcc "sdl"
2569 2589
2570 if [ -d "simdisk" ]; then 2590 if [ -d "simdisk" ]; then
2571 echo "Subdirectory 'simdisk' already present" 2591 echo "Subdirectory 'simdisk' already present"