2009-04-02 11:19 UTC+0200 Viktor Szakats (harbour.01 syenar hu)

* make_gnu_xmingwce.sh
  * bin/hb-mkdyn.sh
  * bin/hb-func.sh
  * bin/postinst.sh
  * mpkg_win.bat
  * external/sqlite3/Makefile
  * make_gnu.sh
    + Added 'wce' ARCH support and 'mingwce' COMP support where needed.
    ; TODO: Start using above in local contrib Makefiles.

  * bin/hb-mkdyn.sh
    + Added comment on how to generate implib when creating the .dll.

  * bin/hb-mkdyn.bat
    ! Added missing setlocal.

  * ChangeLog
    ! Typos.

  * make_gnu.bat
    + Will now exit with message if tried to run with mingw/cygwin
      targets.
This commit is contained in:
Viktor Szakats
2009-04-02 09:20:42 +00:00
parent 3672e94c50
commit 6087611f6c
10 changed files with 79 additions and 23 deletions

View File

@@ -8,6 +8,30 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-04-02 11:19 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* make_gnu_xmingwce.sh
* bin/hb-mkdyn.sh
* bin/hb-func.sh
* bin/postinst.sh
* mpkg_win.bat
* external/sqlite3/Makefile
* make_gnu.sh
+ Added 'wce' ARCH support and 'mingwce' COMP support where needed.
; TODO: Start using above in local contrib Makefiles.
* bin/hb-mkdyn.sh
+ Added comment on how to generate implib when creating the .dll.
* bin/hb-mkdyn.bat
! Added missing setlocal.
* ChangeLog
! Typos.
* make_gnu.bat
+ Will now exit with message if tried to run with mingw/cygwin
targets.
2009-04-01 22:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/doc/Makefile
! removed unexisting license.txt file
@@ -85,7 +109,7 @@
! Fixed silly typo causing RTE if compiler autodetection
fails to detect any tier-one compilers (or none).
+ Added automatic postfixing external Harbour executable
name if hbmk2 executable name is also prefixed. Currently
name if hbmk2 executable name is also postfixed. Currently
-x64 and -ia64 are recognized. Useful to call harbour-x64.exe
/ harbour-ia64.exe when hbmk2-x64.exe / hbmk2-ia64.exe is used.
@@ -149,7 +173,7 @@
! Excluded for pocc64 due to compile errors.
* source/rtl/hbinet.c
! Fixed to warnings for pocc64.
! Fixed two warnings for pocc64.
2009-03-31 12:45 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* bin/hb-mkdyn.bat

View File

@@ -89,7 +89,7 @@ mk_hbgetlibs()
if [ -z "$@" ]
then
libs=""
if [ "$HB_COMPILER" != "mingwce" ]
if [ "$HB_COMPILER" != "mingwce" ] && [ "$HB_ARCHITECTURE" != "wce" ]
then
libs="$libs gtwin"
fi
@@ -106,7 +106,7 @@ mk_hbgetlibsctb()
if [ -z "$@" ]
then
libs=""
if [ "$HB_COMPILER" = "mingwce" ]
if [ "$HB_COMPILER" = "mingwce" ] || [ "$HB_ARCHITECTURE" = "wce" ]
then
libs="$libs gtwin"
fi
@@ -131,7 +131,8 @@ mk_hbtools()
hb_static="yes"
hb_static_default=" (default)"
hb_exesuf=".exe"
elif [ "${HB_ARCHITECTURE}" = "win" ]; then
elif [ "${HB_ARCHITECTURE}" = "win" ] || \
[ "${HB_ARCHITECTURE}" = "wce" ]; then
hb_tool="$1/${hb_pref}-build"
hb_path_separator=":"
if [ "${HB_MK_STATIC}" = "yes" ]; then
@@ -187,10 +188,12 @@ mk_hbtools()
HB_SYS_LIBS="-lz ${HB_SYS_LIBS}"
hb_libs="${hb_libs//hbzlib/}"
fi
if [ "${HB_COMPILER}" = "mingw" ] || [ "${HB_COMPILER}" = "mingw64" ]; then
if [ "${HB_COMPILER}" = "mingw" ] || \
[ "${HB_COMPILER}" = "mingw64" ]; then
HB_SYS_LIBS="${HB_SYS_LIBS} -luser32 -lwinspool -lgdi32 -lcomctl32 -lcomdlg32 -lole32 -loleaut32 -luuid -lws2_32"
HB_WITHOUT_X11="yes"
elif [ "${HB_COMPILER}" = "mingwce" ]; then
elif [ "${HB_COMPILER}" = "mingwce" ] || \
[ "${HB_COMPILER}" = "mingwarm" ]; then
HB_SYS_LIBS="${HB_SYS_LIBS} -lwininet -lws2 -lcommdlg -lcommctrl -luuid -lole32"
HB_WITHOUT_X11="yes"
elif [ "${HB_COMPILER}" = "djgpp" ]; then
@@ -427,7 +430,7 @@ SYSTEM_LIBS="${HB_SYS_LIBS}"
# use pthread system library for MT programs
if [ "\${HB_MT}" = "MT" ]; then
case "\${HB_ARCHITECTURE}" in
dos|win|os2)
dos|win|wce|os2)
;;
*)
SYSTEM_LIBS="-lpthread \${SYSTEM_LIBS}"
@@ -511,7 +514,8 @@ else
pref="lib"
ext=".dylib"
LN_OPT="\${LN_OPT} -bind_at_load -multiply_defined suppress"
elif [ "\${HB_ARCHITECTURE}" = "win" ]; then
elif [ "\${HB_ARCHITECTURE}" = "win" ] || \
[ "\${HB_ARCHITECTURE}" = "wce" ]; then
pref=""
ext=".dll"
HB_LNK_ATTR="__attribute__ ((dllimport))"
@@ -575,7 +579,8 @@ if [ "\${HB_COMPILER}" = "mingw" ] || [ "\${HB_COMPILER}" = "mingw64" ]; then
elif [ "\${HB_MODE}" = "std" ]; then
l="hbmainstd"
fi
elif [ "\${HB_COMPILER}" = "mingwce" ]; then
elif [ "\${HB_COMPILER}" = "mingwce" ] || \
[ "\${HB_COMPILER}" = "mingwarm" ]; then
if [ "\${HB_MODE}" = "std" ]; then
l="hbmainstd"
else
@@ -728,7 +733,8 @@ mk_hblibso()
name=`get_solibname`
hb_rootdir="${1-.}"
if [ "${HB_ARCHITECTURE}" = "win" ]; then
if [ "${HB_ARCHITECTURE}" = "win" ] || \
[ "${HB_ARCHITECTURE}" = "wce" ]; then
hb_ver=`get_hbver_win "${hb_rootdir}"`
else
hb_ver=`get_hbver "${hb_rootdir}"`
@@ -754,7 +760,8 @@ mk_hblibso()
fi
if [ "${HB_COMPILER}" = "mingw" ] || [ "${HB_COMPILER}" = "mingw64" ]; then
linker_options="${linker_options} -luser32 -lwinspool -lgdi32 -lcomctl32 -lcomdlg32 -lole32 -loleaut32 -luuid -lws2_32"
elif [ "${HB_COMPILER}" = "mingwce" ]; then
elif [ "${HB_COMPILER}" = "mingwce" ] || \
[ "${HB_COMPILER}" = "mingwarm" ]; then
linker_options="${linker_options} -lwininet -lws2 -lcommdlg -lcommctrl -luuid -lole32"
elif [ "${HB_COMPILER}" = "djgpp" ]; then
linker_options="${linker_options}"
@@ -824,12 +831,14 @@ mk_hblibso()
lib_ext=".dylib"
full_lib_name="lib${name}.${hb_ver}${lib_ext}"
full_lib_name_mt="lib${name}mt.${hb_ver}${lib_ext}"
elif [ "${HB_ARCHITECTURE}" = "win" ]; then
elif [ "${HB_ARCHITECTURE}" = "win" ] || \
[ "${HB_ARCHITECTURE}" = "wce" ]; then
lib_ext=".dll"
if [ "${HB_COMPILER}" = "mingw64" ]; then
full_lib_name="${name}-${hb_ver}-x64${lib_ext}"
full_lib_name_mt="${name}mt-${hb_ver}-x64${lib_ext}"
elif [ "${HB_COMPILER}" = "mingwce" ]; then
elif [ "${HB_COMPILER}" = "mingwce" ] || \
[ "${HB_COMPILER}" = "mingwarm" ]; then
full_lib_name="${name}-${hb_ver}-arm${lib_ext}"
full_lib_name_mt="${name}mt-${hb_ver}-arm${lib_ext}"
else
@@ -860,7 +869,8 @@ mk_hblibso()
do
if [ -f $l ]
then
if [ "${HB_ARCHITECTURE}" = "win" ]; then
if [ "${HB_ARCHITECTURE}" = "win" ] || \
[ "${HB_ARCHITECTURE}" = "wce" ]; then
if [ "${HB_XBUILD}" = "" ]; then
(cd "$dir"
mv "${HB_LIB_INSTALL}/$l" "${HB_BIN_INSTALL}")

View File

@@ -12,7 +12,10 @@ rem ---------------------------------------------------------------
rem NOTE: .prg files have to be compiled with -n1
rem NOTE: .c files have to be compiled with -DHB_DYNLIB
if not "%OS%" == "Windows_NT" ( echo This script needs Windows NT or newer. && goto END )
if not "%OS%" == "Windows_NT" ( echo This script needs Windows NT or newer. && goto :EOF )
setlocal
if "%HB_ARCHITECTURE%" == "" ( echo HB_ARCHITECTURE needs to be set. && goto END )
if "%HB_COMPILER%" == "" ( echo HB_COMPILER needs to be set. && goto END )

View File

@@ -34,6 +34,7 @@ esac
case "$hb_arch" in
darwin) SLIB_EXT=".dylib" ;;
win) SLIB_EXT=".dll" ;;
wce) SLIB_EXT=".dll" ;;
os2) SLIB_EXT=".dll" ;;
hpux) SLIB_EXT=".sl" ;;
*) SLIB_EXT=".so" ;;
@@ -132,11 +133,13 @@ if [ "${SLIB_EXT}" = ".dylib" ]; then
ln -sf "${FULLNAME}" "${DSTDIR}${BASE}${SLIB_EXT}"
elif [ "${SLIB_EXT}" = ".dll" ]; then
FULLNAME="${LIB_NAME}${SLIB_EXT}"
if [ "$HB_COMPILER" = "mingwce" ]; then
if [ "$HB_COMPILER" = "mingwce" ] || \
[ "$HB_COMPILER" = "mingwarm" ]; then
SYSLIBS=" -lwininet -lws2"
else
SYSLIBS="-luser32 -lws2_32 -ladvapi32 -lgdi32"
fi
# -Wl,--output-def,testdll.def,--out-implib,libtestdll.a
${HB_CCPREFIX}gcc -shared -o "${FULLNAME}" $OBJLST ${linker_options} ${HB_USER_LDFLAGS} ${SYSLIBS} ${HB_DLLIBS} && \
cd "${dir}" && \
rm -f "${DSTDIR}${FULLNAME}" && \

View File

@@ -45,6 +45,7 @@ if [ "$HB_COMPILER" = "gcc" ] || \
[ "$HB_COMPILER" = "mingw" ] || \
[ "$HB_COMPILER" = "mingw64" ] || \
[ "$HB_COMPILER" = "mingwce" ] || \
[ "$HB_COMPILER" = "mingwarm" ] || \
[ "$HB_COMPILER" = "cygwin" ] || \
[ "$HB_COMPILER" = "djgpp" ] || \
[ "$HB_COMPILER" = "icc" ]
@@ -102,6 +103,7 @@ then
[ "$HB_COMPILER" = "mingw" ] || \
[ "$HB_COMPILER" = "mingw64" ] || \
[ "$HB_COMPILER" = "mingwce" ] || \
[ "$HB_COMPILER" = "mingwarm" ] || \
[ "$HB_COMPILER" = "icc" ]; then
mk_hblibso "${hb_root}"
fi

View File

@@ -14,6 +14,9 @@ endif
ifeq ($(HB_COMPILER),poccce)
HB_USER_CFLAGS += -D_WIN32_WCE
endif
ifeq ($(HB_ARCHITECTURE),wce)
HB_USER_CFLAGS += -D_WIN32_WCE
endif
ROOT = ../../

View File

@@ -30,6 +30,12 @@ if "%HB_ARCHITECTURE%" == "" set HB_ARCHITECTURE=dos
if "%HB_COMPILER%" == "" if not "%WINDIR%" == "" goto HELP
if "%HB_COMPILER%" == "" set HB_COMPILER=djgpp
if "%HB_COMPILER%" == "mingw" ( echo For %HB_COMPILER% builds, use 'sh make_gnu.sh'. See INSTALL for more. && goto :EOF )
if "%HB_COMPILER%" == "mingw64" ( echo For %HB_COMPILER% builds, use 'sh make_gnu.sh'. See INSTALL for more. && goto :EOF )
if "%HB_COMPILER%" == "mingwce" ( echo For %HB_COMPILER% builds, use 'sh make_gnu.sh'. See INSTALL for more. && goto :EOF )
if "%HB_COMPILER%" == "mingwarm" ( echo For %HB_COMPILER% builds, use 'sh make_gnu.sh'. See INSTALL for more. && goto :EOF )
if "%HB_COMPILER%" == "cygwin" ( echo For %HB_COMPILER% builds, use 'sh make_gnu.sh'. See INSTALL for more. && goto :EOF )
if "%HB_INSTALL_PREFIX%" == "" if "%OS%" == "Windows_NT" set HB_INSTALL_PREFIX=%~dp0
rem Set to constant value to be consistent with the non-GNU make files.

View File

@@ -133,6 +133,7 @@ then
fi
if [ "$HB_ARCHITECTURE" = "win" ] || \
[ "$HB_ARCHITECTURE" = "wce" ] || \
[ "$HB_ARCHITECTURE" = "dos" ] || \
[ "$HB_ARCHITECTURE" = "os2" ]; then
if [ -n "$HB_INSTALL_PREFIX" ]; then
@@ -171,6 +172,7 @@ if [ -z "$HB_LIB_INSTALL" ]; then export HB_LIB_INSTALL="$HB_INSTALL_PREFIX/lib$
if [ -z "$HB_INC_INSTALL" ]; then export HB_INC_INSTALL="$HB_INSTALL_PREFIX/include$hb_instsubdir"; fi
if [ "$HB_ARCHITECTURE" = "win" ] || \
[ "$HB_ARCHITECTURE" = "wce" ] || \
[ "$HB_ARCHITECTURE" = "dos" ] || \
[ "$HB_ARCHITECTURE" = "os2" ]; then
if [ -z "$HB_DOC_INSTALL" ]; then export HB_DOC_INSTALL="$HB_INSTALL_PREFIX/doc"; fi

View File

@@ -34,7 +34,8 @@ else
fi
CC_HB_USER_PRGFLAGS=""
if [ "$HB_HOST_ARCH" != "win" ]; then
if [ "$HB_HOST_ARCH" != "win" ] && \
[ "$HB_HOST_ARCH" != "wce" ]; then
CC_HB_USER_PRGFLAGS="$CC_HB_USER_PRGFLAGS -D__PLATFORM__WINDOWS -undef:__PLATFORM__UNIX -undef:__PLATFORM__$UNAMEU"
fi
@@ -48,7 +49,8 @@ export HB_USER_PRGFLAGS="$CC_HB_USER_PRGFLAGS $HB_USER_PRGFLAGS"
# default cegcc instalation path
[ -z "$HB_CCPATH" ] && HB_CCPATH="/opt/mingw32ce/bin"
if [ "$HB_HOST_ARCH" != "win" ]; then
if [ "$HB_HOST_ARCH" != "win" ] && \
[ "$HB_HOST_ARCH" != "wce" ]; then
export PATH="$HB_CCPATH:$PATH"
fi

View File

@@ -50,10 +50,11 @@ set HB_BUILD_IMPLIB=no
set HB_USER_CFLAGS=%HB_USER_CFLAGS% -DHB_FM_STATISTICS_OFF
rem ; Build Harbour
if "%HB_COMPILER%" == "mingw" ( sh make_gnu.sh clean install && goto MK_PKG )
if "%HB_COMPILER%" == "mingw64" ( sh make_gnu.sh clean install && goto MK_PKG )
if "%HB_COMPILER%" == "mingwce" ( sh make_gnu.sh clean install && goto MK_PKG )
if "%HB_COMPILER%" == "cygwin" ( sh make_gnu.sh clean install && goto MK_PKG )
if "%HB_COMPILER%" == "mingw" ( sh make_gnu.sh clean install && goto MK_PKG )
if "%HB_COMPILER%" == "mingw64" ( sh make_gnu.sh clean install && goto MK_PKG )
if "%HB_COMPILER%" == "mingwce" ( sh make_gnu.sh clean install && goto MK_PKG )
if "%HB_COMPILER%" == "mingwarm" ( sh make_gnu.sh clean install && goto MK_PKG )
if "%HB_COMPILER%" == "cygwin" ( sh make_gnu.sh clean install && goto MK_PKG )
call make_gnu.bat
:MK_PKG