* config/global.mk
* config/wce/mingwarm.mk
* config/win/mingw.mk
+ Added logic to support linux wince cross-builds.
My goal was to implement make_gnu_xmingwce.sh functionality
inside make files. I've yet to install cegcc to my Linux,
so I didn't test it yet, but please do. It's experimental
yet and ATM the wce target can be enabled by pointing
HB_CCPATH to cegcc install dir. This may change in the future.
+ In cross build scenarios the default HB_INSTALL_PREFIX is
now /usr/local/harbour-<arch>-<comp>
Somewhat replicating current .sh behaviour. Not exactly
because I wanted to stay with conventions found in other parts
of Harbour. With .sh the dir was:
/usr/local/arm-wince-mingwce-harbour
With new system it's:
/usr/local/harbour-wce-mingwarm
; QUESTION: I'm not familiar with .spec files, but it looks there are
some redunant settings inside harbour-wce-spec.
F.e. HB_CONTRIBLIBS should be left to default and local
Makefiles should do the ground work of deciding whether
a given contrib needs to be built.
CC_HB_USER_PRGFLAGS also seems redundant now, although
there may still be some .sh logic which needs it.
'make -i' seems dangerous option when creating a release
package.
* make_gnu_xmingwce.sh
! Typo in comment.
80 lines
2.1 KiB
Bash
Executable File
80 lines
2.1 KiB
Bash
Executable File
#!/bin/sh
|
|
[ "$BASH" ] || exec bash `which $0` ${1+"$@"}
|
|
#
|
|
# $Id$
|
|
#
|
|
# This script simplifies cross-compiling Harbour for Windows-CE from Unix systems.
|
|
#
|
|
# Copyright 2007 by Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
|
#
|
|
|
|
UNAME=`uname`
|
|
UNAMEL=`echo "$UNAME"|tr A-Z a-z`
|
|
UNAMEU=`echo "$UNAME"|tr a-z A-Z`
|
|
|
|
export HB_ARCHITECTURE=wce
|
|
export HB_COMPILER=mingwarm
|
|
|
|
if [ "$OSTYPE" = "msdosdjgpp" ]; then
|
|
HB_HOST_ARCH="dos"
|
|
HB_HOST_COMP="djgpp"
|
|
else
|
|
HB_HOST_ARCH="${UNAMEL}"
|
|
HB_HOST_COMP="gcc"
|
|
case "$HB_HOST_ARCH" in
|
|
*windows*|*mingw32*|msys*) HB_HOST_ARCH="win"; HB_HOST_COMP="mingw" ;;
|
|
*dos) HB_HOST_ARCH="dos" ;;
|
|
*bsd) HB_HOST_ARCH="bsd" ;;
|
|
esac
|
|
fi
|
|
|
|
if [ "$HB_HOST_ARCH" != "win" ] && \
|
|
[ "$HB_HOST_ARCH" != "wce" ]; then
|
|
export CC_HB_USER_PRGFLAGS="-D__PLATFORM__WINDOWS -undef:__PLATFORM__UNIX -undef:__PLATFORM__$UNAMEU"
|
|
fi
|
|
|
|
[ -n "$HB_INSTALL_PREFIX" ] || \
|
|
export HB_INSTALL_PREFIX="/usr/local/arm-wince-mingwce-harbour"
|
|
|
|
# default mingwce installation path
|
|
[ -z "$HB_CCPATH" ] && HB_CCPATH="/opt/mingw32ce/bin"
|
|
|
|
# mingwce executables prefix - this
|
|
if [ -z "$HB_CCPREFIX" ]; then
|
|
if [ -x "${HB_CCPATH}/arm-wince-mingw32ce-gcc" ]; then
|
|
HB_CCPREFIX="arm-wince-mingw32ce-"
|
|
else
|
|
if [ -x "${HB_CCPATH}/arm-mingw32ce-gcc" ]; then
|
|
HB_CCPREFIX="arm-mingw32ce-"
|
|
else
|
|
echo "mingwce compiler executable not found. Ensure you have mingwce package installed in"
|
|
echo "/opt/mingw32ce dir, or (alternatively) set environment variable HB_CCPATH to a mingwce"
|
|
echo "installation directory"
|
|
exit 1
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
export HB_CCPATH="${HB_CCPATH}:"
|
|
export PATH="${HB_CCPATH}${PATH}"
|
|
export HB_CCPREFIX
|
|
export HB_TOOLS_PREF="hbce"
|
|
export HB_XBUILD="wce"
|
|
[ "${HB_HOST_BUILD}" = "all" ] || export HB_HOST_BUILD="lib"
|
|
|
|
case "$1" in
|
|
tgz)
|
|
ext=$1
|
|
shift
|
|
. `dirname $0`/make_${ext}.sh "$@"
|
|
;;
|
|
*)
|
|
if [ "$HB_HOST_ARCH" = "bsd" ] || [ "$HB_HOST_ARCH" = "hpux" ]
|
|
then
|
|
gmake $*
|
|
else
|
|
make $*
|
|
fi
|
|
;;
|
|
esac
|