summaryrefslogtreecommitdiff
path: root/config.lib
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-01-21 14:14:27 +0000
committertruelight <truelight@openttd.org>2007-01-21 14:14:27 +0000
commit805246015f32d9ecd601c9d6d17513f53ebeab44 (patch)
tree224ce7e56342b84c5d036a12ac6b6795779a566c /config.lib
parent4241f1eb201c501533b865f41076b3623faa8abc (diff)
downloadopenttd-805246015f32d9ecd601c9d6d17513f53ebeab44.tar.xz
(svn r8304) [WinCE] -Add: added configure detection for WinCE.
Compiling doesn't work, neither does running, but it is a first step in developing an official WinCE port
Diffstat (limited to 'config.lib')
-rw-r--r--config.lib24
1 files changed, 14 insertions, 10 deletions
diff --git a/config.lib b/config.lib
index 9583b4cd7..deccd608e 100644
--- a/config.lib
+++ b/config.lib
@@ -286,10 +286,10 @@ check_params() {
echo " Available options are: --endian=[AUTO|LE|BE]"
exit 1
fi
- # OS only allows DETECT, UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, and MINGW, OS2
- if ! echo $os | grep -Eq "^(DETECT|UNIX|OSX|FREEBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2)$"; then
+ # OS only allows DETECT, UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, and WINCE
+ if ! echo $os | grep -Eq "^(DETECT|UNIX|OSX|FREEBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|WINCE)$"; then
echo "configure: error: invalid option --os=$os"
- echo " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2]"
+ echo " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2|WINCE]"
exit 1
fi
# enable_debug should be between 0 and 4
@@ -648,14 +648,17 @@ make_cflags_and_ldflags() {
LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32"
fi
- if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ]; then
+ if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "WINCE" ]; then
LIBS="$LIBS -lpthread"
LIBS="$LIBS -lrt"
fi
- if [ "$os" != "CYGWIN" ] && [ "$os" != "MINGW" ]; then
+ if [ "$os" != "CYGWIN" ] && [ "$os" != "MINGW" ] && [ "$os" != "WINCE" ]; then
LIBS="$LIBS -lc"
fi
+ if [ "$os" = "WINCE" ]; then
+ LIBS="$LIBS -lcoredll -lcorelibc -laygshell -e WinMainCRTStartup"
+ fi
if [ "$os" = "MORPHOS" ]; then
# -Wstrict-prototypes generates much noise because of system headers
@@ -678,7 +681,7 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS -DUNIX"
fi
# And others like Windows
- if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
+ if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
CFLAGS="$CFLAGS -DWIN"
fi
@@ -996,7 +999,7 @@ check_cxx_host() {
}
check_windres() {
- if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
+ if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
check_compiler "host windres" "windres" "$host" "$windres" "$WINDRES" "windres" "windres" "2" "-V"
fi
}
@@ -1101,7 +1104,7 @@ check_makedepend() {
detect_os() {
if [ $os = "DETECT" ]; then
- # Detect UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW and OS2
+ # Detect UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, and WINCE
# Try first via dumpmachine, then via uname
os=`echo "$host" | tr [:upper:] [:lower:] | awk '
@@ -1114,6 +1117,7 @@ detect_os() {
/cygwin/ { print "CYGWIN"; exit}
/mingw/ { print "MINGW"; exit}
/os2/ { print "OS2"; exit}
+ /wince/ { print "WINCE"; exit}
'`
if [ -z "$os" ]; then
@@ -1133,7 +1137,7 @@ detect_os() {
if [ -z "$os" ]; then
log 1 "detecting OS... none detected"
log 1 "I couldn't detect your OS. Please use --with-os=OS to force one"
- log 1 "Allowed values are: UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, and MINGW"
+ log 1 "Allowed values are: UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2 and WINCE"
exit 1
fi
@@ -1740,7 +1744,7 @@ showhelp() {
echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]"
echo " --os=OS the OS we are compiling for [DETECT]"
echo " DETECT/UNIX/OSX/FREEBSD/MORPHOS/BEOS/"
- echo " SUNOS/CYGWIN/MINGW"
+ echo " SUNOS/CYGWIN/MINGW/OS2/WINCE"
echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)"
echo " --revision=rXXXX overwrite the revision detection."
echo " Use with care!"