diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4a4b47e84b..5de703b8eb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,26 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-02-27 19:19 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * INSTALL + * make_gnu.bat + * make_gnu.sh + + Added listing of supported C compilers. + + Added list of available built-time options. + (may be incomplete). + ! Added -n options to hbmk2 calls. + - Removed similar content from script files. + + * make_gnu.bat + - Removed --install-with-dll option. + Use set HB_BUILD_DLL=yes instead. + + * utils/hbmk2/hbmk2.prg + ! Fixed swapped -hbcc and -hbcmp meaning. + + Don't deal with compiler autodetection if called with + -hbcmp option. In this mode a C compiler isn't needed + at all. + 2009-02-27 17:54 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * make_gnu.bat ! Fixed to work when DLLs weren't requested. diff --git a/harbour/INSTALL b/harbour/INSTALL index 0553d15c0b..294e87ada2 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -7,7 +7,7 @@ HOW TO BUILD AND INSTALL HARBOUR For all platforms you'll need: - * GNU make + * GNU Make * Supported C compiler Linux/Darwin/BSD/HP-UX/Solaris @@ -18,7 +18,7 @@ HOW TO BUILD AND INSTALL HARBOUR $ sudo ./make_gnu.sh install To test it, go to /bin directory and type: - $ ./hbmk2 ../tests/hello.prg + $ ./hbmk2 -n ../tests/hello.prg $ ./hello You should see: 'Hello world!' on screen. @@ -34,7 +34,7 @@ HOW TO BUILD AND INSTALL HARBOUR > sh make_gnu.sh install To test it, go to /bin directory and type: - > hbmk2 ../tests/hello.prg + > hbmk2 -n ../tests/hello.prg > hello You should see: 'Hello world!' on screen. @@ -51,11 +51,9 @@ HOW TO BUILD AND INSTALL HARBOUR > set HB_COMPILER= > set HB_INSTALL_PREFIX= > make_gnu.bat install - or - > make_gnu.bat --install-with-dll To test it, go to \bin directory and type: - > hbmk2 ..\tests\hello.prg + > hbmk2 -n ..\tests\hello.prg > hello You should see: 'Hello world!' on screen. @@ -107,4 +105,93 @@ HOW TO ENABLE OPTIONAL COMPONENTS BEFORE BUILD HB_INC_PGSQL=C:\pgsql\include +SUPPORTED C COMPILERS UNDER DIFFERENT PLATFORMS +=============================================== + + Abbreviation below can be used as HB_COMPILER values. + + Linux + ----- + gcc - GNU C + gpp - GNU C++ + owatcom - Open Watcom C++ + icc - Intel(R) C/C++ + + Darwin/BSD/HP-UX/Solaris + ------------------------ + gcc - GNU C + + Windows + ------- + mingw - MinGW GNU C + msvc - Microsoft Visual C++ + gcc - Cygwin GNU C + bcc32 - Borland/CodeGear C++ 4.x and above + rxsnt - EMX/RSXNT/Windows GNU C + icc - IBM Visual Age C++ + dmc - Digital Mars C + msvc64 - Microsoft Visual C++ x64 + msvcia64 - Microsoft Visual C++ ia64 + mingwce - MinGW GNU C (Windows CE / ARM) + msvcce - Microsoft Visual C++ (Windows CE / ARM) + pocc - Pelles C 4.5 and above + pocc64 - Pelles C 5.0 x64 + poccce - Pelles C 5.0 (Windows CE / ARM) + xcc - Pelles C (xhb) + + DOS (32-bit) + --- + djgpp - Delorie GNU C + owatcom - Open Watcom C++ 9.x and above + rxs32 - EMX/RSXNT/DOS GNU C + + OS/2 + ---- + gcc - EMX GNU C + owatcom - Open Watcom C++ + icc - IBM Visual Age C++ 3.0 + + +OPTIONS AVAILABLE WHEN BUILDING HARBOUR +======================================= + + You can fine-tune Harbour builds with below listed + environment variables. All of these are optional. + + General + ------- + - HB_USER_PRGFLAGS User Harbour compiler options + - HB_USER_CFLAGS User C compiler options + - HB_USER_LDFLAGS User linker options for executables + - HB_USER_AFLAGS User linker options for libraries + - HB_USER_MAKEFLAGS User GNU Make options + + - HB_BIN_INSTALL Target directory to install executables + - HB_LIB_INSTALL Target directory to install libraries + - HB_INC_INSTALL Target directory to install language headers + - HB_DOC_INSTALL Target directory to install documentation + + Special + ------- + - HB_BUILD_DLL=yes To create a full build with .dlls. + This is only needed and available for + non-GNU Windows compilers. + - HB_REBUILD_PARSER=yes To rebuild the language parses. + This requires GNU Bison. + - HB_VISUALC_VER_PRE80=yes Set this if you're using a pre-8.0 + version of MSVC compiler. + + Cross building + -------------- + HB_BIN_COMPILE=\bin + HB_PPGEN_PATH=\bin + HB=\bin\harbour[.exe] + HBPP=\bin\hbpp[.exe] + + You need these when building for a platform different to host. + For this to work, you will need to point above envvars to + a native Harbour build available on your system. + + + [ Viktor Szakats ] diff --git a/harbour/make_gnu.bat b/harbour/make_gnu.bat index fce6aa3a18..1aeaccce3e 100644 --- a/harbour/make_gnu.bat +++ b/harbour/make_gnu.bat @@ -23,17 +23,6 @@ rem Copyright 1999-2001 Viktor Szakats (viktor.szakats@syenar.hu) rem See doc/license.txt for licensing terms. rem --------------------------------------------------------------- -rem --------------------------------------------------------------- -rem Set these envvars for cross compilation: -rem set HB_BIN_COMPILE=\bin -rem set HB_PPGEN_PATH=\bin -rem set HB=\bin\harbour.exe -rem set HBPP=\bin\hbpp.exe -rem -rem Set this if you need to rebuild the language parser: -rem set HB_REBUILD_PARSER=yes -rem --------------------------------------------------------------- - if "%HB_ARCHITECTURE%" == "" if not "%WINDIR%" == "" set HB_ARCHITECTURE=win if "%HB_ARCHITECTURE%" == "" set HB_ARCHITECTURE=dos @@ -69,36 +58,8 @@ if not exist %HB_INC_INSTALL%\*.* md %HB_INC_INSTALL% echo - clean echo - install echo. - echo Notes: - echo. - echo - HB_ARCHITECTURE and HB_COMPILER envvars must be set. - echo The following values are currently supported: - echo. - echo HB_ARCHITECTURE: - echo - win - echo - dos - echo. - pause - echo HB_COMPILER: - echo - When HB_ARCHITECTURE=win - echo - msvc (Microsoft Visual C++, Windows 32-bit) - echo - msvc64 (Microsoft Visual C++, Windows 64-bit) - echo - mingw (MinGW GNU C, Windows 32-bit) - echo - gcc (Cygnus/Cygwin GNU C, Windows 32-bit) - echo - bcc32 (Borland C++ 4.x, 5.x, Windows 32-bit) - echo - rxsnt (EMX/RSXNT/Windows GNU C, Windows 32-bit) - echo - icc (IBM Visual Age C++, Windows 32-bit) - echo - When HB_ARCHITECTURE=dos - echo - djgpp (Delorie GNU C, DOS 32-bit) - echo - owatcom (Watcom C++ 9.x, 10.x, 11.x, DOS 32-bit) - echo - rxs32 (EMX/RSXNT/DOS GNU C, DOS 32-bit) - echo. - echo - Use these optional envvars to configure the make process - echo when using the 'all' command: - echo. - echo HB_USER_PRGFLAGS - Extra Harbour compiler options - echo HB_USER_CFLAGS - Extra C compiler options - echo HB_USER_LDFLAGS - Extra linker options + echo Please read INSTALL for HOWTOs and description + echo of available options. goto END :BAD_ARCH @@ -121,16 +82,9 @@ if not exist %HB_INC_INSTALL%\*.* md %HB_INC_INSTALL% rem It will automatically build Harbour in two passes, one for rem the .dlls and a final pass for the regular version. - if not "%HB_ARCHITECTURE%" == "win" goto SKIP_WIN + if not "%HB_ARCHITECTURE%" == "win" goto SKIP_WINDLL + if not "%HB_BUILD_DLL%" == "yes" goto SKIP_WINDLL - set _HB_BUILD_DLL_OLD=%HB_BUILD_DLL% - set _HB_BUILD_DLL=%HB_BUILD_DLL% - if "%1" == "--install-with-dll" set _HB_BUILD_DLL=yes - if "%1" == "--install-with-dll" shift - - if not "%_HB_BUILD_DLL%" == "yes" goto SKIP_WINDLL - - set HB_BUILD_DLL=yes set _HB_CONTRIBLIBS=%HB_CONTRIBLIBS% set _HB_CONTRIB_ADDONS=%HB_CONTRIB_ADDONS% set HB_CONTRIBLIBS=no @@ -144,21 +98,12 @@ if not exist %HB_INC_INSTALL%\*.* md %HB_INC_INSTALL% set _HB_CONTRIB_ADDONS= make clean %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 make install %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 - - set HB_BUILD_DLL=%_HB_BUILD_DLL_OLD% - set _HB_BUILD_DLL= - set _HB_BUILD_DLL_OLD= + set HB_BUILD_DLL=yes goto END :SKIP_WINDLL - set HB_BUILD_DLL=%_HB_BUILD_DLL_OLD% - set _HB_BUILD_DLL= - set _HB_BUILD_DLL_OLD= - -:SKIP_WIN - make %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 goto END diff --git a/harbour/make_gnu.sh b/harbour/make_gnu.sh index 8ce4630ced..abf604a77c 100755 --- a/harbour/make_gnu.sh +++ b/harbour/make_gnu.sh @@ -149,48 +149,8 @@ if [ -z "$HB_ARCHITECTURE" ] || [ -z "$HB_COMPILER" ]; then echo " - clean" echo " - install" echo - echo "Notes:" - echo - echo " - HB_ARCHITECTURE and HB_COMPILER envvars must be set." - echo " The following values are currently supported:" - echo - echo " HB_ARCHITECTURE:" - echo " - dos" - echo " - win" - echo " - os2" - echo " - linux" - echo " - bsd" - echo " - darwin" - echo " - sunos" - echo " - hpux" - echo - read - echo " HB_COMPILER:" - echo " - When HB_ARCHITECTURE=dos" - echo " - bcc16 (Borland C++ 3.x, 4.x, 5.0x, DOS 16-bit)" - echo " - djgpp (Delorie GNU C, DOS 32-bit)" - echo " - rsx32 (EMX/RSXNT/DOS GNU C, DOS 32-bit)" - echo " - owatcom (Watcom C++ 9.x, 10.x, 11.x, DOS 32-bit)" - echo " - When HB_ARCHITECTURE=win" - echo " - bcc32 (Borland C++ 4.x, 5.x, Windows 32-bit)" - echo " - gcc (Cygnus/Cygwin GNU C, Windows 32-bit)" - echo " - mingw (MinGW GNU C, Windows 32-bit)" - echo " - rsxnt (EMX/RSXNT/Windows GNU C, Windows 32-bit)" - echo " - icc (IBM Visual Age C++, Windows 32-bit)" - echo " - msvc (Microsoft Visual C++, Windows 32-bit)" - echo " - msvc64 (Microsoft Visual C++, Windows 64-bit)" - echo " - When HB_ARCHITECTURE=linux" - echo " - gcc (GNU C, 32-bit)" - echo " - When HB_ARCHITECTURE=os2" - echo " - gcc (EMX GNU C, OS/2 32-bit)" - echo " - icc (IBM Visual Age C++ 3.0, OS/2 32-bit)" - echo - echo " - Use these optional envvars to configure the make process" - echo " when using the 'all' target:" - echo - echo " HB_USER_PRGFLAGS - Extra Harbour compiler options" - echo " HB_USER_CFLAGS - Extra C compiler options" - echo " HB_USER_LDFLAGS - Extra linker options" + echo "Please read INSTALL for HOWTOs and description" + echo "of available options." exit else diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 3e530c907a..906725c213 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -63,6 +63,8 @@ * */ +#pragma LINENUMBER=ON + #include "common.ch" #include "directry.ch" #include "fileio.ch" @@ -301,8 +303,8 @@ FUNCTION Main( ... ) CASE cParamL == "-quiet" ; t_lQuiet := .T. ; t_lInfo := .F. CASE Left( cParamL, 6 ) == "-comp=" ; t_cCOMP := SubStr( cParam, 7 ) CASE Left( cParamL, 6 ) == "-arch=" ; t_cARCH := SubStr( cParam, 7 ) - CASE cParamL == "-hbcc" ; t_lQuiet := .T. ; t_lInfo := .F. ; lStopAfterHarbour := .T. - CASE cParamL == "-hbcmp" ; t_lQuiet := .T. ; t_lInfo := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T. + CASE cParamL == "-hbcmp" ; t_lQuiet := .T. ; t_lInfo := .F. ; lStopAfterHarbour := .T. + CASE cParamL == "-hbcc" ; t_lQuiet := .T. ; t_lInfo := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T. CASE cParamL == "-hblnk" ; t_lQuiet := .T. ; t_lInfo := .F. CASE cParamL == "-info" ; t_lInfo := .T. CASE cParamL == "-help" .OR. ; @@ -318,18 +320,18 @@ FUNCTION Main( ... ) tmp := Lower( FN_NameGet( hb_argv( 0 ) ) ) DO CASE - CASE Right( tmp, 4 ) == "hbcc" .OR. ; - Left( tmp, 4 ) == "hbcc" - t_lQuiet := .T. ; t_lInfo := .F. ; lStopAfterHarbour := .T. - IF t_lInfo - OutStd( "hbmk: Enabled -hbcc option." + hb_osNewLine() ) - ENDIF CASE Right( tmp, 5 ) == "hbcmp" .OR. ; Left( tmp, 5 ) == "hbcmp" - t_lQuiet := .T. ; t_lInfo := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T. + t_lQuiet := .T. ; t_lInfo := .F. ; lStopAfterHarbour := .T. IF t_lInfo OutStd( "hbmk: Enabled -hbcmp option." + hb_osNewLine() ) ENDIF + CASE Right( tmp, 4 ) == "hbcc" .OR. ; + Left( tmp, 4 ) == "hbcc" + t_lQuiet := .T. ; t_lInfo := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T. + IF t_lInfo + OutStd( "hbmk: Enabled -hbcc option." + hb_osNewLine() ) + ENDIF CASE Right( tmp, 5 ) == "hblnk" .OR. ; Left( tmp, 5 ) == "hblnk" t_lQuiet := .T. ; t_lInfo := .F. @@ -453,55 +455,60 @@ FUNCTION Main( ... ) /* Autodetect compiler */ - IF Empty( t_cCOMP ) .OR. t_cCOMP == "bld" - IF Len( aCOMPSUP ) == 1 - t_cCOMP := aCOMPSUP[ 1 ] - ELSEIF t_cARCH == "linux" .OR. t_cCOMP == "bld" - t_cCOMP := cSelfCOMP - IF AScan( aCOMPSUP, {|tmp| tmp == t_cCOMP } ) == 0 - t_cCOMP := NIL - ENDIF - ELSEIF ! Empty( aCOMPDET ) - /* Look for this compiler first */ - FOR tmp := 1 TO Len( aCOMPDET ) - IF aCOMPDET[ tmp ][ 2 ] == cSelfCOMP .AND. Eval( aCOMPDET[ tmp ][ 1 ] ) - t_cCOMP := aCOMPDET[ tmp ][ 2 ] - EXIT + IF lStopAfterHarbour + /* If we're just compiling .prg to .c we don't need a C compiler. */ + t_cCOMP := "" + ELSE + IF Empty( t_cCOMP ) .OR. t_cCOMP == "bld" + IF Len( aCOMPSUP ) == 1 + t_cCOMP := aCOMPSUP[ 1 ] + ELSEIF t_cARCH == "linux" .OR. t_cCOMP == "bld" + t_cCOMP := cSelfCOMP + IF AScan( aCOMPSUP, {|tmp| tmp == t_cCOMP } ) == 0 + t_cCOMP := NIL ENDIF - NEXT - IF Empty( t_cCOMP ) - /* Check the rest of compilers */ + ELSEIF ! Empty( aCOMPDET ) + /* Look for this compiler first */ FOR tmp := 1 TO Len( aCOMPDET ) - IF !( aCOMPDET[ tmp ][ 2 ] == cSelfCOMP ) .AND. Eval( aCOMPDET[ tmp ][ 1 ] ) + IF aCOMPDET[ tmp ][ 2 ] == cSelfCOMP .AND. Eval( aCOMPDET[ tmp ][ 1 ] ) t_cCOMP := aCOMPDET[ tmp ][ 2 ] EXIT ENDIF NEXT + IF Empty( t_cCOMP ) + /* Check the rest of compilers */ + FOR tmp := 1 TO Len( aCOMPDET ) + IF !( aCOMPDET[ tmp ][ 2 ] == cSelfCOMP ) .AND. Eval( aCOMPDET[ tmp ][ 1 ] ) + t_cCOMP := aCOMPDET[ tmp ][ 2 ] + EXIT + ENDIF + NEXT + ENDIF ENDIF - ENDIF - IF ! Empty( t_cCOMP ) - IF t_lInfo - OutStd( "hbmk: Autodetected compiler: " + t_cCOMP + hb_osNewLine() ) + IF ! Empty( t_cCOMP ) + IF t_lInfo + OutStd( "hbmk: Autodetected compiler: " + t_cCOMP + hb_osNewLine() ) + ENDIF + ELSE + IF Empty( aCOMPDET ) + OutErr( "hbmk: Please choose a compiler by using -comp= option or envvar HB_COMPILER." + hb_osNewLine() ) + OutErr( " You have the following choices on your platform: " + hb_osNewLine() ) + OutErr( " " + ArrayToList( aCOMPSUP, ", " ) + hb_osNewLine() ) + ELSE + OutErr( "hbmk: Harbour Make couldn't detect any supported C compiler in your PATH." + hb_osNewLine() ) + OutErr( " Please setup one or set -comp= option or envvar HB_COMPILER " + hb_osNewLine() ) + OutErr( " to one of these values:" + hb_osNewLine() ) + OutErr( " " + ArrayToList( aCOMPSUP, ", " ) + hb_osNewLine() ) + ENDIF + PauseForKey() + RETURN 2 ENDIF ELSE - IF Empty( aCOMPDET ) - OutErr( "hbmk: Please choose a compiler by using -comp= option or envvar HB_COMPILER." + hb_osNewLine() ) - OutErr( " You have the following choices on your platform: " + hb_osNewLine() ) - OutErr( " " + ArrayToList( aCOMPSUP, ", " ) + hb_osNewLine() ) - ELSE - OutErr( "hbmk: Harbour Make couldn't detect any supported C compiler in your PATH." + hb_osNewLine() ) - OutErr( " Please setup one or set -comp= option or envvar HB_COMPILER " + hb_osNewLine() ) - OutErr( " to one of these values:" + hb_osNewLine() ) - OutErr( " " + ArrayToList( aCOMPSUP, ", " ) + hb_osNewLine() ) + IF AScan( aCOMPSUP, {|tmp| tmp == t_cCOMP } ) == 0 + OutErr( "hbmk: Error: Compiler value unknown." + hb_osNewLine() ) + PauseForKey() + RETURN 2 ENDIF - PauseForKey() - RETURN 2 - ENDIF - ELSE - IF AScan( aCOMPSUP, {|tmp| tmp == t_cCOMP } ) == 0 - OutErr( "hbmk: Error: Compiler value unknown." + hb_osNewLine() ) - PauseForKey() - RETURN 2 ENDIF ENDIF @@ -670,8 +677,8 @@ FUNCTION Main( ... ) CASE cParamL == "-quiet" .OR. ; Left( cParamL, 6 ) == "-comp=" .OR. ; Left( cParamL, 6 ) == "-arch=" .OR. ; - cParamL == "-hbcc" .OR. ; cParamL == "-hbcmp" .OR. ; + cParamL == "-hbcc" .OR. ; cParamL == "-hblnk" .OR. ; cParamL == "-info" @@ -859,60 +866,6 @@ FUNCTION Main( ... ) RETURN 4 ENDIF - /* If -o with full name wasn't specified, let's - make it the first source file specified. */ - DEFAULT s_cPROGNAME TO FN_NameGet( s_cFIRST ) - - IF t_cCOMP == "mingwce" .OR. ; - t_cCOMP == "poccce" - t_cGTDEFAULT := "gtwvt" - ENDIF - - IF s_cGT == t_cGTDEFAULT - s_cGT := NIL - ENDIF - - /* Merge user libs from command line and envvar. Command line has priority. */ - s_aLIBUSER := ArrayAJoin( { s_aLIBUSER, s_aLIBUSERGT, ListToArray( PathSepToTarget( GetEnv( "HB_USER_LIBS" ) ) ) } ) - - /* Combine output dir with output name. */ - IF ! Empty( s_cPROGDIR ) - hb_FNameSplit( s_cPROGNAME, @cDir, @cName, @cExt ) - s_cPROGNAME := hb_FNameMerge( iif( Empty( cDir ), s_cPROGDIR, cDir ), cName, cExt ) - ENDIF - - /* Determine map name from output name. */ - s_cMAPNAME := FN_ExtSet( s_cPROGNAME, ".map" ) - /* Set output name extension. */ - IF t_cARCH $ "os2|win|dos" - s_cPROGNAME := FN_ExtSet( s_cPROGNAME, ".exe" ) - ELSE - s_cPROGNAME := FN_ExtSet( s_cPROGNAME ) - ENDIF - - IF lSysLoc - cPrefix := PathNormalize( s_cHB_LIB_INSTALL, lSysLoc ) - ELSE - cPrefix := "" - ENDIF -#if 1 - cPostfix := "" - HB_SYMBOL_UNUSED( cDL_Version ) -#else - cPostfix := "-" + cDL_Version -#endif - - DO CASE - CASE t_cARCH $ "bsd|linux|hpux|sunos" .OR. t_cARCH == "darwin" /* Separated to avoid match with 'win' */ - s_aLIBSHARED := { iif( s_lMT, cPrefix + cDynLibNamePrefix + "harbourmt" + cPostfix + cDynLibExt,; - cPrefix + cDynLibNamePrefix + "harbour" + cPostfix + cDynLibExt ) } - CASE t_cARCH $ "os2|win" - s_aLIBSHARED := { iif( s_lMT, cDynLibNamePrefix + "harbourmt",; - cDynLibNamePrefix + "harbour" ) } - OTHERWISE - s_aLIBSHARED := NIL - ENDCASE - /* Harbour compilation */ IF Len( s_aPRG ) > 0 @@ -958,6 +911,60 @@ FUNCTION Main( ... ) IF ! lStopAfterHarbour + /* If -o with full name wasn't specified, let's + make it the first source file specified. */ + DEFAULT s_cPROGNAME TO FN_NameGet( s_cFIRST ) + + IF t_cCOMP == "mingwce" .OR. ; + t_cCOMP == "poccce" + t_cGTDEFAULT := "gtwvt" + ENDIF + + IF s_cGT == t_cGTDEFAULT + s_cGT := NIL + ENDIF + + /* Merge user libs from command line and envvar. Command line has priority. */ + s_aLIBUSER := ArrayAJoin( { s_aLIBUSER, s_aLIBUSERGT, ListToArray( PathSepToTarget( GetEnv( "HB_USER_LIBS" ) ) ) } ) + + /* Combine output dir with output name. */ + IF ! Empty( s_cPROGDIR ) + hb_FNameSplit( s_cPROGNAME, @cDir, @cName, @cExt ) + s_cPROGNAME := hb_FNameMerge( iif( Empty( cDir ), s_cPROGDIR, cDir ), cName, cExt ) + ENDIF + + /* Determine map name from output name. */ + s_cMAPNAME := FN_ExtSet( s_cPROGNAME, ".map" ) + /* Set output name extension. */ + IF t_cARCH $ "os2|win|dos" + s_cPROGNAME := FN_ExtSet( s_cPROGNAME, ".exe" ) + ELSE + s_cPROGNAME := FN_ExtSet( s_cPROGNAME ) + ENDIF + + IF lSysLoc + cPrefix := PathNormalize( s_cHB_LIB_INSTALL, lSysLoc ) + ELSE + cPrefix := "" + ENDIF +#if 1 + cPostfix := "" + HB_SYMBOL_UNUSED( cDL_Version ) +#else + cPostfix := "-" + cDL_Version +#endif + + DO CASE + CASE t_cARCH $ "bsd|linux|hpux|sunos" .OR. t_cARCH == "darwin" /* Separated to avoid match with 'win' */ + s_aLIBSHARED := { iif( s_lMT, cPrefix + cDynLibNamePrefix + "harbourmt" + cPostfix + cDynLibExt,; + cPrefix + cDynLibNamePrefix + "harbour" + cPostfix + cDynLibExt ) } + CASE t_cARCH $ "os2|win" + s_aLIBSHARED := { iif( s_lMT, cDynLibNamePrefix + "harbourmt",; + cDynLibNamePrefix + "harbour" ) } + OTHERWISE + s_aLIBSHARED := NIL + ENDCASE + /* C compilation/linking */ s_aLIB3RD := {} @@ -2727,9 +2734,9 @@ STATIC PROCEDURE ShowHelp( lLong ) " -[no]trace show commands executed" ,; " -[no]run run/don't run the created executable" ,; " -nohbp do not process .hbp files in current directory" ,; - " -hbcc stop after creating the .c Harbour output files" ,; + " -hbcmp stop after creating the .c Harbour output files" ,; " create link/copy/rename hbmk to hbcc for the same effect" ,; - " -hbcmp stop after creating the object files" ,; + " -hbcc stop after creating the object files" ,; " create link/copy/rename hbmk to hbcc for the same effect" ,; " -hblnk act as linker. Currently this is the same as -q" ,; " -arch= assume specific architecure. Same as HB_ARCHITECTURE envvar" ,;