forked from len0rd/rockbox
Adjustments to allow generating a Makefile for building win32 simulator
cross-compiled. Based on the excellent patch from Bill Napier. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1517 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4f26c288ca
commit
60fe9dfa4a
1 changed files with 28 additions and 4 deletions
32
tools/configure
vendored
32
tools/configure
vendored
|
|
@ -17,22 +17,43 @@ input() {
|
||||||
}
|
}
|
||||||
|
|
||||||
simul () {
|
simul () {
|
||||||
|
|
||||||
|
if [ -z "$simver" ]; then
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# Figure out win32/x11 GUI
|
||||||
|
#
|
||||||
|
echo ""
|
||||||
|
echo "Build (W)in32 or (X)11 GUI version? (X)"
|
||||||
|
|
||||||
|
option=`input`;
|
||||||
|
|
||||||
|
case $option in
|
||||||
|
[Ww])
|
||||||
|
simver="win32"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
simver="x11"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
# Figure out where the firmware code is!
|
# Figure out where the firmware code is!
|
||||||
#
|
#
|
||||||
|
|
||||||
simfile="x11/lcd-x11.c" # a file to check for in the uisimulator root dir
|
simfile="$simver/lcd-$simver.c" # a file to check for in the uisimulator root dir
|
||||||
|
|
||||||
for dir in uisimulator . .. ../uisimulator ../../uisimulator; do
|
for dir in uisimulator . .. ../uisimulator ../../uisimulator; do
|
||||||
if [ -f "$dir/$simfile" ]; then
|
if [ -f "$dir/$simfile" ]; then
|
||||||
simdir="$dir/x11"
|
simdir="$dir/$simver"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "$simdir" ]; then
|
if [ -z "$simdir" ]; then
|
||||||
echo "This script couldn't find your uisimulator/x11 directory. Please enter the"
|
echo "This script couldn't find your uisimulator/$simver directory. Please enter the"
|
||||||
echo "full path to your uisimulator/x11 directory here:"
|
echo "full path to your uisimulator/$simver directory here:"
|
||||||
|
|
||||||
simdir=`input`
|
simdir=`input`
|
||||||
fi
|
fi
|
||||||
|
|
@ -44,6 +65,7 @@ sed > Makefile \
|
||||||
-e "s,@DISPLAY@,${display},g" \
|
-e "s,@DISPLAY@,${display},g" \
|
||||||
-e "s,@KEYPAD@,${keypad},g" \
|
-e "s,@KEYPAD@,${keypad},g" \
|
||||||
-e "s,@PWD@,${pwd},g" \
|
-e "s,@PWD@,${pwd},g" \
|
||||||
|
-e "s,@SIMVER@,${simver},g" \
|
||||||
<<EOF
|
<<EOF
|
||||||
## Automaticly generated. http://bjorn.haxx.se/rockbox/
|
## Automaticly generated. http://bjorn.haxx.se/rockbox/
|
||||||
|
|
||||||
|
|
@ -53,6 +75,7 @@ TARGET=@TARGET@
|
||||||
DISPLAY=@DISPLAY@
|
DISPLAY=@DISPLAY@
|
||||||
KEYPAD=@KEYPAD@
|
KEYPAD=@KEYPAD@
|
||||||
THISDIR="@PWD@"
|
THISDIR="@PWD@"
|
||||||
|
SIMVER=@SIMVER@
|
||||||
VERSION=\$(shell date +%y%m%d-%H%M)
|
VERSION=\$(shell date +%y%m%d-%H%M)
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
|
|
@ -103,6 +126,7 @@ if [ "$target" = "update" ]; then
|
||||||
simulator="yes"
|
simulator="yes"
|
||||||
display=`grep "^DISPLAY=" Makefile | cut -d= -f2-`
|
display=`grep "^DISPLAY=" Makefile | cut -d= -f2-`
|
||||||
keypad=`grep "^KEYPAD=" Makefile | cut -d= -f2-`
|
keypad=`grep "^KEYPAD=" Makefile | cut -d= -f2-`
|
||||||
|
simver=`grep "^SIMVER=" Makefile | cut -d= -f2-`
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue