2009-04-03 15:33 UTC+0200 Viktor Szakats (harbour.01 syenar hu)

* harbour-wce-spec
  * INSTALL
  * bin/postinst.bat
  * Makefile
  * make_gnu.bat
  * external/sqlite3/Makefile
  * external/libhpdf/Makefile
  * external/libpng/Makefile
  * contrib/gtalleg/Makefile
  * contrib/hbodbc/Makefile
  * contrib/hbtpathy/Makefile
  * contrib/hbole/Makefile
  * contrib/hbsqlit3/Makefile
  * contrib/hbqt/generator/hbqtgen.prg
  * contrib/hbqt/Makefile
  * contrib/hbfbird/Makefile
  * contrib/hbwin/Makefile
  * source/vm/Makefile
  * source/vm/vmmt/Makefile
    + Added wce arch and mingwarm/msvcarm/poccarm support.
      In parallel with old win/mingwce|msvcce|poccce support.
      As soons as this new one work, the old one will be deleted.

  * make_gnu.bat
    ! Fixed to work like rest of targets for GCC family.
      It will now only initiate a 'clean install' if HB_BUILD_DLL=yes.

  * utils/hbmk2/hbmk2.prg
    + Added Przemek's code for rtlink/blinker script parsing.
      Not yet activated.
This commit is contained in:
Viktor Szakats
2009-04-03 13:47:54 +00:00
parent e6d1ef70c2
commit d72a0554f8
21 changed files with 377 additions and 24 deletions

View File

@@ -8,6 +8,38 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-04-03 15:33 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* harbour-wce-spec
* INSTALL
* bin/postinst.bat
* Makefile
* make_gnu.bat
* external/sqlite3/Makefile
* external/libhpdf/Makefile
* external/libpng/Makefile
* contrib/gtalleg/Makefile
* contrib/hbodbc/Makefile
* contrib/hbtpathy/Makefile
* contrib/hbole/Makefile
* contrib/hbsqlit3/Makefile
* contrib/hbqt/generator/hbqtgen.prg
* contrib/hbqt/Makefile
* contrib/hbfbird/Makefile
* contrib/hbwin/Makefile
* source/vm/Makefile
* source/vm/vmmt/Makefile
+ Added wce arch and mingwarm/msvcarm/poccarm support.
In parallel with old win/mingwce|msvcce|poccce support.
As soons as this new one work, the old one will be deleted.
* make_gnu.bat
! Fixed to work like rest of targets for GCC family.
It will now only initiate a 'clean install' if HB_BUILD_DLL=yes.
* utils/hbmk2/hbmk2.prg
+ Added Przemek's code for rtlink/blinker script parsing.
Not yet activated.
2009-04-03 11:05 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* bin/hb-mkdyn.bat
! Attempt to fix owatcom shared executable generation.

View File

@@ -154,7 +154,7 @@ HOW TO ENABLE OPTIONAL COMPONENTS BEFORE BUILD
NOTES: - For mingw+msys and cygwin you have to use forward slashes
and also cygwin drive notation for cygwin.
- Space in directory names isn't currently supported.
- Spaces in directory names isn't currently supported.
- Don't put the dir inside double quotes.
- Use absolute paths.
@@ -202,9 +202,9 @@ SUPPORTED C COMPILERS UNDER DIFFERENT PLATFORMS
Windows CE
----------
mingwce - MinGW GNU C ARM
msvcce - Microsoft Visual C++ ARM
poccce - Pelles C 5.0 ARM
mingwarm - MinGW GNU C ARM
msvcarm - Microsoft Visual C++ ARM
poccarm - Pelles C 5.0 ARM
DOS (32-bit)
---
@@ -286,9 +286,9 @@ EXAMPLES
Windows/Windows CE
------------------
NOTES: - All above code should be copied to .bat files.
NOTES: - All code below should be copied to .bat files.
- Naturally, you'll need to adapt dirs to valid ones on your system.
Don't use space in dirs.
Don't use spaces in dirs.
- '%1 %2' can be empty, 'clean', 'install' or 'clean install'
depending on what you want to do.
- Windows implib creation setup may change in the future.
@@ -386,7 +386,8 @@ EXAMPLES
set PATH=C:\devl\MinGW-410-ce\opt\mingw32ce\bin;%PATH%
set HB_CCPREFIX=arm-wince-mingw32ce-
rem
set HB_COMPILER=mingwce
set HB_ARCHITECTURE=wce
set HB_COMPILER=mingwarm
rem
set HB_BIN_COMPILE=C:\hb-mingw\bin
set HB_PPGEN_PATH=%HB_BIN_COMPILE%
@@ -460,7 +461,8 @@ EXAMPLES
set INCLUDE=C:\devl\PellesC-501\include\wince;C:\devl\PellesC-501\include;%INCLUDE%
set LIB=C:\devl\PellesC-501\lib;C:\devl\PellesC-501\lib\wince;%INCLUDE%
rem
set HB_COMPILER=poccce
set HB_ARCHITECTURE=wce
set HB_COMPILER=poccarm
rem
set HB_BIN_COMPILE=C:\hb-pocc\bin
set HB_PPGEN_PATH=%HB_BIN_COMPILE%

View File

@@ -41,6 +41,9 @@ else
ifeq ($(HB_ARCHITECTURE),win)
HB_POSTINST = $(subst /,\,$(TOP)$(ROOT)bin/postinst.bat) $(HB_POSTINSTPARAM)
else
ifeq ($(HB_ARCHITECTURE),wce)
HB_POSTINST = $(subst /,\,$(TOP)$(ROOT)bin/postinst.bat) $(HB_POSTINSTPARAM)
else
ifeq ($(HB_ARCHITECTURE),os2)
HB_POSTINST = $(subst /,\,$(TOP)$(ROOT)bin/postinst.cmd) $(HB_POSTINSTPARAM)
endif
@@ -48,6 +51,7 @@ endif
endif
endif
endif
endif
endif

View File

@@ -24,6 +24,7 @@ set _HBMK_CFG=
goto inst_%HB_ARCHITECTURE%
:inst_win
:inst_wce
rem Windows post install part
if not "%OS%" == "Windows_NT" goto end
@@ -42,8 +43,8 @@ if not "%HB_DYNLIB%" == "yes" goto _SKIP_DLL_BIN
if not "%HB_BIN_COMPILE%" == "" set HB_BIN_INSTALL=%HB_BIN_COMPILE%
if exist "%_HB_BIN_INSTALL%\*.dll" (
%HB_BIN_INSTALL%\hbmk2 -q0 -shared -o%_HB_BIN_INSTALL%\hbrun-dll %~dp0..\utils\hbrun\hbrun.hbm -lhbcplr -lhbpp -lhbcommon
%HB_BIN_INSTALL%\hbmk2 -q0 -shared -o%_HB_BIN_INSTALL%\hbmk2-dll %~dp0..\utils\hbmk2\hbmk2.hbm -lhbcplr -lhbpp -lhbcommon
%HB_BIN_INSTALL%\hbmk2 -q0 -shared -o%_HB_BIN_INSTALL%\hbtest-dll %~dp0..\utils\hbtest\hbtest.hbm
%HB_BIN_INSTALL%\hbmk2 -q0 -shared -o%_HB_BIN_INSTALL%\hbmk2-dll %~dp0..\utils\hbmk2\hbmk2.hbm
%HB_BIN_INSTALL%\hbmk2 -q0 -shared -o%_HB_BIN_INSTALL%\hbi18n-dll %~dp0..\utils\hbi18n\hbi18n.hbm
)
endlocal

View File

@@ -9,10 +9,12 @@ LIBNAME=gtalleg
ifneq ($(HB_COMPILER),pocc)
ifneq ($(HB_COMPILER),pocc64)
ifneq ($(HB_COMPILER),poccce)
ifneq ($(HB_COMPILER),poccarm)
ifneq ($(HB_COMPILER),xcc)
ifneq ($(HB_COMPILER),dmc)
ifneq ($(HB_COMPILER),owatcom)
ifneq ($(HB_COMPILER),mingwce)
ifneq ($(HB_COMPILER),mingwarm)
ifeq ($(HB_INC_ALLEGRO),)
ifeq ($(HB_XBUILD),)
@@ -56,3 +58,9 @@ endif
else
include $(TOP)$(ROOT)config/none.cf
endif
else
include $(TOP)$(ROOT)config/none.cf
endif
else
include $(TOP)$(ROOT)config/none.cf
endif

View File

@@ -8,6 +8,7 @@ LIBNAME=hbfbird
ifneq ($(HB_COMPILER),pocc64)
ifneq ($(HB_COMPILER),poccce)
ifneq ($(HB_COMPILER),poccarm)
ifeq ($(HB_INC_FIREBIRD),)
ifeq ($(HB_XBUILD),)
@@ -38,3 +39,6 @@ endif
else
include $(TOP)$(ROOT)config/none.cf
endif
else
include $(TOP)$(ROOT)config/none.cf
endif

View File

@@ -17,6 +17,7 @@ HB_WITHOUT_ODBC=yes
endif
ifneq ($(HB_ARCHITECTURE),win)
ifneq ($(HB_ARCHITECTURE),wce)
ifeq ($(HB_WITHOUT_ODBC),)
ifeq ($(HB_INC_ODBC),)
@@ -33,6 +34,7 @@ else
HB_WITHOUT_ODBC=yes
endif
endif
endif
endif

View File

@@ -6,7 +6,16 @@ ROOT = ../../
LIBNAME=hbole
ifeq ($(HB_WITH_HBOLE),)
ifeq ($(HB_ARCHITECTURE),win)
HB_WITH_HBOLE=yes
endif
ifeq ($(HB_ARCHITECTURE),wce)
HB_WITH_HBOLE=yes
endif
endif
ifeq ($(HB_WITH_HBOLE),yes)
C_SOURCES=\
oleinit.c \

View File

@@ -32,6 +32,9 @@ endif
ifeq ($(HB_COMPILER),poccce)
HB_WITH_QT=no
endif
ifeq ($(HB_COMPILER),poccarm)
HB_WITH_QT=no
endif
endif
ifeq ($(HB_WITH_QT),yes)

View File

@@ -984,6 +984,9 @@ STATIC FUNCTION Build_MakeFile( cpp_, prg_, cPathOut )
aadd( txt_, "ifeq ($(HB_COMPILER),poccce) " )
aadd( txt_, "HB_WITH_QT=no " )
aadd( txt_, "endif " )
aadd( txt_, "ifeq ($(HB_COMPILER),poccarm) " )
aadd( txt_, "HB_WITH_QT=no " )
aadd( txt_, "endif " )
aadd( txt_, "endif " )
aadd( txt_, " " )
aadd( txt_, "ifeq ($(HB_WITH_QT),yes) " )

View File

@@ -9,6 +9,7 @@ LIBNAME=hbsqlit3
ifneq ($(HB_COMPILER),pocc)
ifneq ($(HB_COMPILER),pocc64)
ifneq ($(HB_COMPILER),poccce)
ifneq ($(HB_COMPILER),poccarm)
ifeq ($(HB_INC_SQLITE3),)
ifeq ($(HB_XBUILD),)
@@ -16,6 +17,9 @@ HB_INC_SQLITE3 = /usr/include
ifeq ($(HB_ARCHITECTURE),win)
HB_INC_SQLITE3 += $(TOP)$(ROOT)external/sqlite3
endif
ifeq ($(HB_ARCHITECTURE),wce)
HB_INC_SQLITE3 += $(TOP)$(ROOT)external/sqlite3
endif
ifeq ($(HB_ARCHITECTURE),os2)
HB_INC_SQLITE3 += $(TOP)$(ROOT)external/sqlite3
endif
@@ -53,3 +57,6 @@ endif
else
include $(TOP)$(ROOT)config/none.cf
endif
else
include $(TOP)$(ROOT)config/none.cf
endif

View File

@@ -25,6 +25,12 @@ C_SOURCES=\
tpwin.c \
tpcommon.c \
endif
ifeq ($(HB_ARCHITECTURE),wce)
C_SOURCES=\
tpwin.c \
tpcommon.c \
endif
ifeq ($(HB_ARCHITECTURE),os2)
C_SOURCES=\

View File

@@ -6,7 +6,16 @@ ROOT = ../../
LIBNAME=hbwin
ifeq ($(HB_WITH_HBWIN),)
ifeq ($(HB_ARCHITECTURE),win)
HB_WITH_HBWIN=yes
endif
ifeq ($(HB_ARCHITECTURE),wce)
HB_WITH_HBWIN=yes
endif
endif
ifeq ($(HB_WITH_HBWIN),yes)
C_SOURCES = \
win_dll.c \

View File

@@ -15,10 +15,13 @@ HB_WITH_LIBHPDF=yes
ifeq ($(HB_COMPILER),owatcom)
HB_WITH_LIBHPDF=no
endif
ifeq ($(HB_COMPILER),pocc64)
HB_WITH_LIBHPDF=no
endif
ifeq ($(HB_COMPILER),poccce)
HB_WITH_LIBHPDF=no
endif
ifeq ($(HB_COMPILER),pocc64)
ifeq ($(HB_COMPILER),poccarm)
HB_WITH_LIBHPDF=no
endif
endif
@@ -31,6 +34,9 @@ HB_INC_LIBPNG = /usr/include
ifeq ($(HB_ARCHITECTURE),win)
HB_INC_LIBPNG += $(TOP)$(ROOT)external/libpng
endif
ifeq ($(HB_ARCHITECTURE),wce)
HB_INC_LIBPNG += $(TOP)$(ROOT)external/libpng
endif
ifeq ($(HB_ARCHITECTURE),os2)
HB_INC_LIBPNG += $(TOP)$(ROOT)external/libpng
endif

View File

@@ -13,6 +13,9 @@ ifeq ($(HB_WITH_LIBPNG),)
ifeq ($(HB_ARCHITECTURE),win)
HB_WITH_LIBPNG=yes
endif
ifeq ($(HB_ARCHITECTURE),wce)
HB_WITH_LIBPNG=yes
endif
ifeq ($(HB_ARCHITECTURE),os2)
HB_WITH_LIBPNG=yes
endif
@@ -22,6 +25,9 @@ endif
ifeq ($(HB_COMPILER),poccce)
HB_WITH_LIBPNG=no
endif
ifeq ($(HB_COMPILER),poccarm)
HB_WITH_LIBPNG=no
endif
endif
ifeq ($(HB_WITH_LIBPNG),yes)

View File

@@ -26,6 +26,9 @@ ifeq ($(HB_WITH_SQLITE3),)
ifeq ($(HB_ARCHITECTURE),win)
HB_WITH_SQLITE3=yes
endif
ifeq ($(HB_ARCHITECTURE),wce)
HB_WITH_SQLITE3=yes
endif
ifeq ($(HB_ARCHITECTURE),os2)
HB_WITH_SQLITE3=yes
endif
@@ -35,6 +38,9 @@ endif
ifeq ($(HB_COMPILER),poccce)
HB_WITH_SQLITE3=no
endif
ifeq ($(HB_COMPILER),poccarm)
HB_WITH_SQLITE3=no
endif
endif
ifeq ($(HB_WITH_SQLITE3),yes)

View File

@@ -93,8 +93,8 @@ export HB_USER_CFLAGS="-DHB_FM_STATISTICS_OFF"
make
export HB_HOST_BUILD=lib
export HB_ARCHITECTURE=win
export HB_COMPILER=mingwce
export HB_ARCHITECTURE=wce
export HB_COMPILER=mingwarm
mkdir -p source/pp/${HB_ARCHITECTURE}/${HB_COMPILER}
ln -s ../../linux/gcc/hbpp source/pp/${HB_ARCHITECTURE}/${HB_COMPILER}/hbpp.exe
@@ -138,8 +138,8 @@ export HB_CCPREFIX="%{hb_ccpref}"
export PATH="$HB_CCPATH$PATH"
export HB_HOST_BUILD=lib
export HB_ARCHITECTURE=win
export HB_COMPILER=mingwce
export HB_ARCHITECTURE=wce
export HB_COMPILER=mingwarm
export HB_XBUILD=wce
export HB_BIN_INSTALL=%{_bindir}
export HB_INC_INSTALL=%{_includedir}/%{name}

View File

@@ -114,13 +114,14 @@ if not exist %HB_DOC_INSTALL%\*.* md %HB_DOC_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_WINDLL
if "%HB_ARCHITECTURE%" == "dos" goto SKIP_WINDLL
if not "%HB_BUILD_DLL%" == "yes" goto SKIP_WINDLL
if "%HB_COMPILER%" == "mingw" goto DO_GCC
if "%HB_COMPILER%" == "mingw64" goto DO_GCC
if "%HB_COMPILER%" == "mingwce" goto DO_GCC
if "%HB_COMPILER%" == "mingwarm" goto DO_GCC
if "%HB_COMPILER%" == "cygwin" goto DO_GCC
if not "%HB_BUILD_DLL%" == "yes" goto SKIP_WINDLL
set _HB_CONTRIBLIBS=%HB_CONTRIBLIBS%
set _HB_CONTRIB_ADDONS=%HB_CONTRIB_ADDONS%

View File

@@ -19,10 +19,15 @@ ifeq ($(HB_ARCHITECTURE),win)
endif
DIRS += maindllh maindllp
else
ifeq ($(HB_ARCHITECTURE),os2)
C_MAIN = mainstd.c
ifeq ($(HB_COMPILER),wce)
C_MAIN = mainwin.c
DIRS = mainstd mainwin
else
C_MAIN = main.c
ifeq ($(HB_ARCHITECTURE),os2)
C_MAIN = mainstd.c
else
C_MAIN = main.c
endif
endif
endif

View File

@@ -18,10 +18,14 @@ ifeq ($(HB_ARCHITECTURE),win)
endif
endif
else
ifeq ($(HB_ARCHITECTURE),os2)
C_MAIN = mainstd.c
ifeq ($(HB_ARCHITECTURE),wce)
C_MAIN = mainwin.c
else
C_MAIN = main.c
ifeq ($(HB_ARCHITECTURE),os2)
C_MAIN = mainstd.c
else
C_MAIN = main.c
endif
endif
endif

View File

@@ -58,6 +58,7 @@
* gcc and *nix configuration elements.
* bash script with similar purpose for gcc family.
* entry point override method and detection code for gcc.
* rtlink/blinker link script parsers.
*
* See COPYING for licensing terms.
*
@@ -3302,6 +3303,241 @@ PROCEDURE PlatformPRGFlags( aOPTPRG )
RETURN
#define RTLNK_MODE_NONE 0
#define RTLNK_MODE_OUT 1
#define RTLNK_MODE_FILE 2
#define RTLNK_MODE_FILENEXT 3
#define RTLNK_MODE_LIB 4
#define RTLNK_MODE_LIBNEXT 5
#define RTLNK_MODE_SKIP 6
#define RTLNK_MODE_SKIPNEXT 7
STATIC PROCEDURE rtlnk_libtrans( aLibList )
STATIC hTrans := { ;
"CT" => "hbct" , ;
"CTP" => "hbct" , ;
"CLASSY" => NIL , ;
"CSYINSP" => NIL , ;
"SIX3" => NIL , ;
"NOMACH6" => NIL , ;
"BLXRATEX" => NIL , ;
"BLXCLP50" => NIL , ;
"BLXCLP52" => NIL , ;
"BLXCLP53" => NIL , ;
"EXOSPACE" => NIL , ;
"CLIPPER" => NIL , ;
"EXTEND" => NIL , ;
"TERMINAL" => NIL , ;
"PCBIOS" => NIL , ;
"ANSITERM" => NIL , ;
"DBFBLOB" => NIL , ;
"DBFMEMO" => NIL , ;
"DBFNTX" => NIL , ;
"DBFCDX" => NIL , ;
"_DBFCDX" => NIL , ;
"CLD" => NIL , ;
"CLDR" => NIL , ;
"LLIBCE" => NIL , ;
"LLIBCA" => NIL }
LOCAL cLib
FOR EACH cLib IN aLibList DESCEND
IF Lower( Right( cLib, 4 ) ) == ".lib"
cLib := Left( cLib, Len( cLib ) - 4 )
ENDIF
IF Upper( cLib ) $ hTrans
cLib := hTrans[ Upper( cLib ) ]
IF cLib == NIL
hb_ADel( aLibList, cLib:__enumIndex(), .T. )
ENDIF
ENDIF
NEXT
RETURN
STATIC PROCEDURE rtlnk_filetrans( aFileList )
STATIC hTrans := { ;
"CTUS" => NIL , ;
"CTUSP" => NIL , ;
"CTINT" => NIL , ;
"CTINTP" => NIL , ;
"__WAIT" => NIL , ;
"__WAIT_4" => NIL , ;
"__WAIT_B" => NIL , ;
"BLXCLP50" => NIL , ;
"BLXCLP52" => NIL , ;
"BLXCLP53" => NIL , ;
"BLDCLP50" => NIL , ;
"BLDCLP52" => NIL , ;
"BLDCLP53" => NIL , ;
"SIXCDX" => NIL , ;
"SIXNSX" => NIL , ;
"SIXNTX" => NIL , ;
"DBT" => NIL , ;
"FPT" => NIL , ;
"SMT" => NIL , ;
"NOMEMO" => NIL , ;
"CLD.LIB" => NIL }
LOCAL cFile
FOR EACH cFile IN aFileList DESCEND
IF Lower( Right( cFile, 4 ) ) == ".obj"
cFile := Left( cFile, Len( cFile ) - 4 )
ENDIF
IF Upper( cFile ) $ hTrans
cFile := hTrans[ Upper( cFile ) ]
IF cFile == NIL
hb_ADel( aFileList, cFile:__enumIndex(), .T. )
ENDIF
ENDIF
NEXT
RETURN
STATIC FUNCTION rtlnk_read( cFileName, aPrevFiles )
LOCAL cFileBody
LOCAL cPath, cFile, cExt
LOCAL hFile
hb_FNameSplit( cFileName, @cPath, @cFile, @cExt )
IF Empty( cExt )
cExt := ".lnk"
ENDIF
cFileName := hb_FNameMerge( cPath, cFile, ".lnk" )
/* it's blinker extension, look for .lnk file in paths
* specified by LIB envvar
*/
IF !hb_fileExists( cFileName ) .AND. ;
!Left( cFileName, 1 ) $ hb_osPathDelimiters() .AND. ;
!SubStr( cFileName, 2, 1 ) == hb_osDriveSeparator()
FOR EACH cPath IN hb_aTokens( GetEnv( "LIB" ), hb_osPathListSeparator() )
cFile := hb_FNameMerge( cPath, cFileName )
IF hb_fileExists( cFile )
cFileName := cFile
EXIT
ENDIF
NEXT
ENDIF
/* protection against recursive calls */
IF AScan( aPrevFiles, { |x| x == cFileName } ) == 0
IF ( hFile := FOpen( cFileName ) ) != -1
cFileBody := Space( FSeek( hFile, 0, FS_END ) )
FSeek( hFile, 0, FS_SET )
IF FRead( hFile, @cFileBody, Len( cFileBody ) ) != Len( cFileBody )
cFileBody := NIL
ENDIF
FClose( hFile )
ENDIF
AAdd( aPrevFiles, cFileName )
ELSE
cFileBody := ""
ENDIF
RETURN cFileBody
STATIC FUNCTION rtlnk_process( cCommands, cFileOut, aFileList, aLibList, ;
aPrevFiles )
LOCAL nCh, nMode
LOCAL cLine, cWord
cCommands := StrTran( StrTran( cCommands, Chr( 13 ) ), ",", " , " )
FOR EACH nCh IN @cCommands
SWITCH Asc( nCh )
CASE 9
CASE 11
CASE 12
CASE Asc( ";" )
nCh := " "
ENDSWITCH
NEXT
nMode := RTLNK_MODE_NONE
IF ! ISARRAY( aFileList )
aFileList := {}
ENDIF
IF ! ISARRAY( aLibList )
aLibList := {}
ENDIF
IF ! ISARRAY( aPrevFiles )
aPrevFiles := {}
ENDIF
FOR EACH cLine IN hb_ATokens( cCommands, Chr( 10 ) )
cLine := AllTrim( cLine )
IF !Empty( cLine ) .AND. !cLine = "#" .AND. !cLine = "//"
IF nMode == RTLNK_MODE_NONE
/* blinker extension */
IF Upper( cLine ) = "ECHO "
OutStd( "hbmk2: Blinker ECHO: " + SubStr( cLine, 6 ) + hb_osNewLine() )
LOOP
ELSEIF Upper( cLine ) = "BLINKER "
/* skip blinker commands */
LOOP
ELSE /* TODO: add other blinker commands */
ENDIF
ENDIF
FOR EACH cWord IN hb_aTokens( cLine )
IF nMode == RTLNK_MODE_OUT
cFileOut := cWord
nMode := RTLNK_MODE_FILENEXT
ELSEIF nMode == RTLNK_MODE_FILE
IF !cWord == ","
IF AScan( aFileList, { |x| x == cWord } ) == 0
AAdd( aFileList, cWord )
ENDIF
nMode := RTLNK_MODE_FILENEXT
ENDIF
ELSEIF nMode == RTLNK_MODE_LIB
IF !cWord == ","
AAdd( aLibList, cWord )
nMode := RTLNK_MODE_LIBNEXT
ENDIF
ELSEIF nMode == RTLNK_MODE_SKIP
IF !cWord == ","
nMode := RTLNK_MODE_SKIPNEXT
ENDIF
ELSEIF cWord == ","
IF nMode == RTLNK_MODE_FILENEXT
nMode := RTLNK_MODE_FILE
ELSEIF nMode == RTLNK_MODE_LIBNEXT
nMode := RTLNK_MODE_LIB
ELSEIF nMode == RTLNK_MODE_SKIPNEXT
nMode := RTLNK_MODE_SKIP
ENDIF
ELSEIF cWord = "@"
cWord := SubStr( cWord, 2 )
cCommands := rtlnk_read( @cWord, aPrevFiles )
IF cCommands == NIL
OutStd( "hbmk2: error: Cannot open file: " + cWord + hb_osNewLine() )
RETURN .F.
ENDIF
IF !rtlnk_process( cCommands, @cFileOut, @aFileList, @aLibList, ;
aPrevFiles )
RETURN .F.
ENDIF
ELSE
cWord := Upper( cWord )
IF Len( cWord ) >= 2
IF "OUTPUT" = cWord
nMode := RTLNK_MODE_OUT
ELSEIF "FILE" = cWord
nMode := RTLNK_MODE_FILE
ELSEIF "LIBRARY" = cWord
nMode := RTLNK_MODE_LIB
ELSEIF "MODULE" = cWord .OR. ;
"EXCLUDE" = cWord .OR. ;
"REFER" = cWord .OR. ;
"INTO" = cWord
nMode := RTLNK_MODE_SKIP
ENDIF
ENDIF
ENDIF
NEXT
ENDIF
NEXT
RETURN .T.
/* Keep this public, it's used from macro. */
FUNCTION hbmk_ARCH()
RETURN t_cARCH
@@ -3404,8 +3640,7 @@ STATIC PROCEDURE ShowHelp( lLong )
" linux : gcc, owatcom, icc, mingw, mingwce" ,;
" darwin : gcc" ,;
" win : mingw, msvc, bcc, owatcom, icc, pocc, cygwin," ,;
" mingw64, msvc64, msvcia64, iccia64, pocc64," ,;
" mingwce, msvcce, poccce, xcc" ,;
" mingw64, msvc64, msvcia64, iccia64, pocc64, xcc" ,;
" wce : mingwarm, msvcarm, poccarm" ,;
" os2 : gcc, owatcom" ,;
" dos : djgpp, owatcom" ,;