diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ae7713620f..a95d35212f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2011-04-20 01:23 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * utils/hbmk2/hbmk2.prg + * config/global.mk + * INSTALL + + added android platform to core build and hbmk2 + untested. + ; TODO: autodetection + 2011-04-19 16:19 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/gtwvg/gtwvg.c ! Reversed: previous commit. Was causing GPF. diff --git a/harbour/INSTALL b/harbour/INSTALL index 72a1b9d808..cfd5152a97 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -523,6 +523,7 @@ HARBOUR hpux - HP-UX sunos - Sun Solaris / OpenSolaris qnx - QNX + android - Android vxworks - VxWorks symbian - Symbian OS (experimental) minix - Minix 3 (tested on 3.1.8; earlier releases probably will not work) @@ -570,6 +571,11 @@ HARBOUR --- gcc - GNU C + android + ------- + gcc - GNU C x86 + gccarm - GNU C ARM + vxworks ------- gcc - GNU C @@ -1332,97 +1338,103 @@ HARBOUR 12. BUILD HOST-PLATFORM/SHELL - TARGET-PLATFORM/COMPILER COMPATIBILITY MATRIX ============================================================================= - host target target - plat plat/comp cpu - - ------ ------------- ---------------------------------------------------- - win -> win/bcc x86 - win -> win/gcc x86 - win -> win/global x86 - win -> win/icc x86 - win -> win/icc64 x86-64 (not supported yet) - win -> win/iccia64 ia64 - win -> win/mingw x86 - win -> win/mingw64 x86-64 - win -> win/msvc x86 - win -> win/msvc64 x86-64 - win -> win/msvcia64 ia64 - win -> win/pocc x86 - win -> win/pocc64 x86-64 - win -> win/watcom x86 - win -> win/xcc x86 - x win -> wce/mingwarm arm - x win -> wce/mingw x86 (not fully supported yet) - x win -> wce/poccarm arm - x win -> wce/msvcarm arm - x win -> wce/msvcmips mips (not supported yet) - x win -> wce/msvcsh sh (not supported yet) - x win -> wce/msvc x86 (not supported yet) - x win -> dos/djgpp x86 (on Windows x86 hosts only) - x win -> dos/watcom x86 - x win -> os2/watcom x86 - x win -> linux/watcom x86 - x win -> vxworks/gcc (CPU cross-builds possible: x86, arm, mips, ppc) - x win -> vxworks/diab (CPU cross-builds possible: x86, arm, mips, ppc, sparc) - x win -> symbian/gcc arm - x win -> cygwin/gcc x86 - dos -> dos/djgpp x86 - dos -> dos/watcom x86 - x dos -> win/watcom x86 - x dos -> os2/watcom x86 - x dos -> linux/watcom x86 - os2 -> os2/gcc x86 - os2 -> os2/watcom x86 - x os2 -> win/watcom x86 - x os2 -> dos/watcom x86 - x os2 -> linux/watcom x86 - linux -> linux/gcc (CPU cross-builds possible) - linux -> linux/clang (CPU cross-builds possible) - linux -> linux/icc (CPU cross-builds possible: x86, x86-64, ia64) - linux -> linux/sunpro (CPU cross-builds possible: x86, x86-64) - linux -> linux/open64 (CPU cross-builds possible: x86-64, ia64, ...) - x linux -> wce/mingwarm arm - x linux -> wce/mingw x86 - x linux -> win/mingw x86 - x linux -> win/mingw64 x86-64 - x linux -> win/watcom x86 - x linux -> win/bcc x86 (requires WINE) - x linux -> os2/watcom x86 - x linux -> dos/watcom x86 - x linux -> dos/djgpp x86 - x linux -> vxworks/gcc (CPU cross-builds possible: x86, arm, mips, ppc) - x linux -> vxworks/diab (CPU cross-builds possible: x86, arm, mips, ppc, sparc) - bsd -> bsd/gcc (CPU cross-builds possible) - bsd -> bsd/clang (CPU cross-builds possible) - bsd -> bsd/pcc (experimental) - x bsd -> wce/mingwarm arm - x bsd -> wce/mingw x86 - x bsd -> win/mingw x86 - x bsd -> dos/djgpp x86 - darwin -> darwin/clang (CPU cross-builds possible: x86, x86-64, unibin) - darwin -> darwin/gcc (CPU cross-builds possible: x86, x86-64, ppc, ppc64, unibin) - darwin -> darwin/icc (CPU cross-builds possible: x86, x86-64) - x darwin -> wce/mingwarm arm - x darwin -> wce/mingw x86 - x darwin -> win/mingw x86 - x darwin -> win/mingw64 x86-64 - x darwin -> dos/djgpp x86 - hpux -> hpux/gcc (CPU cross-builds possible) - qnx -> qnx/gcc (CPU cross-builds possible - no tested) - beos -> beos/gcc x86 - x hpux -> wce/mingwarm arm - x hpux -> wce/mingw x86 - x hpux -> win/mingw x86 - x hpux -> dos/djgpp x86 - minix -> minix/gcc x86 - minix -> minix/ack x86 - sunos -> sunos/gcc (CPU cross-builds possible) - sunos -> sunos/sunpro (CPU cross-builds possible: x86, x86-64, sparc32, sparc64) - x sunos -> wce/mingwarm arm - x sunos -> wce/mingw x86 - x sunos -> win/mingw x86 - x sunos -> dos/djgpp x86 - x sunos -> vxworks/gcc (CPU cross-builds possible: x86, arm, mips, ppc) - x sunos -> vxworks/diab (CPU cross-builds possible: x86, arm, mips, ppc, sparc) + host target target + plat plat/comp cpu + - ------ -------------- ---------------------------------------------------- + win -> win/bcc x86 + win -> win/gcc x86 + win -> win/global x86 + win -> win/icc x86 + win -> win/icc64 x86-64 (not supported yet) + win -> win/iccia64 ia64 + win -> win/mingw x86 + win -> win/mingw64 x86-64 + win -> win/msvc x86 + win -> win/msvc64 x86-64 + win -> win/msvcia64 ia64 + win -> win/pocc x86 + win -> win/pocc64 x86-64 + win -> win/watcom x86 + win -> win/xcc x86 + x win -> wce/mingwarm arm + x win -> wce/mingw x86 (not fully supported yet) + x win -> wce/poccarm arm + x win -> wce/msvcarm arm + x win -> wce/msvcmips mips (not supported yet) + x win -> wce/msvcsh sh (not supported yet) + x win -> wce/msvc x86 (not supported yet) + x win -> dos/djgpp x86 (on Windows x86 hosts only) + x win -> dos/watcom x86 + x win -> os2/watcom x86 + x win -> linux/watcom x86 + x win -> android/gcc x86 + x win -> android/gccarm arm + x win -> vxworks/gcc (CPU cross-builds possible: x86, arm, mips, ppc) + x win -> vxworks/diab (CPU cross-builds possible: x86, arm, mips, ppc, sparc) + x win -> symbian/gcc arm + x win -> cygwin/gcc x86 + dos -> dos/djgpp x86 + dos -> dos/watcom x86 + x dos -> win/watcom x86 + x dos -> os2/watcom x86 + x dos -> linux/watcom x86 + os2 -> os2/gcc x86 + os2 -> os2/watcom x86 + x os2 -> win/watcom x86 + x os2 -> dos/watcom x86 + x os2 -> linux/watcom x86 + linux -> linux/gcc (CPU cross-builds possible) + linux -> linux/clang (CPU cross-builds possible) + linux -> linux/icc (CPU cross-builds possible: x86, x86-64, ia64) + linux -> linux/sunpro (CPU cross-builds possible: x86, x86-64) + linux -> linux/open64 (CPU cross-builds possible: x86-64, ia64, ...) + x linux -> wce/mingwarm arm + x linux -> wce/mingw x86 + x linux -> win/mingw x86 + x linux -> win/mingw64 x86-64 + x linux -> win/watcom x86 + x linux -> win/bcc x86 (requires WINE) + x linux -> os2/watcom x86 + x linux -> dos/watcom x86 + x linux -> dos/djgpp x86 + x linux -> android/gcc x86 + x linux -> android/gccarm arm + x linux -> vxworks/gcc (CPU cross-builds possible: x86, arm, mips, ppc) + x linux -> vxworks/diab (CPU cross-builds possible: x86, arm, mips, ppc, sparc) + bsd -> bsd/gcc (CPU cross-builds possible) + bsd -> bsd/clang (CPU cross-builds possible) + bsd -> bsd/pcc (experimental) + x bsd -> wce/mingwarm arm + x bsd -> wce/mingw x86 + x bsd -> win/mingw x86 + x bsd -> dos/djgpp x86 + darwin -> darwin/clang (CPU cross-builds possible: x86, x86-64, unibin) + darwin -> darwin/gcc (CPU cross-builds possible: x86, x86-64, ppc, ppc64, unibin) + darwin -> darwin/icc (CPU cross-builds possible: x86, x86-64) + x darwin -> wce/mingwarm arm + x darwin -> wce/mingw x86 + x darwin -> win/mingw x86 + x darwin -> win/mingw64 x86-64 + x darwin -> dos/djgpp x86 + x darwin -> android/gcc x86 + x darwin -> android/gccarm arm + hpux -> hpux/gcc (CPU cross-builds possible) + qnx -> qnx/gcc (CPU cross-builds possible - no tested) + beos -> beos/gcc x86 + x hpux -> wce/mingwarm arm + x hpux -> wce/mingw x86 + x hpux -> win/mingw x86 + x hpux -> dos/djgpp x86 + minix -> minix/gcc x86 + minix -> minix/ack x86 + sunos -> sunos/gcc (CPU cross-builds possible) + sunos -> sunos/sunpro (CPU cross-builds possible: x86, x86-64, sparc32, sparc64) + x sunos -> wce/mingwarm arm + x sunos -> wce/mingw x86 + x sunos -> win/mingw x86 + x sunos -> dos/djgpp x86 + x sunos -> vxworks/gcc (CPU cross-builds possible: x86, arm, mips, ppc) + x sunos -> vxworks/diab (CPU cross-builds possible: x86, arm, mips, ppc, sparc) Leading 'x' marks cross-platform scenarios. diff --git a/harbour/config/global.mk b/harbour/config/global.mk index 1c65bc1409..3b0236df6f 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -1356,6 +1356,9 @@ ifneq ($(HB_HOST_PLAT)$(HB_HOST_CPU),$(HB_PLATFORM)$(HB_CPU)) ifeq ($(HB_PLATFORM),qnx) HB_PRGFLAGS += -D__PLATFORM__QNX -D__PLATFORM__UNIX else + ifeq ($(HB_PLATFORM),android) + HB_PRGFLAGS += -D__PLATFORM__ANDROID -D__PLATFORM__UNIX + else ifeq ($(HB_PLATFORM),vxworks) HB_PRGFLAGS += -D__PLATFORM__VXWORKS -D__PLATFORM__UNIX else @@ -1382,6 +1385,7 @@ ifneq ($(HB_HOST_PLAT)$(HB_HOST_CPU),$(HB_PLATFORM)$(HB_CPU)) endif endif endif + endif ifneq ($(HB_HOST_CPU),$(HB_CPU)) ifneq ($(filter $(HB_CPU),x86 arm),) HB_PRGFLAGS += -D__ARCH32BIT__ diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 08e71fe60f..070ba3f589 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -1317,7 +1317,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) cBin_CompPRG := "harbour" + l_cHBPOSTFIX DO CASE - CASE HBMK_ISPLAT( "darwin|bsd|hpux|sunos|beos|qnx|vxworks|symbian|linux|cygwin|minix" ) + CASE HBMK_ISPLAT( "darwin|bsd|hpux|sunos|beos|qnx|android|vxworks|symbian|linux|cygwin|minix" ) DO CASE CASE hbmk[ _HBMK_cPLAT ] == "linux" aCOMPSUP := { "gcc", "clang", "icc", "watcom", "sunpro", "open64", "pcc" } @@ -1327,6 +1327,8 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) aCOMPSUP := { "gcc", "clang", "pcc" } CASE hbmk[ _HBMK_cPLAT ] == "sunos" aCOMPSUP := { "gcc", "sunpro", "pcc" } + CASE hbmk[ _HBMK_cPLAT ] == "android" + aCOMPSUP := { "gcc", "gccarm" } CASE hbmk[ _HBMK_cPLAT ] == "vxworks" aCOMPSUP := { "gcc", "diab" } CASE hbmk[ _HBMK_cPLAT ] == "aix" @@ -1630,7 +1632,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) IF Empty( hbmk[ _HBMK_cCOMP ] ) .OR. hbmk[ _HBMK_cCOMP ] == "bld" IF Len( aCOMPSUP ) == 1 hbmk[ _HBMK_cCOMP ] := aCOMPSUP[ 1 ] - ELSEIF HBMK_ISPLAT( "darwin|bsd|hpux|sunos|beos|qnx|vxworks|linux|cygwin|minix" ) .OR. ; + ELSEIF HBMK_ISPLAT( "darwin|bsd|hpux|sunos|beos|qnx|android|vxworks|linux|cygwin|minix" ) .OR. ; hbmk[ _HBMK_cCOMP ] == "bld" hbmk[ _HBMK_cCOMP ] := hb_Version( HB_VERSION_BUILD_COMP ) IF AScan( aCOMPSUP, { |tmp | tmp == hbmk[ _HBMK_cCOMP ] } ) == 0 @@ -1924,7 +1926,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) /* Build with shared libs by default, if we're installed to default system locations. */ - IF lSysLoc .AND. HBMK_ISPLAT( "darwin|bsd|hpux|sunos|beos|qnx|vxworks|linux|cygwin" ) + IF lSysLoc .AND. HBMK_ISPLAT( "darwin|bsd|hpux|sunos|beos|qnx|android|vxworks|linux|cygwin" ) hbmk[ _HBMK_lSHARED ] := .T. hbmk[ _HBMK_lSTATICFULL ] := .F. ELSE @@ -3139,7 +3141,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) ENDIF DO CASE - CASE HBMK_ISPLAT( "darwin|bsd|linux|hpux|beos|qnx|vxworks|sunos|minix" ) + CASE HBMK_ISPLAT( "darwin|bsd|linux|hpux|beos|qnx|android|vxworks|sunos|minix" ) IF Empty( l_cDynLibDir ) l_aLIBSHARED := { cHarbourDyn + cPostfix } ELSE @@ -3229,6 +3231,8 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) ( hbmk[ _HBMK_cPLAT ] == "bsd" .AND. hbmk[ _HBMK_cCOMP ] == "clang" ) .OR. ; ( hbmk[ _HBMK_cPLAT ] == "beos" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ; ( hbmk[ _HBMK_cPLAT ] == "qnx" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ; + ( hbmk[ _HBMK_cPLAT ] == "android" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ; + ( hbmk[ _HBMK_cPLAT ] == "android" .AND. hbmk[ _HBMK_cCOMP ] == "gccarm" ) .OR. ; ( hbmk[ _HBMK_cPLAT ] == "vxworks" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ; ( hbmk[ _HBMK_cPLAT ] == "symbian" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ; ( hbmk[ _HBMK_cPLAT ] == "cygwin" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ; @@ -3375,6 +3379,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) ( hbmk[ _HBMK_cPLAT ] == "linux" .OR. ; hbmk[ _HBMK_cPLAT ] == "beos" .OR. ; hbmk[ _HBMK_cPLAT ] == "qnx" .OR. ; + hbmk[ _HBMK_cPLAT ] == "android" .OR. ; hbmk[ _HBMK_cPLAT ] == "vxworks" .OR. ; hbmk[ _HBMK_cPLAT ] == "cygwin" .OR. ; hbmk[ _HBMK_cPLAT ] == "bsd" ) @@ -3447,7 +3452,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) ENDIF IF hbmk[ _HBMK_lPIC ] .AND. ! HBMK_ISPLAT( "darwin|cygwin" ) - IF HBMK_ISPLAT( "bsd|hpux|sunos|linux" ) + IF HBMK_ISPLAT( "bsd|hpux|sunos|linux|android" ) AAdd( hbmk[ _HBMK_aOPTC ], "-fPIC" ) ELSE AAdd( hbmk[ _HBMK_aOPTC ], "-fpic" ) @@ -3469,7 +3474,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) IF ! HBMK_ISPLAT( "beos|vxworks" ) AAdd( l_aLIBSYS, "m" ) IF hbmk[ _HBMK_lMT ] - IF ! HBMK_ISPLAT( "qnx|minix" ) + IF ! HBMK_ISPLAT( "qnx|android|minix" ) AAdd( l_aLIBSYS, "pthread" ) ENDIF ENDIF @@ -3478,6 +3483,8 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) CASE HBMK_ISPLAT( "linux|cygwin" ) AAdd( l_aLIBSYS, "dl" ) AAdd( l_aLIBSYS, "rt" ) + CASE hbmk[ _HBMK_cPLAT ] == "android" + AAdd( l_aLIBSYS, "dl" ) CASE hbmk[ _HBMK_cPLAT ] == "sunos" AAdd( l_aLIBSYS, "rt" ) AAdd( l_aLIBSYS, "socket" ) @@ -7995,7 +8002,7 @@ STATIC FUNCTION LibExists( hbmk, cDir, cLib, cLibPrefix, cLibExt ) CASE hb_FileExists( tmp := cDir + "lib" + hb_FNameExtSet( cLib, ".dll" ) ) ; RETURN tmp CASE hb_FileExists( tmp := cDir + hb_FNameExtSet( cLib, ".dll" ) ) ; RETURN tmp ENDCASE - CASE hbmk[ _HBMK_cCOMP ] == "gcc" .AND. HBMK_ISPLAT( "linux|sunos" ) + CASE hbmk[ _HBMK_cCOMP ] == "gcc" .AND. HBMK_ISPLAT( "linux|sunos|android" ) DO CASE CASE hb_FileExists( tmp := cDir + "lib" + hb_FNameExtSet( cLib, ".so" ) ) ; RETURN tmp CASE hb_FileExists( tmp := cDir + "lib" + hb_FNameExtSet( cLib, ".a" ) ) ; RETURN tmp @@ -9978,6 +9985,9 @@ STATIC PROCEDURE PlatformPRGFlags( hbmk, aOPTPRG ) CASE hbmk[ _HBMK_cPLAT ] == "qnx" AAdd( aDf, "__PLATFORM__QNX" ) AAdd( aDf, "__PLATFORM__UNIX" ) + CASE hbmk[ _HBMK_cPLAT ] == "android" + AAdd( aDf, "__PLATFORM__ANDROID" ) + AAdd( aDf, "__PLATFORM__UNIX" ) CASE hbmk[ _HBMK_cPLAT ] == "vxworks" AAdd( aDf, "__PLATFORM__VXWORKS" ) AAdd( aDf, "__PLATFORM__UNIX" ) @@ -11020,7 +11030,7 @@ FUNCTION hbmk_KEYW( hbmk, cKeyword, cValue, cOperator ) CASE "static" ; RETURN ! hbmk[ _HBMK_lSHARED ] CASE "winuni" ; RETURN hbmk[ _HBMK_lWINUNI ] CASE "winansi" ; RETURN ! hbmk[ _HBMK_lWINUNI ] - CASE "unix" ; RETURN HBMK_ISPLAT( "bsd|hpux|sunos|beos|qnx|vxworks|symbian|linux|darwin|cygwin|minix" ) + CASE "unix" ; RETURN HBMK_ISPLAT( "bsd|hpux|sunos|beos|qnx|android|vxworks|symbian|linux|darwin|cygwin|minix" ) CASE "allwin" ; RETURN HBMK_ISPLAT( "win|wce" ) CASE "allgcc" ; RETURN HBMK_ISCOMP( "gcc|mingw|mingw64|mingwarm|djgpp|gccomf|clang|open64|pcc" ) CASE "allmingw" ; RETURN HBMK_ISCOMP( "mingw|mingw64|mingwarm" ) @@ -11041,7 +11051,7 @@ FUNCTION hbmk_KEYW( hbmk, cKeyword, cValue, cOperator ) ENDIF IF ! HBMK_IS_IN( cKeyword, "|win|wce|dos|os2" + ; - "|bsd|hpux|sunos|beos|qnx|vxworks|symbian|linux|darwin|cygwin|minix" + ; + "|bsd|hpux|sunos|beos|qnx|android|vxworks|symbian|linux|darwin|cygwin|minix" + ; "|msvc|msvc64|msvcia64|msvcarm" + ; "|pocc|pocc64|poccarm|xcc" + ; "|mingw|mingw64|mingwarm|bcc|watcom" + ; @@ -11893,6 +11903,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong ) " - hpux : gcc",; " - beos : gcc",; " - qnx : gcc",; + " - android : gcc, gccarm",; " - vxworks : gcc, diab",; " - symbian : gcc",; " - cygwin : gcc",;