* harbour/make_gnu.sh
+ harbour/make_xmingw.sh
* harbour/bin/hb-mkslib.sh
* harbour/bin/postinst.sh
* harbour/config/w32/mingw32.cf
* added support for cross compilation (Windows binaries at Linux) with
MinGW - borrowed from xHarbour Phil Krylov solution
* harbour/contrib/btree/hb_btree.c
* casting
* harbour/contrib/libct/files.c
! fixed iAttr initialization in SETFATTR()
* harbour/contrib/ole/ole2.c
! fixed names of included files
* harbour/contrib/rdd_ads/ace.h
* cover #pragma warning( error : 4706 ) by !defined( __GNUC__ )
* harbour/include/hbapi.h
* harbour/include/hbdefs.h
+ harbour/source/common/hbarch.c
* harbour/source/common/Makefile
* added functions for machine independent double and long long conversions
(my code borrowed from xHarbour)
* harbour/include/hbapifs.h
* synced file IO with xHarbour - it fixes some problems, adds some
missing functionality and long (64bit) file support for Windows.
For Linux I added it some time ago.
* harbour/include/hbcomp.h
* changed 'char cScope' to 'HB_SYMBOLSCOPE cScope'
* harbour/source/common/hbfsapi.c
! fixed some possible buffer overflow
* harbour/source/common/hbstr.c
* synced with xHarbour
* harbour/source/common/hbver.c
+ added hb_iswinnt() (borrowed from xHarbour)
* harbour/source/compiler/cmdcheck.c
+ added -undef: compiler switch (borrowed from xHarbour)
* harbour/source/compiler/gencobj.c
* cleanup
* harbour/source/pp/ppcore.c
! fixed path delimiters in included file names
* harbour/source/rtl/Makefile
+ harbour/source/rtl/fserror.c
+ added C -> OS file error trnalsations - not perfect but better then
the used hacks (borrowed from xHarbour)
* harbour/source/rtl/file.c
* use hb_fileNameConv() instead of hb_filecase() - hb_fileNameConv()
is the only one function to make file name conversions dependent on
some SETs.
* harbour/source/rtl/filesys.c
* synced file IO with xHarbour - it fixes some problems, adds some
missing functionality and long (64bit) file support for Windows.
For Linux I added it some time ago.
* harbour/source/rtl/fstemp.c
* synced with xHarbour
* harbour/source/rtl/strings.c
* use ULONG instead of size_t in hb_strnicmp declaration - we have to
decide what we should use. Using size_t or its Harbour version f.e.
HB_SIZE_T seems to be reasonable but it has to be global - redefining
single functions does not make sense and will create troubles only.
67 lines
1.8 KiB
Bash
67 lines
1.8 KiB
Bash
#!/bin/sh
|
|
[ "$BASH" ] || exec bash `which $0` ${1+"$@"}
|
|
#
|
|
# $Id$
|
|
#
|
|
# This script simplifies cross-compiling xHarbour for Windows from Unix systems.
|
|
#
|
|
# Copyright 2003-2005 by Phil Krylov <phil a t newstar.rinet.ru>
|
|
#
|
|
|
|
UNAME=`uname`
|
|
|
|
export HB_ARCHITECTURE=w32
|
|
export HB_COMPILER=mingw32
|
|
|
|
[ -z "$HB_INSTALL_PREFIX" ] && export HB_INSTALL_PREFIX=/usr/local/mingw32-harbour
|
|
export CC_C_USR="-DHOST_OS_UNIX_COMPATIBLE"
|
|
export C_USR="$CC_C_USR $C_USR"
|
|
export CC_PRG_USR="-D__PLATFORM__Windows -undef:__PLATFORM__UNIX -undef:__PLATFORM__$UNAME"
|
|
export PRG_USR="$CC_PRG_USR $PRG_USR"
|
|
|
|
if [ -f /etc/debian-version ]; then
|
|
MINGW_PREFIX=/usr
|
|
TARGET=i586-mingw32msvc
|
|
CCPREFIX="$TARGET-"
|
|
elif [ -f /etc/gentoo-release ]; then
|
|
MINGW_PREFIX=/opt/xmingw
|
|
TARGET=i386-mingw32msvc
|
|
CCPREFIX="$TARGET-"
|
|
elif [ "$UNAME" = "FreeBSD" ]; then
|
|
MINGW_PREFIX=/usr/local/mingw32
|
|
TARGET="."
|
|
CCPREFIX=""
|
|
elif find /usr/local/bin -name "i[3456]86-mingw*-gcc" -maxdepth 1 &>/dev/null; then
|
|
MINGW_PREFIX=/usr/local
|
|
TARGET=`find /usr/local/bin -name "i[3456]86-mingw*-gcc" -maxdepth 1|sed -e '1 !d' -e 's/.*\(i[3456]86-mingw[^-]*\).*/\1/g'`
|
|
CCPREFIX="$TARGET-"
|
|
else
|
|
echo "Can't determine the location for the MinGW32 cross-compiler."
|
|
echo "Please add your platform to the $0 script."
|
|
exit 1
|
|
fi
|
|
CCPATH="$MINGW_PREFIX/bin:$MINGW_PREFIX/$TARGET/bin:"
|
|
PATH="$CCPATH$PATH"
|
|
|
|
if which harbour &> /dev/null; then
|
|
rm -f -r /tmp/harbour.exe
|
|
ln -s `which harbour` /tmp/harbour.exe
|
|
export HB_BIN_COMPILE=/tmp
|
|
else
|
|
echo "You must have a working Harbour executable for your platform on your PATH."
|
|
exit 1
|
|
fi
|
|
|
|
export PATH CCPATH CCPREFIX
|
|
|
|
case "$1" in
|
|
tgz|gnu)
|
|
ext=$1
|
|
shift
|
|
. `dirname $0`/make_${ext}.sh "$@"
|
|
;;
|
|
*)
|
|
. `dirname $0`/make_gnu.sh "$@"
|
|
;;
|
|
esac
|