RC1 tag moved to 'tags' from 'trunk'

This commit is contained in:
Viktor Szakats
2008-06-30 12:59:53 +00:00
parent 666179e324
commit 6f5534ae6a
2516 changed files with 0 additions and 976024 deletions

View File

@@ -1,116 +0,0 @@
THE HARBOUR PROJECT COMPILER LICENSE
====================================
Note: This license applies to most of the files in the source/compiler
directory.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
their web site at http://www.gnu.org/).
THE HARBOUR PROJECT LIBRARY LICENSE
===================================
Note: This license applies to most of the files in the include directory,
source directory, and subdirectories.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this software; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
As a special exception, the Harbour Project gives permission for
additional uses of the text contained in its release of Harbour.
The exception is that, if you link the Harbour libraries with other
files to produce an executable, this does not by itself cause the
resulting executable to be covered by the GNU General Public License.
Your use of that executable is in no way restricted on account of
linking the Harbour library code into it.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License.
This exception applies only to the code released by the Harbour
Project under the name Harbour. If you copy code from other
Harbour Project or Free Software Foundation releases into a copy of
Harbour, as the General Public License permits, the exception does
not apply to the code that you add in this way. To avoid misleading
anyone as to the status of such modified files, you must delete
this exception notice from them.
If you write modifications of your own for Harbour, it is your choice
whether to permit this exception to apply to your modifications.
If you do not wish that, delete this exception notice.
THE OLD HARBOUR PROJECT LIBRARY LICENSE
=======================================
Note: This license only applies to the following files:
source\rtl\philes.c
source\rtl\binnum.c
source\lang\msgeu.c
source\lang\msgsl437.c
source\lang\msgsl852.c
source\lang\msgsliso.c
source\lang\msgslwin.c
source\lang\msgsr852.c
source\lang\msgsriso.c
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version, with one exception:
The exception is that if you link the Harbour Runtime Library (HRL)
and/or the Harbour Virtual Machine (HVM) with other files to produce
an executable, this does not by itself cause the resulting executable
to be covered by the GNU General Public License. Your use of that
executable is in no way restricted on account of linking the HRL
and/or HVM code into it.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
their web site at http://www.gnu.org/).
THE HARBOUR PROJECT CONTRIB LICENSE
===================================
There is no one single license that applies to the Harbour Project
contrib files. Some files use the Harbour Project Compiler license.
Some files use the Harbour Project Library license. Some files use
the old Harbour Project Library license. Some files may even use other
types of free software or open source software licenses. Some files
have been donated to the public domain. If you use any of the contrib
files, you need to investigate the license that applies to each file.

File diff suppressed because it is too large Load Diff

View File

@@ -1,32 +0,0 @@
/*
* $Id$
*/
The following items are currently outstanding bugs or design issues that
require attention in the near future. This file differs from TODO in that it
shows current issues, not future design goals. Before reporting problems
with Harbour be sure to check here in Harbour's bug reporting system
<URL:http://sourceforge.net/tracker/index.php?group_id=681&atid=100681>
and in TODO.
Note that, in terms of tidying up for a release, items in the bug reporting
system should be seen as additional items in this file.
Developers, take the following template and add to the list below, be as
verbose as possible in the description.
-- cut here ----------------------------------------------------------------
----------------------------------------------------------------------------
Platform...........:
Noted as of release:
Noted by...........:
Severity...........:
Bug/Wish/TODO/etc..:
Description........:
-- cut here ----------------------------------------------------------------
============================================================================
Current known problems and wishes:

View File

@@ -1,49 +0,0 @@
#
# $Id$
#
ROOT = ./
ifeq ($(HB_HOST_BUILD),yes)
DIRS=\
source \
else
ifeq ($(HB_HOST_BUILD),lib)
HB_UTIL_DIR=
else
HB_UTIL_DIR=utils
endif
DIRS=\
doc \
include \
source \
$(HB_UTIL_DIR) \
contrib \
endif
ifeq ($(HB_POSTINST),)
ifneq ($(HB_ROOTPOSTINST),)
HB_POSTINST = $(HB_ROOTPOSTINST) $(HB_POSTINSTPARAM)
else
ifneq ($(SHLVL),)
HB_POSTINST = $(TOP)$(ROOT)bin/postinst.sh $(HB_POSTINSTPARAM)
else
ifeq ($(HB_ARCHITECTURE),dos)
HB_POSTINST = $(subst /,\,$(TOP)$(ROOT)bin/postinst.bat) $(HB_POSTINSTPARAM)
else
ifeq ($(HB_ARCHITECTURE),w32)
HB_POSTINST = $(subst /,\,$(TOP)$(ROOT)bin/postinst.bat) $(HB_POSTINSTPARAM)
endif
endif
endif
endif
endif
include $(ROOT)config/dir.cf

View File

@@ -1,150 +0,0 @@
/*
* $Id$
*/
=======================================================================
Harbour Project To-Do list
=======================================================================
Tasks for v.1 beta:
-------------------
Assign to: Jean-Francois Lefebvre (JFL)
Detail...: The following need to be added to the OO system:
Class Method, Multiple Constructor, Class init Support.
Status...: Open.
***
Assign to: <nobody>
Detail...: Add missing Clipper virtual memory functions.
Status...: Open.
***
=======================================================================
Tasks for v.1 release:
----------------------
Assign to: <nobody>
Detail...: Rewrite filesys.c to use native platform specific file I/O
with unlimited number of file handles, while maintaining
compatibility with the CA-Cl*pper legacy handle numbering
system. This either involves adding a linked list for the
translation table, or we should state that only handles 0-4
are number compatible.
Status...: Open.
=======================================================================
Tasks for after v.1 release:
----------------------------
Assign to: <nobody>
Detail...: Dynamic multi-language compiler/runtime support.
Status...: Open.
***
Assign to: <nobody>
Detail...: UNICODE support.
Status...: Open.
***
Assign to: <nobody>
Detail...: Multithreading support.
Status...: Open.
***
Assign to: <nobody>
Detail...: Add support for virtual file handles and registering some
meta handles so it will be possible to make:
h := fopen( "gzip:/tmp/myarchive.gz", FO_WRITE )
fwrite( h, cData )
fclose( h )
or:
h := fopen( "tcp:some.host:port", FO_WRITE )
...
or:
h := fopen( "|lpr -PLaserJet", FO_WRITE )
...
or:
h := fopen( "gunzip /tmp/myarchive.gz|", FO_READ )
...
etc.
Status...: Open.
***
Assign to: Przemek
Detail...: Define multi platform platform API for GTs which can mix
graphics objects with standard text output. Now it's
possible in GTXWC, GTWVT and GTALLEG. This I will discuss
yet also with xHarbour developers.
Status...: Open.
***
Assign to: <nobody>
Detail...: Add GTNET driver which will allow to run Harbour application
remotely. GTNET will be used on server side and on client
side any native GT driver.
Status...: Open.
***
Assign to: <nobody>
Detail...: Add support for remotely controlled GUI objects so we will
be able to create GUI programs with GTNET.
Status...: Open.
***
Assign to: <nobody>
Detail...: Add NETRDD - meta RDD which will allow transport layer
between client application and server application with any
other chosen RDD driver. Idea similar to GTNET but for RDD
drivers - it's sth like ADS does.
Status...: Open.
***
Assign to: Przemek
Detail...: Extended HB_IT_POINTER. In practice we can give them the
same functionality as for objects and use them for fast
creation objects at C level. We can also add HB_VALTYPE()
function which will return the extended type name, f.e.
"WINDOW", "FONT", "SOCKET" or anything what 3-rd party
programmers may want to use. It will greatly simplify
writing some libraries.
Status...: Open.
=======================================================================
Harbour Project To-Fix list
=======================================================================
Assign to: Ryszard
Detail...: SQLRDD.
Status...: Working on it.
***
Assign to: Ryszard
Detail...: Real strong typing in the compiler.
Status...: Open.
***
Assign to: Przemek
Detail...: Clean RDD code to be safe for return from RT errors
Status...: Open.
***
=======================================================================

View File

@@ -1,277 +0,0 @@
@echo off
rem
rem $Id$
rem
rem ---------------------------------------------------------------
rem This is a generic template file, if it doesn't fit your own needs
rem please DON'T MODIFY IT.
rem
rem Instead, make a local copy and modify that one, or make a call to
rem this batch file from your customized one. [vszakats]
rem ---------------------------------------------------------------
rem ---------------------------------------------------------------
rem Template to build a final Harbour executable, using Harbour
rem with the C code generation feature, then calling the proper C
rem linker/compiler.
rem
rem Copyright 1999-2004 Viktor Szakats (viktor.szakats@syenar.hu)
rem See doc/license.txt for licensing terms.
rem ---------------------------------------------------------------
rem if "%HB_ARCHITECTURE%" == "" set HB_ARCHITECTURE=w32
rem if "%HB_COMPILER%" == "" set HB_COMPILER=mingw32
rem if "%HB_GT_LIB%" == "" set HB_GT_LIB=
if "%HB_BIN_INSTALL%" == "" set HB_BIN_INSTALL=..\bin
if "%HB_LIB_INSTALL%" == "" set HB_LIB_INSTALL=..\lib
if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=..\include
:START
if "%HB_ARCHITECTURE%" == "" goto NO_ARCH
if "%HB_COMPILER%" == "" goto NO_COMP
if not "%1" == "" goto COMPILE
:HELP
echo.
echo Usage: bld filename
echo.
echo Notes:
echo.
echo - 'filename' is the .prg filename *without* extension.
echo - Don't forget to make a MAIN() function for you application.
echo - This batch file assumes you are in some directory off the main
echo harbour directory.
echo - Environment variables HB_ARCHITECTURE, HB_COMPILER, HB_GT_LIB
echo should be set. Setting HB_GT_LIB is optional.
echo The following values are currently supported:
echo.
echo HB_ARCHITECTURE:
echo - dos (HB_GT_LIB=gtdos by default)
echo - w32 (HB_GT_LIB=gtwin by default)
echo - linux (HB_GT_LIB=gtstd by default)
echo - os2 (HB_GT_LIB=gtos2 by default)
echo.
pause
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 - rxs32 (EMX/RSXNT/DOS GNU C, DOS 32-bit)
echo - watcom (OpenWatcom, DOS 32-bit)
echo - When HB_ARCHITECTURE=w32
echo - bcc32 (Borland C++ 4.x, 5.x, Windows 32-bit)
echo - gcc (Cygnus/Cygwin GNU C, Windows 32-bit)
echo - mingw32 (Cygnus/MinGW GNU C, Windows 32-bit)
echo - rxsnt (EMX/RSXNT/Win32 GNU C, Windows 32-bit)
echo - icc (IBM Visual Age C++, Windows 32-bit)
echo - msvc (Microsoft Visual C++, Windows 32-bit)
echo - watcom (OpenWatcom, Windows 32-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.
pause
echo HB_GT_LIB:
echo - gtstd (Standard streaming) (for all architectures)
echo - gtdos (DOS console) (for dos architecture)
echo - gtwin (Win32 console) (for w32 architecture)
echo - gtos2 (OS/2 console) (for os2 architecture)
echo - gtpca (PC ANSI console) (for all architectures)
echo - gtcrs (Curses console) (for linux, w32 architectures)
echo - gtsln (Slang console) (for linux, w32 architectures)
goto END
:NO_ARCH
echo Error: HB_ARCHITECTURE is not set.
goto HELP
:NO_COMP
echo Error: HB_COMPILER is not set.
goto HELP
:BAD_ARCH
echo Error: HB_ARCHITECTURE value is unsupported.
goto HELP
:BAD_COMP
echo Error: HB_COMPILER value is unsupported.
goto HELP
:COMPILE
%HB_BIN_INSTALL%\harbour %1.prg -n -q0 -gc0 -i%HB_INC_INSTALL% %2 %3 %HARBOURFLAGS%
:A_DOS
if not "%HB_GT_LIB%" == "" set _HB_GT_LIB=%HB_GT_LIB%
if not "%HB_ARCHITECTURE%" == "dos" goto A_W32
if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtdos
if not "%HB_COMPILER%" == "bcc16" goto A_DOS_BCC16_NOT
echo -O2 -d -mh %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% > build.tmp
echo -e%1.exe >> build.tmp
echo %1.c >> build.tmp
echo hbcpage.lib >> build.tmp
echo hbdebug.lib >> build.tmp
echo hbvm.lib >> build.tmp
echo hbrtl.lib >> build.tmp
echo %_HB_GT_LIB%.lib >> build.tmp
echo hblang.lib >> build.tmp
echo hbrdd.lib >> build.tmp
echo hbmacro.lib >> build.tmp
echo hbpp.lib >> build.tmp
echo rddfpt.lib >> build.tmp
echo rddntx.lib >> build.tmp
echo rddcdx.lib >> build.tmp
echo hbsix.lib >> build.tmp
echo hbcommon.lib >> build.tmp
bcc @build.tmp
del build.tmp
goto END
:A_DOS_BCC16_NOT
if not "%HB_COMPILER%" == "djgpp" goto A_DOS_DJGPP_NOT
echo %1.c > build.tmp
echo -o%1.exe %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% >> build.tmp
echo -lhbcpage >> build.tmp
echo -lhbdebug >> build.tmp
echo -lhbvm >> build.tmp
echo -lhbrtl >> build.tmp
echo -l%_HB_GT_LIB% >> build.tmp
echo -lhblang >> build.tmp
echo -lhbrdd >> build.tmp
echo -lhbrtl >> build.tmp
echo -lhbvm >> build.tmp
echo -lhbmacro >> build.tmp
echo -lhbpp >> build.tmp
echo -lrddfpt >> build.tmp
echo -lrddntx >> build.tmp
echo -lrddcdx >> build.tmp
echo -lhbsix >> build.tmp
echo -lhbcommon >> build.tmp
echo -lm >> build.tmp
gcc @build.tmp
del build.tmp
goto END
:A_DOS_DJGPP_NOT
if not "%HB_COMPILER%" == "rsx32" GOTO A_DOS_RSX32_NOT
gcc %1.c -Zrsx32 %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon -lhbpcre -lhbzlib
goto END
:A_DOS_RSX32_NOT
if not "%HB_COMPILER%" == "watcom" goto END
wpp386 -j -w3 -d2 -5s -5r -fp5 -oxehtz -zq -zt0 -bt=DOS %1.c -fo=%1.obj
echo debug all OP osn=DOS OP stack=65536 OP CASEEXACT OP stub=cwstub.exe NAME %1.exe > build.tmp
echo FILE %1.obj >> build.tmp
echo LIB hbcpage.lib >> build.tmp
echo LIB hbdebug.lib >> build.tmp
echo LIB hbvm.lib >> build.tmp
echo LIB hbrtl.lib >> build.tmp
echo LIB %_HB_GT_LIB%.lib >> build.tmp
echo LIB hblang.lib >> build.tmp
echo LIB hbrdd.lib >> build.tmp
echo LIB hbmacro.lib >> build.tmp
echo LIB hbpp.lib >> build.tmp
echo LIB rddntx.lib >> build.tmp
echo LIB rddcdx.lib >> build.tmp
echo LIB rddfpt.lib >> build.tmp
echo LIB hbsix.lib >> build.tmp
echo LIB hbcommon.lib >> build.tmp
echo LIB hbpcre.lib >> build.tmp
echo LIB hbzlib.lib >> build.tmp
wlink @build.tmp
del build.tmp
goto END
:A_W32
if not "%HB_ARCHITECTURE%" == "w32" goto A_OS2
if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtwin
if "%HB_COMPILER%" == "bcc32" bcc32 -O2 -d %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% %1.c %HB_USER_LIBS% hbcpage.lib hbdebug.lib hbvm.lib hbrtl.lib %_HB_GT_LIB%.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddfpt.lib rddntx.lib rddcdx.lib hbsix.lib hbcommon.lib hbpcre.lib hbzlib.lib
if "%HB_COMPILER%" == "gcc" gcc %1.c -o%1.exe %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon -lhbpcre -lhbzlib
if "%HB_COMPILER%" == "mingw32" gcc %1.c -o%1.exe %CFLAGS% -mno-cygwin -I%HB_INC_INSTALL% %HB_INC_TEMP% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon -lhbpcre -lhbzlib
if "%HB_COMPILER%" == "rsxnt" gcc %1.c -Zwin32 %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon -lhbpcre -lhbzlib
if "%HB_COMPILER%" == "msvc" cl -TP -W3 %CFLAGS% -I%HB_INC_INSTALL% %1.c /link /subsystem:CONSOLE /LIBPATH:%HB_LIB_INSTALL% %HB_USER_LIBS% hbcpage.lib hbdebug.lib hbvm.lib hbrtl.lib %_HB_GT_LIB%.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddntx.lib rddcdx.lib rddfpt.lib hbsix.lib hbcommon.lib hbpcre.lib hbzlib.lib user32.lib winspool.lib
if "%HB_COMPILER%" == "msvc" echo Ignore LNK4033 warning
:C_WATCOM
if not "%HB_COMPILER%" == "watcom" goto end
wpp386 -j -w3 -d2 -5s -5r -fp5 -oxehtz -zq -zt0 -mf -bt=NT %1.c -fo=%1.obj
echo debug all OP osn=NT OP stack=65536 OP CASEEXACT NAME %1.exe > build.tmp
echo FILE %1.obj >> build.tmp
echo LIB hbcpage.lib >> build.tmp
echo LIB hbdebug.lib >> build.tmp
echo LIB hbvm.lib >> build.tmp
echo LIB hbrtl.lib >> build.tmp
echo LIB %_HB_GT_LIB%.lib >> build.tmp
echo LIB hblang.lib >> build.tmp
echo LIB hbmacro.lib >> build.tmp
echo LIB hbpp.lib >> build.tmp
echo LIB rddntx.lib >> build.tmp
echo LIB rddcdx.lib >> build.tmp
echo LIB rddfpt.lib >> build.tmp
echo LIB hbsix.lib >> build.tmp
echo LIB hbrdd.lib >> build.tmp
echo LIB hbcommon.lib >> build.tmp
echo LIB hbpcre.lib >> build.tmp
echo LIB hbzlib.lib >> build.tmp
echo LIB kernel32.lib >> build.tmp
echo LIB user32.lib >> build.tmp
echo LIB winspool.lib >> build.tmp
echo LIB oleaut32.lib >> build.tmp
echo LIB uuid.lib >> build.tmp
wlink @build.tmp
del build.tmp
goto END
:A_OS2
if not "%HB_ARCHITECTURE%" == "os2" goto A_LINUX
if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtos2
if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon -lhbpcre -lhbzlib
if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ /C- /Tp %CFLAGS% -I%HB_INC_INSTALL% %1.c %HB_LIB_INSTALL%\hbcpage.lib %HB_LIB_INSTALL%\hbdebug.lib %HB_LIB_INSTALL%\hbvm.lib %HB_LIB_INSTALL%\hbrtl.lib %HB_LIB_INSTALL%\%_HB_GT_LIB%.lib %HB_LIB_INSTALL%\hblang.lib %HB_LIB_INSTALL%\hbrdd.lib %HB_LIB_INSTALL%\hbrtl.lib %HB_LIB_INSTALL%\hbvm.lib %HB_LIB_INSTALL%\hbmacro.lib %HB_LIB_INSTALL%\hbpp.lib %HB_LIB_INSTALL%\rddfpt.lib %HB_LIB_INSTALL%\rddntx.lib %HB_LIB_INSTALL%\rddcdx.lib %HB_LIB_INSTALL%\hbsix.lib %HB_LIB_INSTALL%\hbcommon.lib %HB_LIB_INSTALL%\hbpcre.lib %HB_LIB_INSTALL%\hbzlib.lib
goto END
:A_LINUX
if not "%HB_ARCHITECTURE%" == "linux" goto BAD_ARCH
if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtstd
if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I%HB_INC_INSTALL% -L../lib -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon -lhbpcre -lhbzlib
goto END
:CLEANUP
del %1.c
:END

View File

@@ -1,17 +0,0 @@
@echo off
rem
rem $Id$
rem
rem ---------------------------------------------------------------
rem This is a generic template file, if it doesn't fit your own needs
rem please DON'T MODIFY IT.
rem
rem Instead, make a local copy and modify that one, or make a call to
rem this batch file from your customized one. [vszakats]
rem ---------------------------------------------------------------
set HB_ARCHITECTURE=w32
set HB_COMPILER=bcc32
call bld.bat %1 %2 %3 %4 %5 %6 %7 %8 %9

View File

@@ -1,81 +0,0 @@
@echo off
rem
rem $Id$
rem
rem ---------------------------------------------------------------
rem Template to build a final Harbour executable, using Harbour
rem with the C code generation feature, then calling the proper C
rem linker/compiler.
rem
rem Copyright 1999-2001 Viktor Szakats (viktor.szakats@syenar.hu)
rem See doc/license.txt for licensing terms.
rem ---------------------------------------------------------------
if "%HB_COMPILER%" == "" set HB_COMPILER=gcc
if "%HB_BIN_INSTALL%" == "" set HB_BIN_INSTALL=..\bin
if "%HB_LIB_INSTALL%" == "" set HB_LIB_INSTALL=..\lib
if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=..\include
:START
if "%HB_COMPILER%" == "" goto NO_COMP
if not "%1" == "" goto COMPILE
:HELP
echo.
echo Usage: bld filename
echo.
echo Notes:
echo.
echo - 'filename' is the .prg filename _without_ extension.
echo - Don't forget to make a MAIN() function for you application.
echo - This batch file assumes you are in some directory off the main
echo harbour directory.
echo - Environment variables HB_COMPILER, HB_GT_LIB should be set.
echo Setting HB_GT_LIB is optional.
echo The following values are currently supported:
echo.
echo HB_COMPILER:
echo - gcc (EMX GNU C, OS/2 32-bit)
echo - icc (IBM Visual Age C++ 3.0, OS/2 32-bit)
echo.
echo HB_GT_LIB:
echo - gtstd (Standard streaming) (for all architectures)
echo - gtos2 (OS/2 console) (for os2 architecture)
echo - gtpca (PC ANSI console) (for all architectures)
echo - gtcrs (Curses console) (for linux, w32 architectures)
echo - gtsln (Slang console) (for linux, w32 architectures)
goto END
:NO_COMP
echo Error: HB_COMPILER is not set.
goto HELP
:BAD_COMP
echo Error: HB_COMPILER value is unsupported.
goto HELP
:COMPILE
%HB_BIN_INSTALL%\harbour %1.prg -n -i%HB_INC_INSTALL% %2 %3 %HARBOURFLAGS%
:A_DOS
set _HB_GT_LIB=%HB_GT_LIB%
if "%_HB_GT_LIB%" == "" set _HB_GT_LIB=gtos2
if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon -lhbpcre -lhbzlib
if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ /C- /Tp %CFLAGS% -I%HB_INC_INSTALL% %1.c %HB_LIB_INSTALL%\hbcpage.lib %HB_LIB_INSTALL%\hbdebug.lib %HB_LIB_INSTALL%\hbvm.lib %HB_LIB_INSTALL%\hbrtl.lib %HB_LIB_INSTALL%\%_HB_GT_LIB%.lib %HB_LIB_INSTALL%\hblang.lib %HB_LIB_INSTALL%\hbrdd.lib %HB_LIB_INSTALL%\hbrtl.lib %HB_LIB_INSTALL%\hbvm.lib %HB_LIB_INSTALL%\hbmacro.lib %HB_LIB_INSTALL%\hbpp.lib %HB_LIB_INSTALL%\rddfpt.lib %HB_LIB_INSTALL%\rddntx.lib %HB_LIB_INSTALL%\rddcdx.lib %HB_LIB_INSTALL%\hbsix.lib %HB_LIB_INSTALL%\hbcommon.lib %HB_LIB_INSTALL%\hbpcre.lib %HB_LIB_INSTALL%\hbzlib.lib
goto END
:CLEANUP
del %1.c
:END

View File

@@ -1,17 +0,0 @@
@echo off
rem
rem $Id$
rem
rem ---------------------------------------------------------------
rem This is a generic template file, if it doesn't fit your own needs
rem please DON'T MODIFY IT.
rem
rem Instead, make a local copy and modify that one, or make a call to
rem this batch file from your customized one. [vszakats]
rem ---------------------------------------------------------------
set HB_ARCHITECTURE=w32
set HB_COMPILER=msvc
call bld.bat %1 %2 %3 %4 %5 %6 %7 %8 %9

View File

@@ -1,706 +0,0 @@
#!/bin/sh
[ "$BASH" ] || exec bash `which $0` ${1+"$@"}
#
# $Id$
#
# ---------------------------------------------------------------
# Copyright 2003 Przemyslaw Czerpak <druzus@priv.onet.pl>
# small set of functions used by Harbour scripts
# warning: some bash extensions are used
#
# See doc/license.txt for licensing terms.
# ---------------------------------------------------------------
get_hbplatform()
{
local id
if [ "$OSTYPE" = "msdosdjgpp" ]; then
id="djgpp"
else
# please add your distro suffix if it not belong to the one recognized below
# and remember that order checking can be important
[ "${id}" = "" ] && id=`rel=$(rpm -q --queryformat='.%{VERSION}' mandriva-release-One 2>/dev/null) && echo "mdk$rel"|tr -d "."`
[ "${id}" = "" ] && id=`rel=$(rpm -q --queryformat='.%{VERSION}' mandriva-release 2>/dev/null) && echo "mdk$rel"|tr -d "."`
[ "${id}" = "" ] && id=`rel=$(rpm -q --queryformat='.%{VERSION}' mandrake-release 2>/dev/null) && echo "mdk$rel"|tr -d "."`
[ "${id}" = "" ] && id=`rel=$(rpm -q --queryformat='.%{VERSION}' redhat-release 2>/dev/null) && echo "rh$rel"|tr -d "."`
[ "${id}" = "" ] && id=`rel=$(rpm -q --queryformat='.%{VERSION}' fedora-release 2>/dev/null) && echo "fc$rel"|tr -d "."`
[ "${id}" = "" ] && id=`rel=$(rpm -q --queryformat='.%{VERSION}' suse-release 2>/dev/null) && echo "fc$rel"|tr -d "."`
[ "${id}" = "" ] && id=`rel=$(rpm -q --queryformat='.%{VERSION}' conectiva-release 2>/dev/null) && echo "cl$rel"|tr -d "."`
[ "${id}" = "" ] && id=`rel=$(rpm -q --queryformat='.%{VERSION}' aurox-release 2>/dev/null) && echo "cl$rel"|tr -d "."`
[ "${id}" = "" ] && id=`[ -f /etc/pld-release ] && cat /etc/pld-release|sed -e '/1/ !d' -e 's/[^0-9]//g' -e 's/^/pld/'`
[ "${id}" = "" ] && id=`uname -sr | tr '[ A-Z]' '[_a-z]'`
case "${id}" in
mingw*) id="mingw" ;;
*) ;;
esac
fi
echo -n "${id}"
}
get_hbver()
{
local FVER MAJOR MINOR REVIS hb_rootdir
hb_rootdir="${1-.}"
FVER="${hb_rootdir}/include/hbver.h"
MAJOR=`sed -e '/HB_VER_MAJOR/ !d' -e 's/[^0-9]*\([^ ]*\).*/\1/g' "${FVER}"`
MINOR=`sed -e '/HB_VER_MINOR/ !d' -e 's/[^0-9]*\([^ ]*\).*/\1/g' "${FVER}"`
REVIS=`sed -e '/HB_VER_REVISION/ !d' -e 's/[^0-9]*\([^ ]*\).*/\1/g' "${FVER}"`
echo -n "${MAJOR}.${MINOR}.${REVIS}"
}
get_solibname()
{
local name
name="${HB_SHAREDLIB_NAME}"
[ -z "${name}" ] && name="harbour"
echo -n "${name}"
}
mk_hbgetlibs()
{
local libs
if [ -z "$@" ]
then
libs=""
if [ "$HB_COMPILER" != "cemgw" ]
then
libs="$libs gtwin"
fi
echo -n "hbvm hbpp hbrtl hbrdd rddfpt rddcdx rddntx hbhsx hbsix hbusrrdd ${HB_DB_DRVEXT} hbmacro hbcommon hblang hbcpage gtcrs gtsln gtxvt gtxwc gtalleg gtcgi gtstd gtpca gttrm $libs gtwvt gtgui gtdos gtos2 hbdebug profiler hbcplr hbpcre hbzlib"
else
echo -n "$@"
fi
}
mk_hbgetlibsctb()
{
local libs
if [ -z "$@" ]
then
libs=""
if [ "$HB_COMPILER" = "cemgw" ]
then
libs="$libs gtwin"
fi
echo -n "$libs rddads hbct hbnf hbmzip hbtip xhb hbgd hbodbc hbpg hbmysql rddado hbw32 gtwvg $HB_USR_LIBS"
else
echo -n "$@"
fi
}
mk_hbtools()
{
local name hb_pref hb_tool hb_libs hb_libsc
name=`get_solibname`
hb_pref="$4"
[ -z "${hb_pref}" ] && hb_pref="${HB_TOOLS_PREF-hb}"
hb_cmpname="${HB_CMPNAME-harbour}"
if [ "${HB_ARCHITECTURE}" = "dos" ]; then
hb_tool="$1/${hb_pref}-bld"
hb_path_separator=";"
hb_static="yes"
hb_static_default=" (default)"
hb_exesuf=".exe"
elif [ "${HB_ARCHITECTURE}" = "w32" ]; then
hb_tool="$1/${hb_pref}-build"
hb_path_separator=":"
hb_static="yes"
hb_static_default=" (default)"
hb_exesuf=".exe"
else
hb_tool="$1/${hb_pref}-build"
hb_path_separator=":"
hb_static="no"
hb_shared_default=" (default)"
hb_exesuf=""
fi
hb_libs=`mk_hbgetlibs "$2"`
hb_libsc=`mk_hbgetlibsctb "$3"`
[ -z "${HB_GT_LIB}" ] && HB_GT_LIB="gtstd"
[ -z "${_DEFAULT_BIN_DIR}" ] && _DEFAULT_BIN_DIR="${HB_BIN_INSTALL}"
[ -z "${_DEFAULT_INC_DIR}" ] && _DEFAULT_INC_DIR="${HB_INC_INSTALL}"
[ -z "${_DEFAULT_LIB_DIR}" ] && _DEFAULT_LIB_DIR="${HB_LIB_INSTALL}"
HB_SYS_LIBS="-lm"
HB_CRS_LIB=""
HB_SLN_LIB=""
if [ "${C_USR//-DHB_PCRE_REGEX/}" != "${C_USR}" ]; then
HB_SYS_LIBS="-lpcre ${HB_SYS_LIBS}"
hb_libs="${hb_libs//hbpcre/}"
elif [ "${C_USR//-DHB_POSIX_REGEX/}" != "${C_USR}" ]; then
hb_libs="${hb_libs//hbpcre/}"
fi
if [ "${C_USR//-DHB_EXT_ZLIB/}" != "${C_USR}" ]; then
HB_SYS_LIBS="-lz ${HB_SYS_LIBS}"
hb_libs="${hb_libs//hbzlib/}"
fi
if [ "${HB_COMPILER}" = "mingw32" ]; then
HB_SYS_LIBS="${HB_SYS_LIBS} -luser32 -lwinspool -lgdi32 -lcomctl32 -lcomdlg32 -lole32 -loleaut32 -luuid -lwsock32 -lws2_32"
elif [ "${HB_COMPILER}" = "cemgw" ]; then
HB_SYS_LIBS="${HB_SYS_LIBS} -lwininet -lws2 -lcommdlg -lcommctrl -luuid -lole32"
elif [ "${HB_COMPILER}" = "djgpp" ]; then
HB_SYS_LIBS="${HB_SYS_LIBS}"
else
if [ "${HB_ARCHITECTURE}" = "linux" ]; then
HB_SYS_LIBS="${HB_SYS_LIBS} -ldl"
fi
if [ "${HB_ARCHITECTURE}" = "sunos" ]; then
HB_SYS_LIBS="${HB_SYS_LIBS} -lrt"
HB_CRS_LIB="curses"
elif [ -n "${HB_CURSES_VER}" ]; then
HB_CRS_LIB="${HB_CURSES_VER}"
elif [ "${HB_NCURSES_194}" = "yes" ]; then
HB_CRS_LIB="ncur194"
else
HB_CRS_LIB="ncurses"
fi
HB_SLN_LIB="slang"
fi
if [ "${C_USR//-mlp64/}" != "${C_USR}" ]; then
CC_C_USR="${CC_C_USR} -mlp64"
CC_L_USR="${CC_L_USR} -mlp64"
elif [ "${C_USR//-mlp32/}" != "${C_USR}" ]; then
CC_C_USR="${CC_C_USR} -mlp32"
CC_L_USR="${CC_L_USR} -mlp32"
elif [ "${C_USR//-m64/}" != "${C_USR}" ]; then
CC_C_USR="${CC_C_USR} -m64"
CC_L_USR="${CC_L_USR} -m64"
elif [ "${C_USR//-m32/}" != "${C_USR}" ]; then
CC_C_USR="${CC_C_USR} -m32"
CC_L_USR="${CC_L_USR} -m32"
fi
if [ "${C_USR//-fPIC/}" != "${C_USR}" ]; then
CC_C_USR="${CC_L_USR} -fPIC"
fi
echo "Generating ${hb_tool}... "
cat > ${hb_tool} <<EOF
#!/bin/sh
[ "\$BASH" ] || exec bash \`which \$0\` \${1+"\$@"}
#
# ---------------------------------------------------------------
# Copyright 2003 Przemyslaw Czerpak <druzus@priv.onet.pl>
# simple script to build binaries .tgz from Harbour sources
#
# See doc/license.txt for licensing terms.
# ---------------------------------------------------------------
#
# set environment variables
export HB_ARCHITECTURE="${HB_ARCHITECTURE}"
export HB_COMPILER="${HB_COMPILER}"
[ -z "\${HB_BIN_INSTALL}" ] && export HB_BIN_INSTALL="${_DEFAULT_BIN_DIR}"
[ -z "\${HB_INC_INSTALL}" ] && export HB_INC_INSTALL="${_DEFAULT_INC_DIR}"
[ -z "\${HB_LIB_INSTALL}" ] && export HB_LIB_INSTALL="${_DEFAULT_LIB_DIR}"
# be sure that ${name} binaries are in your path
export PATH="\${HB_BIN_INSTALL}${hb_path_separator}${CCPATH}\${PATH}"
if [ "\${HB_COMPILER}" == "gpp" ]; then
HB_CC="g++"
else
HB_CC="gcc"
fi
if [ \$# = 0 ]; then
echo "syntax: \$0 [<options,...>] <file>[.prg|.o]
\"${hb_pref}cc\", \"${hb_pref}cmp\", \"${hb_pref}lnk\" and \"${hb_pref}mk\" parameters:
-o<outputfilename> # output file name
\"${hb_pref}lnk\" and \"${hb_pref}mk\" parameters:
-static # link with static ${name} libs${hb_static_default}
-fullstatic # link with all static libs
-shared # link with shared libs${hb_shared_default}
-mt # link with multi-thread libs
-gt<hbgt> # link with <hbgt> GT driver, can be repeated to
# link with more GTs. The first one will be
# the default at runtime
-xbgtk # link with xbgtk library (xBase GTK+ interface)
-xhgtk # link with xHGtk library (GTK+ interface)
-hwgui # link with HWGUI library (GTK+ interface)
-l<libname> # link with <libname> library
-L<libpath> # additional path to search for libraries
-fmstat # link with the memory statistics lib
-nofmstat # do not link with the memory statistics lib (default)
-[no]strip # strip (no strip) binaries
-main=<main_func> # set the name of main program function/procedure.
# if not set then 'MAIN' is used or if it doesn't
# exist the name of first public function/procedure
# in first linked object module (link)
"
exit 1
elif [ "\$*" = "mk-links" ]; then
DIR="\${0%/*}"
NAME="\${0##*/}"
if [ "\${DIR}" != "\${NAME}" ]; then
(cd "\${DIR}"
for n in ${hb_pref}cc ${hb_pref}cmp ${hb_pref}mk ${hb_pref}lnk; do
if [ "\${HB_ARCHITECTURE}" = "dos" ]; then
cp -f "\${NAME}" "\${n}"
else
ln -sf "\${NAME}" "\${n}"
fi
done
)
fi
exit
fi
## check basename
case "\${0##*/}" in
*cc) HB=cc ;;
*cmp) HB=cmp ;;
*lnk) HB=lnk ;;
*mk) HB=mk ;;
*) exit 1 ;;
esac
## default parameters
HB_STATIC="${hb_static}"
HB_MT=""
HB_GT="${HB_GT_LIB#gt}"
HB_GPM_MOUSE="${HB_GPM_MOUSE}"
HB_GT_REQ=""
HB_FM_REQ=""
HB_STRIP="yes"
HB_MAIN_FUNC=""
HB_XBGTK=""
HB_XHGTK=""
HB_HWGUI=""
HB_USRLIBS=""
HB_USRLPATH=""
HB_GEN=""
[ -n "\$TMPDIR" ] || TMPDIR="\$TMP"
[ -n "\$TMPDIR" ] || TMPDIR="\$TEMP"
[ -n "\$TMPDIR" ] || TMPDIR="/tmp"
_TMP_FILE_="\${TMPDIR}/hb-build-\$USER-\$\$.c"
## parse params
P=( "\$@" ); n=0; DIROUT="."; FILEOUT=""
while [ \$n -lt \${#P[@]} ]; do
v=\${P[\$n]}; p=""
case "\$v" in
-o*)
d="\${v#-o}"; p="\${v}"
if [ -d "\${d}" ]; then
DIROUT="\${d%/}"
elif [ -d "\${d%/*}" ]; then
DIROUT="\${d%/*}"; FILEOUT="\${d##*/}"; p="-o\${d}"
[ \${HB} = "cc" ] || p="-o\${d%.*}"
elif [ -n "\${d}" ]; then
FILEOUT="\${d}"; p="-o\${d}"
[ \${HB} = "cc" ] || p="-o\${d%.*}"
fi ;;
-static) HB_STATIC="yes" ;;
-fullstatic) HB_STATIC="full" ;;
-shared) HB_STATIC="no" ;;
-xbgtk) HB_XBGTK="yes" ;;
-xhgtk) HB_XHGTK="yes" ;;
-hwgui) HB_HWGUI="yes" ;;
-mt) HB_MT="MT" ;;
-gt*) HB_GT_REQ="\${HB_GT_REQ} \${v#-gt}" ;;
-fmstat) HB_FM_REQ="STAT" ;;
-nofmstat) HB_FM_REQ="NOSTAT" ;;
-strip) HB_STRIP="yes" ;;
-nostrip) HB_STRIP="no" ;;
-l[^-]*) HB_USRLIBS="\${HB_USRLIBS} \${v}" ;;
-L[^-]*) HB_USRLPATH="\${HB_USRLPATH} \${v}" ;;
-main=*) HB_MAIN_FUNC="\${v#*=}" ;;
-g[cohwij]) HB_GEN="\${v#-g}"; p="\${v}" ;;
-gc[0-9]) HB_GEN="c"; p="\${v}" ;;
-go[0-9]) HB_GEN="o"; p="\${v}" ;;
-*) p="\${v}" ;;
*) [ -z \${FILEOUT} ] && FILEOUT="\${v##*/}"; p="\${v}" ;;
esac
[ -n "\$p" ] && PP[\$n]="\$p"
n=\$[\$n + 1]
done
P=( "\${PP[@]}" )
case "\${HB_MT}" in
[Mm][Tt]|[Yy][Ee][Ss]|1) HB_MT="MT";;
*) HB_MT="";;
esac
SYSTEM_LIBS="${HB_SYS_LIBS}"
# use pthread system library for MT programs
if [ "\${HB_MT}" = "MT" ]; then
case "\${HB_ARCHITECTURE}" in
dos|w32|os2)
;;
*)
SYSTEM_LIBS="-lpthread \${SYSTEM_LIBS}"
;;
esac
fi
HB_GT_STAT=""
[ -z "\${HB_GT_REQ}" ] && HB_GT_REQ="\${HB_GT}"
HB_GT_REQ=\`echo \${HB_GT_REQ}|tr '[a-z]' '[A-Z]'\`
HB_MAIN_FUNC=\`echo \${HB_MAIN_FUNC}|tr '[a-z]' '[A-Z]'\`
HB_PATHS="-I\${HB_INC_INSTALL}"
GCC_PATHS="\${HB_PATHS} -L\${HB_LIB_INSTALL}"
LN_OPT="${CC_L_USR}"
CC_OPT="${CC_C_USR}"
HB_OPT="${CC_PRG_USR}"
[ "\${HB_GEN}" != "" ] || HB_OPT="\${HB_OPT} -gc0"
HB_GPM_LIB=""
if [ -f "\${HB_LIB_INSTALL}/libgtsln.a" ]; then
if [ "\${HB_ARCHITECTURE}" = "darwin" ]; then
SYSTEM_LIBS="\${SYSTEM_LIBS} -L/sw/lib -L/opt/local/lib"
elif [ "\${HB_ARCHITECTURE}" = "bsd" ]; then
SYSTEM_LIBS="\${SYSTEM_LIBS} -L/usr/local/lib"
fi
SYSTEM_LIBS="-l${HB_SLN_LIB:-slang} \${SYSTEM_LIBS}"
[ "\${HB_GPM_MOUSE}" = "yes" ] && HB_GPM_LIB="gpm"
fi
if [ -f "\${HB_LIB_INSTALL}/libgtcrs.a" ]; then
SYSTEM_LIBS="-l${HB_CRS_LIB:-ncurses} \${SYSTEM_LIBS}"
[ "\${HB_GPM_MOUSE}" = "yes" ] && HB_GPM_LIB="gpm"
fi
if [ "\${HB_WITHOUT_X11}" != "yes" ]; then
if [ -f "\${HB_LIB_INSTALL}/libgtxvt.a" ] || [ -f "\${HB_LIB_INSTALL}/libgtxwc.a" ]; then
[ -d "/usr/X11R6/lib64" ] && SYSTEM_LIBS="\${SYSTEM_LIBS} -L/usr/X11R6/lib64"
SYSTEM_LIBS="-L/usr/X11R6/lib -lX11 \${SYSTEM_LIBS}"
fi
fi
[ -n "\${HB_GPM_LIB}" ] && SYSTEM_LIBS="-l\${HB_GPM_LIB} \${SYSTEM_LIBS}"
if [ "\${HB_XBGTK}" = "yes" ]; then
SYSTEM_LIBS="\${SYSTEM_LIBS} \`pkg-config --libs gtk+-2.0\`"
elif [ "\${HB_XHGTK}" = "yes" ]; then
SYSTEM_LIBS="\${SYSTEM_LIBS} \`pkg-config --libs gtk+-2.0 libglade-2.0\`"
elif [ "\${HB_HWGUI}" = "yes" ]; then
SYSTEM_LIBS="\${SYSTEM_LIBS} \`pkg-config --libs gtk+-2.0 --libs libgnomeprint-2.2\`"
fi
if [ "\${HB_STATIC}" = "full" ]; then
if [ "\${HB_ARCHITECTURE}" = "linux" ]; then
SYSTEM_LIBS="\${SYSTEM_LIBS} -lpthread -ldl"
fi
LN_OPT="\${LN_OPT} -static"
HB_STATIC="yes"
fi
HB_LNK_REQ=""
for gt in \${HB_GT_REQ}; do
# if [ "\${HB_STATIC}" = "yes" ] || [ "\${gt}" = "ALLEG" ]; then
HB_LNK_REQ="\${HB_LNK_REQ} HB_GT_\${gt}"
if [ "\${gt}" = "ALLEG" ]; then
if [ "\${HB_STATIC}" = "yes" ]; then
SYSTEM_LIBS="\`allegro-config --static 2>/dev/null\` \${SYSTEM_LIBS}"
else
SYSTEM_LIBS="\`allegro-config --libs 2>/dev/null\` \${SYSTEM_LIBS}"
fi
fi
# fi
done
[ -n "\${HB_FM_REQ}" ] && HB_LNK_REQ="\${HB_LNK_REQ} HB_FM_\${HB_FM_REQ}"
HB_LNK_ATTR=""
HARBOUR_LIBS=""
if [ "\${HB_STATIC}" = "yes" ]; then
libs="${hb_libs} ${hb_libsc}"
else
l="${name}"
if [ "\${HB_ARCHITECTURE}" = "darwin" ]; then
pref="lib"
ext=".dylib"
LN_OPT="\${LN_OPT} -bind_at_load -multiply_defined suppress"
elif [ "\${HB_ARCHITECTURE}" = "w32" ]; then
pref=""
ext=".dll"
HB_LNK_ATTR="__attribute__ ((dllimport))"
elif [ "\${HB_ARCHITECTURE}" = "hpux" ]; then
pref="lib"
ext=".sl"
else
pref="lib"
ext=".so"
fi
[ "\${HB_MT}" = "MT" ] && [ -f "\${HB_LIB_INSTALL}/\${pref}\${l}mt\${ext}" ] && l="\${l}mt"
[ -f "\${HB_LIB_INSTALL}/\${pref}\${l}\${ext}" ] && HARBOUR_LIBS="\${HARBOUR_LIBS} -l\${l}"
libs="gtalleg hbdebug profiler ${hb_libsc}"
fi
for l in \${libs}
do
[ "\${HB_MT}" = "MT" ] && [ -f "\${HB_LIB_INSTALL}/lib\${l}mt.a" ] && l="\${l}mt"
if [ -f "\${HB_LIB_INSTALL}/lib\${l}.a" ]; then
HARBOUR_LIBS="\${HARBOUR_LIBS} -l\${l}"
fi
done
if [ "\${HB_XBGTK}" = "yes" ]; then
HARBOUR_LIBS="\${HARBOUR_LIBS} -lxbgtk"
HB_PATHS="\${HB_PATHS} -I\`PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config --variable=xbgtkincludedir xbgtk\`"
fi
if [ "\${HB_XHGTK}" = "yes" ]; then
HARBOUR_LIBS="\${HARBOUR_LIBS} -lxhgtk"
fi
if [ "\${HB_HWGUI}" = "yes" ]; then
HARBOUR_LIBS="\${HARBOUR_LIBS} -lhwgui -lprocmisc -lhbxml"
fi
if [ "\${HB_ARCHITECTURE}" = "darwin" ] || \\
[ "\${HB_ARCHITECTURE}" = "sunos" ] || \\
[ "\${HB_ARCHITECTURE}" = "hpux" ]; then
HARBOUR_LIBS="\${HARBOUR_LIBS} \${HARBOUR_LIBS}"
else
HARBOUR_LIBS="-Wl,--start-group \${HARBOUR_LIBS} -Wl,--end-group"
fi
l="mainwin"
[ "\${HB_MT}" = "MT" ] && [ -f "\${HB_LIB_INSTALL}/lib\${l}mt.a" ] && l="\${l}mt"
[ -f "\${HB_LIB_INSTALL}/lib\${l}.a" ] && HARBOUR_LIBS="\${HARBOUR_LIBS} -l\${l}"
l="fm"
[ "\${HB_MT}" = "MT" ] && [ -f "\${HB_LIB_INSTALL}/lib\${l}mt.a" ] && l="\${l}mt"
if [ -f "\${HB_LIB_INSTALL}/lib\${l}.a" ] && \\
( [ -n "\${HB_FM_REQ}" ] || [ "\${HB_STATIC}" = "yes" ] ) && \\
( [ "\${HB_COMPILER}" != "cemgw" ] || [ "\${HB_FM_REQ}" = "STAT" ] ); then
if [ "\${HB_STATIC}" = "yes" ] && [ "\${HB_FM_REQ}" = "STAT" ]; then
HARBOUR_LIBS="-l\${l} \${HARBOUR_LIBS}"
else
HARBOUR_LIBS="\${HARBOUR_LIBS} -l\${l}"
fi
fi
if [ "\${HB_ARCHITECTURE}" = "darwin" ]; then
CC_OPT="\${CC_OPT} -no-cpp-precomp -Wno-long-double"
elif [ "\${HB_ARCHITECTURE}" = "sunos" ]; then
HB_STRIP="no"
fi
FOUTC="\${DIROUT}/\${FILEOUT%.*}.c"
FOUTO="\${DIROUT}/\${FILEOUT%.*}.o"
FOUTE="\${DIROUT}/\${FILEOUT%.[Pp][Rr][Gg]}"
FOUTE="\${FOUTE%.[oc]}"
FOUTE="\${FOUTE%${hb_exesuf}}${hb_exesuf}"
hb_cc()
{
local LNK_OPT P n
LNK_OPT="\${LN_OPT} \${HB_USRLPATH} \${HB_USRLIBS} \${HARBOUR_LIBS} \${SYSTEM_LIBS}"
P=( "\$@" ); n=0
while [ \$n -lt \${#P[@]} ]; do
if [ "\${P[\$n]}" = "-c" ]; then
LNK_OPT=""
n=\${#P[@]}
fi
n=\$[\$n + 1]
done
${CCPREFIX}\${HB_CC} "\$@" \${CC_OPT} \${GCC_PATHS} \${LNK_OPT}
}
hb_cmp()
{
${hb_cmpname} "\$@" \${HB_OPT} \${HB_PATHS} && \\
( [ "\${HB_GEN//c/}" != "" ] || \\
( [ -f "\${FOUTC}" ] && \\
hb_cc -c "\${FOUTC}" -o "\${FOUTO}" && \\
( [ "\${HB_GEN}" = "c" ] || rm -f "\${FOUTC}" ) ) )
}
hb_link()
{
if [ "\${HB_COMPILER}" != "djgpp" ]; then
if [ -n "\${HB_MAIN_FUNC}" ]; then
HB_MAIN_FUNC="@\${HB_MAIN_FUNC}"
elif [ -f "\${FOUTO}" ]; then
HB_MAIN_FUNC=\`hb_lnk_main "\${FOUTO}"\`
fi
fi
if [ -n "\${HB_LNK_REQ}" ] || [ -n "\${HB_GT_REQ}" ] || [ -n "\${HB_MAIN_FUNC}" ]; then
hb_lnk_request > \${_TMP_FILE_}
LN_OPT="\${_TMP_FILE_} \${LN_OPT}"
fi
hb_cc "\$@" -o "\${FOUTE}"
}
hb_lnk_request()
{
echo "#include \\"hbapi.h\\""
if [ -n "\${HB_LNK_REQ}" ]; then
for fn in \${HB_LNK_REQ}; do
echo "HB_FUNC_EXTERN( \${fn} );"
done
echo "void _hb_lnk_ForceLink_build( void )"
echo "{"
for fn in \${HB_LNK_REQ}; do
echo " HB_FUNC_EXEC( \${fn} );"
done
echo "}"
fi
gt="\${HB_GT_REQ%% *}"
if [ -n "\$gt" ] || [ -n "\${HB_MAIN_FUNC}" ]; then
echo "#include \\"hbinit.h\\""
echo "HB_EXTERN_BEGIN"
echo "extern \${HB_LNK_ATTR} char * s_defaultGT;"
echo "extern \${HB_LNK_ATTR} char * s_pszLinkedMain;"
echo "HB_EXTERN_END"
echo "HB_CALL_ON_STARTUP_BEGIN( hb_lnk_SetDefault_build )"
if [ -n "\$gt" ]; then
echo " s_defaultGT = \\"\$gt\\";"
fi
if [ -n "\${HB_MAIN_FUNC}" ]; then
echo " s_pszLinkedMain = \\"\${HB_MAIN_FUNC}\\";"
fi
echo "HB_CALL_ON_STARTUP_END( hb_lnk_SetDefault_build )"
fi
}
hb_lnk_main()
{
(${CCPREFIX}nm \$1 -g -n --defined-only -C|sed -e '/ HB_FUN_/ ! d' -e 's/^[0-9a-fA-F]* T HB_FUN_\([A-Z0-9_]*\).*/\1/'|head -1|grep -v '^MAIN\$')2>/dev/null
# (${CCPREFIX}nm \$1 -n --defined-only|sed -e '/HB_FUN_/ ! d' -e 's/^[0-9a-fA-F]* [Tt] HB_FUN_//'|head -1|grep -v '^MAIN\$')2>/dev/null
}
hb_cleanup()
{
rm -f "\${_TMP_FILE_}"
}
trap hb_cleanup EXIT &>/dev/null
case "\${HB}" in
*cc)
hb_cc "\${P[@]}"
;;
*cmp)
hb_cmp "\${P[@]}"
;;
*lnk)
hb_link "\${P[@]}" && \\
( [ "\${HB_STRIP}" != "yes" ] || ${CCPREFIX}strip "\${FOUTE}" )
;;
*mk)
hb_cmp "\${P[@]}" && \\
hb_link "\${FOUTO}" && \\
( [ "\${HB_STRIP}" != "yes" ] || ${CCPREFIX}strip "\${FOUTE}" ) && \\
rm -f "\${FOUTO}"
;;
esac
EOF
chmod 755 ${hb_tool}
echo "Creating links..."
${hb_tool} mk-links
}
mk_hblibso()
{
local LIBS LIBSMT l lm ll hb_rootdir hb_ver hb_libs full_lib_name full_lib_name_mt linker_options
name=`get_solibname`
hb_rootdir="${1-.}"
hb_ver=`get_hbver "${hb_rootdir}"`
hb_libs=`mk_hbgetlibs "$2"`
[ -z "${HB_GT_LIB}" ] && HB_GT_LIB="gtstd"
(cd $HB_LIB_INSTALL
LIBS=""
LIBSMT=""
for l in ${hb_libs}
do
case $l in
hbdebug|profiler|fm|hbodbc|gtalleg|rddads) ;;
*)
ls="lib${l}.a"
if [ -f lib${l}mt.a ]
then
lm="lib${l}mt.a"
else
lm="${ls}"
fi
if [ -f $ls ]
then
LIBS="$LIBS $ls"
fi
if [ -f $lm ]
then
LIBSMT="$LIBSMT $lm"
fi
if [ "${HB_ARCHITECTURE}" = "darwin" ]; then
if [ "${l}" = gtcrs ]; then
linker_options="$linker_options -lncurses"
elif [ "${l}" = gtsln ]; then
if [ "${HB_WITHOUT_GTSLN}" != "yes" ]; then
linker_options="$linker_options -lslang"
fi
fi
fi
;;
esac
done
if [ "${HB_ARCHITECTURE}" = "darwin" ]; then
lib_ext=".dylib"
full_lib_name="lib${name}.${hb_ver}${lib_ext}"
full_lib_name_mt="lib${name}mt.${hb_ver}${lib_ext}"
linker_options="-L/sw/lib -L/opt/local/lib $linker_options"
elif [ "${HB_ARCHITECTURE}" = "w32" ]; then
lib_ext=".dll"
full_lib_name="${name}${lib_ext}"
full_lib_name_mt="${name}mt${lib_ext}"
elif [ "${HB_ARCHITECTURE}" = "hpux" ]; then
lib_ext=".sl"
full_lib_name="lib${name}-${hb_ver}${lib_ext}"
full_lib_name_mt="lib${name}mt-${hb_ver}${lib_ext}"
else
lib_ext=".so"
full_lib_name="lib${name}-${hb_ver}${lib_ext}"
full_lib_name_mt="lib${name}mt-${hb_ver}${lib_ext}"
fi
if [ -n "${HB_TOOLS_PREF}" ]; then
hb_mkslib="${HB_BIN_INSTALL}/${HB_TOOLS_PREF}-mkslib"
else
hb_mkslib="${HB_BIN_INSTALL}/hb-mkslib"
fi
echo "Making ${full_lib_name}..."
${hb_mkslib} ${full_lib_name} $LIBS ${linker_options}
if [ "$HB_MT" = "MT" ]; then
echo "Making ${full_lib_name_mt}..."
${hb_mkslib} ${full_lib_name_mt} $LIBSMT ${linker_options}
fi
for l in ${full_lib_name} ${full_lib_name_mt}
do
if [ -f $l ]
then
if [ "${HB_ARCHITECTURE}" = "darwin" ]; then
ll=${l%.${hb_ver}${lib_ext}}${lib_ext}
elif [ "${HB_ARCHITECTURE}" = "w32" ]; then
ll=""
else
ll=${l%-${hb_ver}${lib_ext}}${lib_ext}
ln -sf $l $ll
fi
if [ -n "$ll" ]; then
case $HB_LIB_INSTALL in
*/usr/lib/*|*/usr/lib64/*|*/usr/local/lib/*|*/usr/local/lib64/*)
ln -sf ${name}/$l ../$ll
;;
*/usr/local/*)
mkdir -p ../../lib
ln -sf ../${name}/lib/$l ../../lib/$ll
;;
*)
;;
esac
fi
fi
done
)
#export LD_LIBRARY_PATH="$HB_LIB_INSTALL:$LD_LIBRARY_PATH"
}

View File

@@ -1,148 +0,0 @@
#!/bin/sh
[ "$BASH" ] || exec bash `which $0` ${1+"$@"}
#
# $Id$
#
# ---------------------------------------------------------------
# Copyright 2003 Przemyslaw Czerpak <druzus@polbox.com>
# simple script to build shared libraries from static ones and
# object files
#
# See doc/license.txt for licensing terms.
# ---------------------------------------------------------------
# HB_ARCHITECTURE=""
# CCPREFIX=""
if [ -n "${HB_ARCHITECTURE}" ]
then
hb_arch="${HB_ARCHITECTURE}"
else
hb_arch=`uname -s | tr -d "[-]" | tr '[A-Z]' '[a-z]' 2>/dev/null`
fi
case "$hb_arch" in
*windows*|*mingw32*|msys*) hb_arch="w32" ;;
*dos) hb_arch="dos" ;;
*bsd) hb_arch="bsd" ;;
esac
case "$hb_arch" in
darwin) SLIB_EXT=".dylib" ;;
w32) SLIB_EXT=".dll" ;;
hpux) SLIB_EXT=".sl" ;;
*) SLIB_EXT=".so" ;;
esac
NAME="${1%${SLIB_EXT}}"
LIB_NAME="${NAME##*/}"
DSTDIR="${NAME%${LIB_NAME}}"
[ -n "${DSTDIR}" ] || DSTDIR="./"
if [ $# -lt 2 ] || [ -z "${LIB_NAME}" ]
then
echo "usage: `basename $0` <target[${SLIB_EXT}]> [link options] src1.a .. srcN.a [obj1.o .. objN.o]"
exit 1
fi
shift
BASE=`echo ${LIB_NAME} | sed "s/\([^.-]*\)[.-][0-9.]*/\1/g"`
VERSION="${LIB_NAME#${BASE}}"
VERSION="${VERSION#[.-]}"
REVIS="${VERSION}"
MAJOR="${REVIS%%.*}"
REVIS="${REVIS#${MAJOR}}"
REVIS="${REVIS#.}"
MINOR="${REVIS%%.*}"
REVIS="${REVIS#${MINOR}}"
REVIS="${REVIS#.}"
REVIS="${REVIS%%.*}"
[ -n "${MAJOR}" ] || MAJOR=0
[ -n "${MINOR}" ] || MINOR=1
[ -n "${REVIS}" ] || REVIS=0
VERSION="${MAJOR}.${MINOR}.${REVIS}"
OTMPDIR="/tmp/hb-mkslib-$$"
dir=`pwd`
cleanup()
{
rm -fR "${OTMPDIR}"
}
trap cleanup EXIT &>/dev/null
rm -fR "${OTMPDIR}"
mkdir -p "${OTMPDIR}"
cd "${OTMPDIR}"
for f in $*
do
case "${f}" in
*.o)
if [ ! -r "${dir}/${f}" ]
then
echo "cannot read file: ${f}"
exit 1
fi
cp "${dir}/${f}" "${OTMPDIR}" || exit 1
;;
*.a)
if [ ! -r "${dir}/${f}" ]
then
echo "cannot read file: ${f}"
exit 1
fi
d="${f%.a}"
d="${f##*/}"
mkdir $d
cd $d
${CCPREFIX}ar -x "${dir}/${f}" || exit 1
cd ..
;;
*)
linker_options="${linker_options} ${f}"
;;
esac
done
OBJLST=`find . -name \*.o`
cd "${OTMPDIR}"
if [ "${SLIB_EXT}" = ".dylib" ]; then
FULLNAME="${BASE}.${VERSION}${SLIB_EXT}"
ld -r -o "${FULLNAME}.o" $OBJLST && \
${CCPREFIX}gcc -dynamiclib -install_name "${BASE}.${MAJOR}${SLIB_EXT}" \
-compatibility_version ${MAJOR}.${MINOR} -current_version ${VERSION} \
-flat_namespace -undefined warning -multiply_defined suppress -single_module \
-o "${FULLNAME}" "${FULLNAME}.o" ${linker_options} && \
cd "${dir}" && \
mv -f "${OTMPDIR}/${FULLNAME}" "${DSTDIR}${FULLNAME}" && \
ln -sf "${FULLNAME}" "${DSTDIR}${BASE}.${MAJOR}${SLIB_EXT}" && \
ln -sf "${FULLNAME}" "${DSTDIR}${BASE}${SLIB_EXT}"
elif [ "${SLIB_EXT}" = ".dll" ]; then
FULLNAME="${LIB_NAME}${SLIB_EXT}"
if [ "$HB_COMPILER" = "cemgw" ]; then
SYSLIBS=" -lwininet -lws2"
else
SYSLIBS="-luser32 -lwinspool -lgdi32 -lcomctl32 -lcomdlg32 -lole32"
SYSLIBS="${SYSLIBS} -loleaut32 -luuid -lmpr -lwsock32 -lws2_32 -lmapi32"
fi
${CCPREFIX}gcc -shared -o "${FULLNAME}" $OBJLST ${linker_options} ${SYSLIBS} ${HB_DLLIBS} && \
cd "${dir}" && \
rm -f "${DSTDIR}${FULLNAME}" && \
mv -f "${OTMPDIR}/${FULLNAME}" "${DSTDIR}${FULLNAME}"
else
#FULLNAME="${BASE}-${VERSION}${SLIB_EXT}"
#FULLNAME="${BASE}{SLIB_EXT}.${VERSION}"
FULLNAME="${LIB_NAME}${SLIB_EXT}"
${CCPREFIX}gcc -shared -fPIC -o "${FULLNAME}" $OBJLST ${linker_options} ${L_USR} && \
cd "${dir}" && \
mv -f "${OTMPDIR}/${FULLNAME}" "${DSTDIR}${FULLNAME}"
fi
stat="$?"
[ $stat != 0 ] && cd "${dir}" && rm -f "${DSTDIR}${FULLNAME}"
cleanup
exit "${stat}"

View File

@@ -1,73 +0,0 @@
#!/bin/sh
#
# $Id$
#
# This script requires "TAR" utilities for compression.
if tar --version >/dev/null 2>&1; then
hb_archbin="tar"
hb_gnutar="yes"
elif gtar --version >/dev/null 2>&1; then
hb_archbin="gtar"
hb_gnutar="yes"
else
hb_archbin="tar"
hb_gnutar="no"
echo "Warning!!! Cannot find GNU TAR"
fi
hb_archopt="-czf"
hb_ext=".tar.gz"
if [ -f bin/hb-func.sh ]; then
hb_rootdir="."
else
hb_rootdir=`dirname $0`
hb_rootdir="${hb_rootdir}/.."
hb_archopt="-C $hb_rootdir $hb_archopt"
fi
. ${hb_rootdir}/bin/hb-func.sh
hb_ver=`get_hbver ${hb_rootdir}`
hb_filename="harbour-${hb_ver}.src${hb_ext}"
rm -f $hb_filename
#[ -z "$TZ" ] && export TZ=PST8PDT
hb_get_entries()
{
if [ "$format" = 8 ]; then
sed -e '/^\f/,+1 !d' -e '/[a-zA-Z0-9_]/ !d' $1/entries
else
sed -e '/^[ ]*name="..*"[\r]*$/ !d' -e 's/^[ ]*name="\(.*\)".*$/\1/g' $1/entries
fi
}
hb_collect_all()
{
for d in `find . -name ".svn"`
do
for f in `hb_get_entries $d`
do
f="`dirname $d`/$f"
[ -f "$f" ] && echo "$f"
done
done
}
hb_collect_all_svn()
{
for f in `svn status -v|sed -e '/^?/ d' -e 's/.* \([^ ]*\)/\1/g'`
do
[ -f "$f" ] && echo "$f"
done
}
hb_flst="$hb_rootdir/bin/hb_flst.tmp"
#format=`cat $hb_rootdir/.svn/format`
if [ "$format" = 4 ] || [ "$format" = 8 ]; then
(cd "$hb_rootdir";hb_collect_all) > "$hb_flst"
else
(cd "$hb_rootdir";hb_collect_all_svn) > "$hb_flst"
fi
$hb_archbin $hb_archopt $hb_filename --files-from "$hb_flst"
rm -fR "$hb_flst"

View File

@@ -1,29 +0,0 @@
@echo off
rem
rem $Id$
rem
rem ---------------------------------------------------------------
rem Copyright 2003 Przemyslaw Czerpak (druzus / at / priv.onet.pl)
rem simple script run after Harbour make install to finish install
rem process
rem
rem See doc/license.txt for licensing terms.
rem ---------------------------------------------------------------
goto inst_%HB_ARCHITECTURE%
:inst_dos
rem DOS post install part
goto end
:inst_w32
rem Windows post install part
goto end
:inst_
:end

View File

@@ -1,91 +0,0 @@
#!/bin/sh
[ "$BASH" ] || exec bash `which $0` ${1+"$@"}
#
# $Id$
#
# ---------------------------------------------------------------
# Copyright 2003 Przemyslaw Czerpak <druzus@priv.onet.pl>
# simple script run after Harbour make install to finish install
# process
#
# See doc/license.txt for licensing terms.
# ---------------------------------------------------------------
if [ -z "$HB_ARCHITECTURE" ] || [ -z "$HB_COMPILER" ] || \
[ -z "$HB_BIN_INSTALL" ] || \
[ -z "$HB_INC_INSTALL" ] || \
[ -z "$HB_LIB_INSTALL" ]
then
echo "The following envvars must be set:"
echo " HB_ARCHITECTURE"
echo " HB_COMPILER"
echo " HB_BIN_INSTALL"
echo " HB_INC_INSTALL"
echo " HB_LIB_INSTALL"
exit 1
fi
hb_root=`dirname "$0"`
if [ "${hb_root}" = "." ]
then
hb_root=".."
else
hb_root=`dirname "${hb_root}"`
fi
. ${hb_root}/bin/hb-func.sh
if [ "$HB_COMPILER" = "gcc" ] || [ "$HB_COMPILER" = "gpp" ] || \
[ "$HB_COMPILER" = "mingw32" ] || [ "$HB_COMPILER" = "cemgw" ] || \
[ "$HB_COMPILER" = "djgpp" ]
then
RANLIB=""
MAKE=make
AR="${CCPREFIX}ar -cr"
if [ "${HB_ARCHITECTURE}" = "bsd" ] || \
[ "${HB_ARCHITECTURE}" = "hpux" ] || \
[ `uname` = "FreeBSD" ]; then
MAKE=gmake
elif [ "${HB_ARCHITECTURE}" = "darwin" ]; then
# We must build an archive index on Darwin
AR="${CCPREFIX}ar -crs"
fi
if [ -n "${HB_TOOLS_PREF}" ]; then
hb_mkslib="${HB_BIN_INSTALL}/${HB_TOOLS_PREF}-mkslib"
rm -f "${hb_mkslib}"
sed -e "s/^# HB_ARCHITECTURE=\"\"\$/HB_ARCHITECTURE=\"${HB_ARCHITECTURE}\"/g" \
-e "s/^# CCPREFIX=\"\"\$/[ -n \"\${CCPREFIX}\" ] || CCPREFIX=\"${CCPREFIX}\"/g" \
"${hb_root}/bin/hb-mkslib.sh" > "${hb_mkslib}" && \
chmod 755 "${hb_mkslib}"
elif [ "${HB_ARCHITECTURE}" = "sunos" ] || \
[ "${HB_ARCHITECTURE}" = "hpux" ] || \
! which install &>/dev/null; then
rm -f "${HB_BIN_INSTALL}/hb-mkslib"
cp "${hb_root}/bin/hb-mkslib.sh" "${HB_BIN_INSTALL}/hb-mkslib" && \
chmod 755 "${HB_BIN_INSTALL}/hb-mkslib"
elif [ "${HB_ARCHITECTURE}" != "dos" ]; then
# Without -c some OSes _move_ the file instead of copying it!
install -c -m 755 "${hb_root}/bin/hb-mkslib.sh" "${HB_BIN_INSTALL}/hb-mkslib"
fi
mk_hbtools "${HB_BIN_INSTALL}" "$@"
if [ "$HB_COMPILER" = "gcc" ] || [ "$HB_COMPILER" = "gpp" ] || \
[ "$HB_COMPILER" = "mingw32" ] || [ "$HB_COMPILER" = "cemgw" ]; then
mk_hblibso "${hb_root}"
fi
# build fm lib with memory statistic
(cd ${hb_root}/source/vm
C_USR=${C_USR//-DHB_FM_STATISTICS_OFF/}
rm -f fm.o
${MAKE} -r fm.o
${AR} ${HB_LIB_INSTALL}/libfm.a fm.o
[ -n "${RANLIB}" ] && ${RANLIB} ${HB_LIB_INSTALL}/libfm.a
rm -f fm.o
if [ "${HB_MT}" = "MT" ]; then
${MAKE} -r fm.o 'HB_LIBCOMP_MT=YES'
${AR} ${HB_LIB_INSTALL}/libfmmt.a fm.o
[ -n "${RANLIB}" ] && ${RANLIB} ${HB_LIB_INSTALL}/libfmmt.a
rm -f fm.o
fi
)
fi

File diff suppressed because it is too large Load Diff

View File

@@ -1,46 +0,0 @@
#
# $Id$
#
ifneq ($(HB_ARCHITECTURE),)
ifneq ($(HB_COMPILER),)
include $(TOP)$(ROOT)config/global.cf
include $(TOP)$(ROOT)config/c.cf
include $(TOP)$(ROOT)config/prg.cf
EXE_NAME=
ifneq ($(C_MAIN),)
ifeq ($(EXE_NAME),)
EXE_NAME = $(C_MAIN:.c=$(EXE_EXT))
endif
endif
ifneq ($(PRG_MAIN),)
ifeq ($(EXE_NAME),)
EXE_NAME = $(PRG_MAIN:.prg=$(EXE_EXT))
endif
endif
EXE_ARCH = $(ARCH_DIR)/$(EXE_NAME)
LIB_DIR = $(TOP)$(ROOT)lib/$(ARCH_DIR)
ALL_OBJS = $(ALL_C_OBJS) $(ALL_PRG_OBJS)
first:: dirbase descend
descend :
@$(MK) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(EXE_NAME)
$(EXE_NAME) : $(ALL_OBJS)
$(LD_RULE)
INSTALL_OBJS = $(EXE_ARCH)
INSTALL_DIR = $(HB_BIN_INSTALL)
include $(TOP)$(ROOT)config/install.cf
endif
endif

View File

@@ -1,14 +0,0 @@
#
# $Id$
#
ifeq ($(PM),) # Only traverse directories if not compiling a specific module
DIR_RULE =\
@for d in $(DIRS); do \
if [ -d $$d ]; then \
$(MAKE) -C $$d $@; \
fi \
done
endif # ! compiling a specific program module

View File

@@ -1,96 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT =
LIB_PREF = lib
LIB_EXT = .a
CC = gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
CFLAGS = -W -Wall -DHB_OS_BSD
LD = gcc
LD_OUT = -o
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
LINKLIBS += -Wl,--start-group
LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library and other RTLs
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt))
# screen driver libraries
ifeq ($(HB_CRS_LIB),)
HB_CRS_LIB=ncurses
endif
ifneq ($(findstring gtcrs, $(HB_GT_LIBS)),)
LINKLIBS += -l$(HB_CRS_LIB)
endif
ifneq ($(findstring gtsln, $(HB_GT_LIBS)),)
LINKLIBS += -lslang
# In BSD, slang still needs curses :(
ifeq ($(findstring gtcrs, $(HB_GT_LIBS)),)
LINKLIBS += -l$(HB_CRS_LIB)
endif
endif
ifneq ($(findstring gtalleg, $(HB_GT_LIBS)),)
LINKLIBS += `allegro-config --static`
endif
ifneq ($(findstring gtxwc, $(HB_GT_LIBS)),)
LINKLIBS += -lX11
#LINKPATHS += -L/usr/X11R6/lib64
LINKPATHS += -L/usr/X11R6/lib
endif
# HB_GPM_MOUSE: use gpm mouse driver
# Actually, there is no gpm on BSD.
ifeq ($(HB_GPM_MOUSE),yes)
LINKLIBS += -lgpm
endif
LINKPATHS += -L/usr/local/lib
endif
ifneq ($(findstring -DHB_PCRE_REGEX, $(C_USR)),)
LINKLIBS += -lpcre
endif
ifneq ($(findstring -DHB_EXT_ZLIB, $(C_USR)),)
LINKLIBS += -lz
endif
LINKLIBS += -lm -Wl,--end-group
LDFLAGS += $(LINKPATHS)
AR = ar
ARFLAGS = $(A_USR)
AR_RULE = $(AR) $(ARFLAGS) r $(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,54 +0,0 @@
#
# $Id$
#
all : first
HB_GT_LIST=\
gtcgi \
gtpca \
gtstd \
gttrm \
ifneq ($(HB_WITHOUT_GTCRS),yes)
HB_GT_LIST += gtcrs
endif
ifeq ($(HB_COMMERCE),yes)
HB_GPM_MOUSE = no
else
ifneq ($(HB_WITHOUT_GTSLN),yes)
HB_GT_LIST += gtsln
endif
endif
ifneq ($(HB_WITHOUT_X11),yes)
HB_GT_LIST += gtxwc
endif
ifeq ($(HB_GTALLEG),yes)
HB_GT_LIST += gtalleg
endif
# verify if GT drivers exist
HB_GT_LIBS := $(foreach gt, $(HB_GT_LIST), $(if $(wildcard $(TOP)$(ROOT)source/rtl/$(gt)),$(gt),))
ifeq ($(HB_GT_LIB),)
HB_GT_LIB = gtstd
endif
MAKE = gmake
ARCH_DIR = $(HB_ARCH)
MK = $(MAKE)
RM = rm -f
RD = rm -f -r
CP = cp -f
MV = mv -f
MD = mkdir
MDP = mkdir -p
RANLIB = ranlib
dirbase::
@[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR)
@[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR)
clean::
-$(RD) $(ARCH_DIR) $(LIB_ARCH)

View File

@@ -1,20 +0,0 @@
#
# $Id$
#
INSTALL_RULE =\
@if [ ! -d $(INSTALL_DIR) ]; \
then \
echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \
else \
for i in $(INSTALL_OBJS); \
do \
if [ -r $$i ]; \
then \
echo "! Installing $$i on $(INSTALL_DIR)"; \
$(CP) $$i $(INSTALL_DIR); \
else \
echo "! Can't install $$i, not found" 1>&2; \
fi \
done \
fi

View File

@@ -1,45 +0,0 @@
#
# $Id$
#
C_OBJS = $(C_SOURCES:.c=$(OBJ_EXT)) $(CPP_SOURCES:.cpp=$(OBJ_EXT))
C_MAIN_OBJ = $(C_MAIN:.c=$(OBJ_EXT))
ifdef YACC_SOURCE
YACC_BASE = $(YACC_SOURCE:.y=)
YACC_C = $(YACC_BASE)y.c
YACC_H_TMP = $(YACC_C:.c=.h)
YACC_H = y_tab.h
YACC_OUTPUT = $(YACC_C:.c=.out)
YACC_OBJ = $(YACC_C:.c=$(OBJ_EXT))
YACC_HB_H := $(foreach h, $(YACC_HEADERS), $(HB_INC_COMPILE)/$(h))
endif
ifdef LEX_SOURCE
LEX_BASE = $(LEX_SOURCE:.l=)
LEX_C = $(LEX_BASE)l.c
LEX_OBJ = $(LEX_C:.c=$(OBJ_EXT))
LEX_HB_H := $(foreach h, $(LEX_HEADERS), $(HB_INC_COMPILE)/$(h))
endif
ALL_C_OBJS = $(YACC_OBJ) $(LEX_OBJ) $(C_OBJS) $(C_MAIN_OBJ)
$(YACC_OBJ) : $(YACC_C)
ifeq ($(HB_REBUILD_PARSER),yes)
$(YACC_C) : ../../$(YACC_SOURCE) $(YACC_HB_H)
$(YACC) $(YACC_FLAGS) -o$@ $<
else
ifeq ($(DIRSEP),)
DIRSEP = /
endif
%y.c : ../../%.yyc
$(CP) $(subst /,$(DIRSEP),$<) $@
$(CP) $(subst /,$(DIRSEP),$(<:.yyc=.yyh)) $(@:.c=.h)
endif
$(LEX_OBJ) : $(LEX_C)
$(LEX_C) : ../../$(LEX_SOURCE) $(LEX_HB_H)
$(LEX) $(LEX_FLAGS) -o$@ $<

View File

@@ -1,14 +0,0 @@
#
# $Id$
#
ifeq ($(PM),) # Only traverse directories if not compiling a specific module
DIR_RULE =\
@for d in $(DIRS); do \
if [ -d $$d ]; then \
$(MAKE) -C $$d $@; \
fi \
done
endif # ! compiling a specific program module

View File

@@ -1,112 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT =
LIB_PREF = lib
LIB_EXT = .a
# intentionally used 'cc' instead of 'gcc' - I'm not an Darwin user
# but the system where I was testing it has GCC 2.95 named 'cc'
CC = $(CCACHE) cc
CC_IN = -c
CC_OUT = -o
# -no-cpp-precomp prevents from using buggy precompiled headers
CPPFLAGS = -no-cpp-precomp -I. -I$(TOP)include -I$(HB_INC_COMPILE)
# -fno-common enables building .dylib files
CFLAGS = -fno-common -Wall -W
# It's to avoid warning message generated when 'long double' is used
# remove it if you have newer compiler version
CFLAGS += -Wno-long-double
CFLAGS += -DHB_OS_DARWIN
LD = cc
LD_OUT = -o
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
# Add all libraries specified in HB_USER_LIBS.
LINKLIBS += $(foreach lib, $(HB_USER_LIBS), -l$(lib))
LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library and other RTLs
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl
# screen driver libraries
ifeq ($(HB_CRS_LIB),)
HB_CRS_LIB=ncurses
endif
ifneq ($(findstring gtcrs, $(HB_GT_LIBS)),)
LINKLIBS += -l$(HB_CRS_LIB)
endif
ifneq ($(findstring gtsln, $(HB_GT_LIBS)),)
LINKLIBS += -lslang
# In BSD, slang still needs curses :(
ifeq ($(findstring gtcrs, $(HB_GT_LIBS)),)
LINKLIBS += -l$(HB_CRS_LIB)
endif
endif
ifneq ($(findstring gtalleg, $(HB_GT_LIBS)),)
LINKLIBS += `allegro-config --static`
endif
ifneq ($(findstring gtxwc, $(HB_GT_LIBS)),)
LINKLIBS += -lX11
#LINKPATHS += -L/usr/X11R6/lib64
LINKPATHS += -L/usr/X11R6/lib
endif
# HB_GPM_MOUSE: use gpm mouse driver
# Actually, there is no gpm on BSD.
ifeq ($(HB_GPM_MOUSE),yes)
LINKLIBS += -lgpm
endif
endif
ifneq ($(findstring -DHB_PCRE_REGEX, $(C_USR)),)
LINKLIBS += -lpcre
endif
ifneq ($(findstring -DHB_EXT_ZLIB, $(C_USR)),)
LINKLIBS += -lz
endif
LINKLIBS += -lm
LDFLAGS = $(LINKPATHS)
LD_RULE = $(LD) $(CFLAGS) $(LD_OUT) $@ $(^F) $(LDFLAGS) $(L_USR) $(LINKLIBS) $(LINKLIBS)
#AR = ar
#ARFLAGS = $(A_USR)
#AR_RULE = $(AR) $(ARFLAGS) r $@ $(^F) || $(RM) $@
LIBTOOL = libtool
LIBTOOLFLAGS = $(LIBTOOL_USR)
AR_RULE = $(LIBTOOL) -static $(LIBTOOLFLAGS) -o $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
RANLIB = ranlib
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,52 +0,0 @@
#
# $Id$
#
all : first
HB_GT_LIST=\
gtcgi \
gtpca \
gtstd \
gttrm \
ifneq ($(HB_WITHOUT_GTCRS),yes)
HB_GT_LIST += gtcrs
endif
ifeq ($(HB_COMMERCE),yes)
HB_GPM_MOUSE = no
else
ifneq ($(HB_WITHOUT_GTSLN),yes)
HB_GT_LIST += gtsln
endif
endif
ifneq ($(HB_WITHOUT_X11),yes)
HB_GT_LIST += gtxwc
endif
ifeq ($(HB_GTALLEG),yes)
HB_GT_LIST += gtalleg
endif
# verify if GT drivers exist
HB_GT_LIBS := $(foreach gt, $(HB_GT_LIST), $(if $(wildcard $(TOP)$(ROOT)source/rtl/$(gt)),$(gt),))
ifeq ($(HB_GT_LIB),)
HB_GT_LIB = gtstd
endif
ARCH_DIR = $(HB_ARCH)
MK = $(MAKE)
RM = rm -f
RD = rm -f -r
CP = cp -f
MV = mv -f
MD = mkdir
MDP = mkdir -p
RANLIB = ranlib
dirbase::
@[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR)
@[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR)
clean::
-$(RD) $(ARCH_DIR) $(LIB_ARCH)

View File

@@ -1,24 +0,0 @@
#
# $Id$
#
INSTALL_RULE =\
@if [ ! -d $(INSTALL_DIR) ]; \
then \
echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \
else \
for i in $(INSTALL_OBJS); \
do \
if [ -r $$i ]; \
then \
echo "! Installing $$i on $(INSTALL_DIR)"; \
$(CP) $$i $(INSTALL_DIR); \
else \
echo "! Can't install $$i, not found" 1>&2; \
fi \
done; \
if [ $(INSTALL_DIR) = $(HB_LIB_INSTALL) ]; \
then \
$(RANLIB) $(foreach file,$(notdir $(INSTALL_OBJS)),$(INSTALL_DIR)/$(file)); \
fi \
fi

View File

@@ -1,22 +0,0 @@
#
# $Id$
#
ifneq ($(HB_ARCHITECTURE),)
ifneq ($(HB_COMPILER),)
include $(TOP)$(ROOT)config/global.cf
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/dir.cf
all : first
first clean install::
$(DIR_RULE)
ifneq ($(HB_POSTINST),)
install::
$(HB_POSTINST)
endif
endif
endif

View File

@@ -1,22 +0,0 @@
#
# $Id$
#
ifneq ($(HB_ARCHITECTURE),)
ifneq ($(HB_COMPILER),)
include $(TOP)$(ROOT)config/global.cf
first::
ifeq ($(HB_DOC_INSTALL),)
install::
else
INSTALL_OBJS = $(DOC_FILES)
INSTALL_DIR = $(HB_DOC_INSTALL)$(DOC_SUBDIR)
include $(TOP)$(ROOT)config/install.cf
endif
endif
endif

View File

@@ -1,92 +0,0 @@
#
# $Id$
#
# The Harbour Project
# GNU MAKE file for Borland C/C++ 3.x, 4.x, 5.0x
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
$(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP = $(subst /,\\,$(GRANDP))
_HB_INC_COMPILE = $(subst /,\\,$(HB_INC_COMPILE))
_HL = $(notdir $(HB_LIB_COMPILE))
ifeq ($(_HL),)
#there is an ending slash
_HB_LIB_COMPILE = $(subst /,\\,$(HB_LIB_COMPILE))
else
_HB_LIB_COMPILE = $(subst /,\\,$(HB_LIB_COMPILE)/)
endif
CC = bcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I$($(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP) -I$(_HB_INC_COMPILE)
CFLAGS = -i48 -O2 -mh -d -DHB_LONG_LONG_OFF
# BCC (at least version 3.1) requires that the output file be listed ahead of the input file
CC_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_OUT)$(?F:.c=$(OBJ_EXT)) $(CC_IN) $?
#Note: The empty line below HAVE TO exist!
define link_file
echo. $(file) >> __link__.tmp
endef
define link_exe_file
echo. $(LDFLAGS) -e$@ > __link__.tmp
$(foreach file, $(^F), $(link_file))
$(foreach file, $(LINKLIBS), $(link_file))
-$(LD) @__link__.tmp
endef
LD = bcc
LDFLAGS = -i48 -O2 -mh $(L_USR)
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS += $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib)$(LIB_EXT))
LINKLIBS += $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib)$(LIB_EXT))
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach lib, $(HB_DB_DRIVERS), $(LIB_DIR)$(lib)$(LIB_EXT))
endif
else
LINKLIBS += $(foreach lib, $(CONTRIBS), $(subst lib,,$(lib))$(LIB_EXT))
LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT))
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach lib, $(HB_DB_DRIVERS), $(lib)$(LIB_EXT))
endif
endif
LD_RULE = $(link_exe_file)
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)$(LIB_EXT))
else
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT))
endif
endif
#Note: The empty line below HAVE TO exist!
define lib_object
echo. -+$(file) &>> __lib__.tmp
endef
define create_library
echo. $(LIB_DIR)/$@ &> __lib__.tmp
$(foreach file, $(^F), $(lib_object))
echo. ,, >> __lib__.tmp
$(AR) $(ARFLAGS) @__lib__.tmp
del __lib__.tmp
endef
AR = tlib
ARFLAGS = /C $(A_USR)
AR_RULE = $(create_library)
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,40 +0,0 @@
#
# $Id$
#
ifeq ($(PM),) # Only traverse directories if not compiling a specific module
ifeq ($(DIRS),) # Empty directory list
DIR_RULE = @echo Done
else
ifeq ($(SHLVL),) # COMMAND.COM
# We have to use script to overcome the DOS limit of max 128 characters
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every commands will be separated by LF
define dir_mk
$(DIR_MAKE) -C $(file) $@
endef
DIR_LIST := $(subst /,\,$(DIRS))
DIR_MAKE := $(subst /,\,$(MK))
DIR_RULE = $(foreach file, $(DIR_LIST), $(dir_mk))
else # bash
DIR_LIST = $(subst \,/,$(DIRS))
DIR_RULE =\
for d in $(DIR_LIST); do \
if [ -d $$d ]; then \
$(MAKE) -C $$d $@; \
fi \
done
endif # ! COMMAND.COM
endif # ! Empty directory list
endif # ! compiling a specific program module

View File

@@ -1,84 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT = .exe
LIB_PREF = lib
LIB_EXT = .a
CC = gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(TOP)include -Iinclude
ifneq ($(HB_INC_COMPILE),)
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
endif
CFLAGS = -Wall -W
LD = gcc
LD_OUT = -o
LDLIBS = -lm
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library and other RTLs
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt))
endif
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every echo command will be separated by LF
define lib_object
echo. ADDMOD $(file) >> __lib__.tmp
endef
# We have to use script to overcome the DOS limit of max 128 characters
# in commmand line
define create_library
echo. CREATE $(LIB_DIR)/$@ > __lib__.tmp
$(foreach file, $(^F), $(lib_object))
echo. SAVE >> __lib__.tmp
echo. END >> __lib__.tmp
$(AR) $(ARFLAGS) -M < __lib__.tmp
endef
# NOTE: The empty line below HAVE TO exist!
define link_file
echo. $(file) >> __link__.tmp
endef
define link_exe_file
echo. $(LDFLAGS) $(L_USR) $(LD_OUT)$@ > __link__.tmp
$(foreach file, $(^F), $(link_file))
$(foreach file, $(LINKPATHS), $(link_file))
echo. -Wl,--start-group >> __link__.tmp
$(foreach file, $(LINKLIBS), $(link_file))
echo. -Wl,--end-group >> __link__.tmp
echo. $(LDLIBS) >> __link__.tmp
-$(LD) @__link__.tmp
endef
AR = ar
ARFLAGS = $(A_USR)
AR_RULE = $(create_library)
LD_RULE = $(link_exe_file)
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,111 +0,0 @@
#
# $Id$
#
ifndef MK
all : first
HB_GT_LIST=\
gtcgi \
gtpca \
gtstd \
gtdos \
# gtcrs \
# gtsln \
ifeq ($(HB_GTALLEG),yes)
HB_GT_LIST += gtalleg
endif
# verify if GT drivers exist
#HB_GT_LIBS := $(foreach gt, $(HB_GT_LIST), $(if $(wildcard $(TOP)$(ROOT)source/rtl/$(gt)),$(gt),))
HB_GT_LIBS := $(HB_GT_LIST)
ifeq ($(HB_GT_LIB),)
HB_GT_LIB = gtdos
endif
ifeq ($(SHLVL),) # COMMAND.COM
# There is a conflict with the use of '\' and '/' characters
# The MAKE requires '/' in filenames (ARCH_DIR) however some compilers
# and some DOS commands require '\' (ARCH_DOS)
ARCH_DIR = $(subst \,/,$(HB_ARCH))
ARCH_DOS = $(subst /,\,$(HB_ARCH))
LIB_DIR_DOS = $(subst /,\,$(LIB_DIR))
LIB_PATH_DOS = $(subst /,\,$(LIB_PATH))
LIB_ARCH_DOS = $(subst /,\,$(LIB_ARCH))
DIRSEP = $(subst /,\,\)
MK := $(subst \,/,$(subst \~,~,$(MAKE)))
ifeq ($(COMSPEC),) #location of command.com
COMSPEC := command.com
else
ifeq ($(HB_COMPILER),bcc16)
#Use standard dos path, which is already set up.
else
ifeq ($(HB_COMPILER),rsx32)
#Use standard dos path, which is already set up.
else
ifneq ($(findstring watcom,$(HB_COMPILER)),)
#Use standard dos path, which is already set up.
else
ifeq ($(HB_COMPILER),djgpp)
#Use standard dos path, which is already set up.
else
ifeq ($(HB_COMPILER),emx)
#Use standard dos path, which is already set up.
else
COMSPEC := $(subst \,/,$(COMSPEC))
endif
endif
endif
endif
endif
endif
RM = del
RD = rmdir
CP = $(COMSPEC) /Ccopy
MV = move
MD = md
#this will be used only under DJGPP
RANLIB = ranlib
dirbase::
-@$(COMSPEC) /Cfor %d in ($(HB_ARCHITECTURE) $(ARCH_DOS)) do if not exist %d\nul $(MD) %d
$(if $(LIB_PATH_DOS),-@$(COMSPEC) /Cfor %d in ($(LIB_PATH_DOS) $(LIB_DIR_DOS)) do if not exist %d\nul $(MD) %d,)
clean::
-@$(COMSPEC) /Cfor %f in ($(ARCH_DOS)\*.* *.bak *.obj *.o *.tds) do $(RM) %f
-@$(COMSPEC) /Cfor %d in ($(ARCH_DOS) $(HB_ARCHITECTURE)) do if exist %d\nul $(RD) %d
$(if $(LIB_ARCH_DOS),-@$(COMSPEC) /Cif exist $(LIB_ARCH_DOS) $(RM) $(LIB_ARCH_DOS),)
else # bash
ARCH_DIR = $(HB_ARCH)
MK = $(MAKE)
RM = rm -f
RD = rm -f -r
CP = cp -f
MV = mv -f
MD = mkdir
MDP = mkdir -p
#this will be used only under MINGW
RANLIB = ranlib
dirbase::
@[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR)
@[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR)
clean::
-$(RD) $(ARCH_DIR) $(LIB_ARCH)
endif
endif

View File

@@ -1,47 +0,0 @@
#
# $Id$
#
ifeq ($(INSTALL_OBJS),) # Empty install list
INSTALL_RULE = @echo Done
else
ifeq ($(SHLVL),) # COMMAND.COM
# We have to use script to overcome the DOS limit of max 128 characters
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every commands will be separated by LF
define inst_file
$(CP) $(file) $(subst /,\,$(INSTALL_DIR))
endef
INSTALL_LIST = $(subst /,\,$(INSTALL_OBJS))
INSTALL_RULE = $(foreach file, $(INSTALL_LIST), $(inst_file))
else # bash
INSTALL_DIRSH = $(subst \,/,$(INSTALL_DIR))
INSTALL_OBJSH = $(subst \,/,$(INSTALL_OBJS))
INSTALL_RULE =\
@if [ ! -d $(INSTALL_DIRSH) ]; \
then \
echo "! Can't install, path not found: $(INSTALL_DIRSH)" 1>&2; \
else \
for i in $(INSTALL_OBJSH); \
do \
if [ -r $$i ]; \
then \
echo "! Installing $$i on $(INSTALL_DIRSH)"; \
$(CP) $$i $(INSTALL_DIRSH); \
else \
echo "! Can't install $$i, not found" 1>&2; \
fi \
done \
fi
endif
endif

View File

@@ -1,115 +0,0 @@
#
# $Id$
#
# The Harbour project
# GNU MAKE file for OpenWatcom
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
$(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP = $(subst /,\,$(GRANDP))
CC = wpp386
CC_IN =
CC_OUT = -fo=
#CPPFLAGS = -j -w3 -d1 -5s -5r -fp5 -oehtz -s -zq -zt0 -bt=DOS
CPPFLAGS = -w2 -d1 -zq -bt=DOS
#architecture flags
CPPFLAGS += -5 -fp5
# optimization flags
# don't enable -ol optimization in OpenWatcom 1.1 - gives buggy code
CPPFLAGS += -onaehtzr -oi+ -ei -zp8 -s -zt0
CPPFLAGS += -i. -i$(TOP)include -i$(TOP)$(ROOT)include -iinclude
ifneq ($(HB_LIB_COMPILE),)
CPPFLAGS += -i$(HB_INC_COMPILE)
endif
# work arround to DOS command line size limit
export WPP386 := $(strip $(CPPFLAGS))
CPPFLAGS =
# Note: The empty line directly before 'endef' HAVE TO exist!
# It causes that the 'echo' command is separated by LF
define link_file
echo. FILE $(file) >> __link__.tmp
endef
#Note: The empty line directly before 'endef' HAVE TO exist!
define link_lib
echo. LIB $(lib) >> __link__.tmp
endef
define link_exe_file
echo. $(LDFLAGS) NAME $@ > __link__.tmp
$(foreach file, $(^F), $(link_file))
$(foreach lib, $(HB_USER_LIBS), $(link_lib))
$(foreach lib, $(subst /,\,$(LINKLIBS)), $(link_lib))
$(foreach lib, $(subst /,\,$(RDDLIBS)), $(link_lib))
$(foreach lib, $(subst /,\,$(GTLIBS)), $(link_lib))
-$(LD) @__link__.tmp
endef
LD = wlink
LDFLAGS = debug all OP osn=DOS OP stack=65536 OP CASEEXACT OP stub=cwstub.exe
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS = $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib))
LINKLIBS += $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib))
else
LINKLIBS = $(foreach lib, $(CONTRIBS), $(HB_LIB_COMPILE)/$(lib))
LINKLIBS += $(foreach lib, $(LIBS), $(HB_LIB_COMPILE)/$(lib))
endif
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
ifeq ($(HB_LIB_COMPILE),)
RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv))
else
RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv))
endif
endif
ifeq ($(findstring rtl,$(LIBS)),rtl)
ifeq ($(HB_LIB_COMPILE),)
GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt))
else
GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(HB_LIB_COMPILE)/$(gt))
endif
endif
LD_RULE = $(link_exe_file)
#Note: The empty line below HAVE TO exist!
define lib_object
echo. -+$(file) >> __lib__.tmp
endef
define create_library
echo. $(subst /,\,$(LIB_DIR))\$@ > __lib__.tmp
$(foreach file, $(^F), $(lib_object))
$(AR) $(ARFLAGS) @__lib__.tmp
endef
AR = wlib
ARFLAGS = -p=32 -c -n $(A_USR)
AR_RULE = $(create_library)
include $(TOP)$(ROOT)config/rules.cf
HB := $(subst /,\,$(HB))
HB_FLAGS := $(subst /,\,$(HB_FLAGS))
# work arround to DOS command line size limit
export HARBOURCMD := $(HB_FLAGS)
HB_FLAGS =

View File

@@ -1,59 +0,0 @@
#
# $Id$
#
# GNU Make file for RSXNT for DOS target
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .a
CC = gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE) -Zrsx32
CFLAGS = -Wall
LD = gcc
LDFLAGS = -Zrsx32
# Note the space after -o
LD_OUT = -o
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
# The -( option could be appropriate to link against libraries with
# cyclic dependencies, but I think it is not really necessary if the
# libraries are kept in proper order.
# LINKLIBS += -Wl,-(
LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library and other RTLs
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl
endif
# The -) option could be appropriate to link against libraries with
# cyclic dependencies, but I think it is not really necessary if the
# libraries are kept in proper order.
# LINKLIBS += -Wl,-)
LDFLAGS += $(LINKPATHS)
AR = ar
ARFLAGS = $(A_USR)
AR_RULE = $(AR) $(ARFLAGS) r $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,83 +0,0 @@
#
# $Id$
#
# The Harbour project
# GNU MAKE file for Watcom C/C++ 10.x
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
$(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP = $(subst /,\\,$(GRANDP))
CC = wpp386
CC_IN =
CC_OUT = -fo=
CPPFLAGS = -d2 -w2 -5r -zq -zt0 -bt=DOS4G
CFLAGS := -i$(subst \,\\,$(WATCOM))\\h -i$(subst /,\\,$(HB_INC_COMPILE)) -i.
# Note: The empty line directly before 'endef' HAVE TO exist!
# It causes that the 'echo' command is separated by LF
define link_file
$(COMSPEC) /E:2048 /Cecho FILE $(file) >> __link__.tmp
endef
#Note: The empty line directly before 'endef' HAVE TO exist!
define link_lib
$(COMSPEC) /E:2048 /Cecho LIB $(lib) >> __link__.tmp
endef
define link_exe_file
$(COMSPEC) /E:2048 /Cecho $(LDFLAGS) NAME $@ > __link__.tmp
$(foreach file, $(^F), $(link_file))
$(foreach lib, $(LINKLIBS), $(link_lib))
$(foreach lib, $(RDDLIBS), $(link_lib))
$(foreach lib, $(GTLIBS), $(link_lib))
-$(LD) @__link__.tmp
endef
LD = wlink
LDFLAGS = debug all OP osn=DOS4G OP stack=65536 OP CASEEXACT
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS := $(foreach lib, $(CONTRIBS), $(subst /,\,$(LIB_DIR)/$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), $(subst /,\,$(LIB_DIR)/$(lib)))
else
LINKLIBS := $(foreach lib, $(CONTRIBS), $(subst /,\,$(HB_LIB_COMPILE)/$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), $(subst /,\,$(HB_LIB_COMPILE)/$(lib)))
endif
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
RDDLIBS := $(foreach drv, $(HB_DB_DRIVERS), $(subst /,\,$(LIB_DIR)/$(drv)))
endif
GTLIBS := $(foreach gt, $(HB_GT_LIBS), $(subst /,\,$(LIB_DIR)/$(gt)))
LD_RULE = $(link_exe_file)
#Note: The empty line below HAVE TO exist!
define lib_object
$(COMSPEC) /E:2048 /Cecho -+$(file) >> __lib__.tmp
endef
LIB_DDIR := $(subst /,\,$(LIB_DIR))
define create_library
$(COMSPEC) /E:2048 /Cecho $(LIB_DDIR)\$@ > __lib__.tmp
$(foreach file, $(^F), $(lib_object))
$(AR) $(ARFLAGS) @__lib__.tmp
endef
AR = wlib
ARFLAGS = -p=32 -c $(A_USR)
AR_RULE = $(create_library)
include $(TOP)$(ROOT)config/rules.cf
HB := $(subst /,\\,$(HB))

View File

@@ -1,44 +0,0 @@
#
# $Id$
#
GRANDP = ../../
HB_ARCH := $(HB_ARCHITECTURE)/$(HB_COMPILER)
#names of valid RDD libraries
HB_DB_DRIVERS=\
rddntx \
rddcdx \
rddfpt \
hbsix \
hbhsx \
hbusrrdd \
#names of valid RDD subdirectories
HB_DB_DIRS=\
dbfntx \
dbfcdx \
dbffpt \
hbsix \
hsx \
usrrdd \
ifneq ($(HB_DB_DRVEXT),)
HB_DB_DRIVERS += $(HB_DB_DRVEXT)
HB_DB_DIRS += $(HB_DB_DRVEXT)
endif
ifeq ($(HB_BIN_COMPILE),)
HB_BIN_COMPILE := $(TOP)$(ROOT)source/main/$(HB_ARCH)
endif
ifeq ($(HB_INC_COMPILE),)
HB_INC_COMPILE := $(TOP)$(ROOT)include
endif
ifeq ($(HB_LIB_COMPILE),)
HB_LIB_COMPILE :=
endif
include $(TOP)$(ROOT)config/$(HB_ARCH).cf

View File

@@ -1,24 +0,0 @@
#
# $Id$
#
ifneq ($(HB_ARCHITECTURE),)
ifneq ($(HB_COMPILER),)
include $(TOP)$(ROOT)config/global.cf
ALL_HEADERS = $(C_HEADERS) $(PRG_HEADERS) $(API_HEADERS)
first::
ifeq ($(HB_INC_INSTALL),)
install::
else
INSTALL_OBJS = $(ALL_HEADERS)
INSTALL_DIR = $(HB_INC_INSTALL)
include $(TOP)$(ROOT)config/install.cf
endif
endif
endif

View File

@@ -1,14 +0,0 @@
#
# $Id$
#
ifeq ($(PM),) # Only traverse directories if not compiling a specific module
DIR_RULE =\
@for d in $(DIRS); do \
if [ -d $$d ]; then \
$(MAKE) -C $$d $@; \
fi \
done
endif # ! compiling a specific program module

View File

@@ -1,92 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT =
LIB_PREF = lib
LIB_EXT = .a
CC = $(HB_CCACHE) gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
CFLAGS = -DHB_OS_HPUX -Wall -W
LDFLAGS =
# uncomment this if you want to farce relocateable code for .so libs
# it's necessary on some platforms but can reduce performance
#CFLAGS += -fPIC
# uncomment this if you want to force creating 64bit binaries on IA64
#CFLAGS += -mlp64
#LDFLAGS = -mlp64
LD = $(HB_CCACHE) gcc
LD_OUT = -o
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl
# screen driver libraries
ifeq ($(HB_CRS_LIB),)
HB_CRS_LIB=ncurses
endif
ifneq ($(findstring gtcrs, $(HB_GT_LIBS)),)
LINKLIBS += -l$(HB_CRS_LIB)
endif
ifneq ($(findstring gtsln, $(HB_GT_LIBS)),)
LINKLIBS += -lslang
endif
ifneq ($(findstring gtalleg, $(HB_GT_LIBS)),)
LINKLIBS += `allegro-config --static`
endif
ifneq ($(findstring gtxwc, $(HB_GT_LIBS)),)
LINKLIBS += -lX11
#LINKPATHS += -L/usr/X11R6/lib64
LINKPATHS += -L/usr/X11R6/lib
endif
# HB_GPM_MOUSE: use gpm mouse driver
ifeq ($(HB_GPM_MOUSE),yes)
LINKLIBS += -lgpm
endif
endif
ifneq ($(findstring -DHB_PCRE_REGEX, $(C_USR)),)
LINKLIBS += -lpcre
endif
ifneq ($(findstring -DHB_EXT_ZLIB, $(C_USR)),)
LINKLIBS += -lz
endif
LINKLIBS += -lm -lrt
LDFLAGS += $(LINKPATHS)
AR = ar
ARFLAGS = $(A_USR)
AR_RULE = $(AR) $(ARFLAGS) cr $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,51 +0,0 @@
#
# $Id$
#
all : first
HB_GT_LIST=\
gtcgi \
gtpca \
gtstd \
gttrm \
ifneq ($(HB_WITHOUT_GTCRS),yes)
HB_GT_LIST += gtcrs
endif
ifeq ($(HB_COMMERCE),yes)
HB_GPM_MOUSE = no
else
ifneq ($(HB_WITHOUT_GTSLN),yes)
HB_GT_LIST += gtsln
endif
endif
ifneq ($(HB_WITHOUT_X11),yes)
# HB_GT_LIST += gtxwc
endif
ifeq ($(HB_GTALLEG),yes)
HB_GT_LIST += gtalleg
endif
# verify if GT drivers exist
HB_GT_LIBS := $(foreach gt, $(HB_GT_LIST), $(if $(wildcard $(TOP)$(ROOT)source/rtl/$(gt)),$(gt),))
ifeq ($(HB_GT_LIB),)
HB_GT_LIB = gtstd
endif
ARCH_DIR = $(HB_ARCH)
MK = $(MAKE)
RM = rm -f
RD = rm -f -r
CP = cp -f
MV = mv -f
MD = mkdir
MDP = mkdir -p
dirbase::
@[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR)
@[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR)
clean::
-$(RD) $(ARCH_DIR) $(LIB_ARCH)

View File

@@ -1,20 +0,0 @@
#
# $Id$
#
INSTALL_RULE =\
@if [ ! -d $(INSTALL_DIR) ]; \
then \
echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \
else \
for i in $(INSTALL_OBJS); \
do \
if [ -r $$i ]; \
then \
echo "! Installing $$i on $(INSTALL_DIR)"; \
$(CP) $$i $(INSTALL_DIR); \
else \
echo "! Can't install $$i, not found" 1>&2; \
fi \
done \
fi

View File

@@ -1,8 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/install.cf
install:: first
$(INSTALL_RULE)

View File

@@ -1,39 +0,0 @@
#
# $Id$
#
ifneq ($(HB_ARCHITECTURE),)
ifneq ($(HB_COMPILER),)
#no slash at the end
LIB_PATH := $(TOP)$(ROOT)lib/$(HB_ARCHITECTURE)
#no slash at the end
LIB_DIR := $(LIB_PATH)/$(HB_COMPILER)
include $(TOP)$(ROOT)config/global.cf
include $(TOP)$(ROOT)config/c.cf
include $(TOP)$(ROOT)config/prg.cf
LIB_NAME := $(LIB_PREF)$(LIBNAME)$(LIB_EXT)
LIB_ARCH := $(LIB_DIR)/$(LIB_NAME)
ALL_OBJS = $(ALL_C_OBJS) $(ALL_PRG_OBJS)
first:: dirbase descend
descend :
@$(MK) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(LIB_NAME)
vpath $(LIB_NAME) $(LIB_DIR)
$(LIB_NAME) : $(ALL_OBJS)
$(AR_RULE)
INSTALL_OBJS = $(LIB_ARCH)
INSTALL_DIR = $(HB_LIB_INSTALL)
include $(TOP)$(ROOT)config/install.cf
endif
endif

View File

@@ -1,14 +0,0 @@
#
# $Id$
#
ifeq ($(PM),) # Only traverse directories if not compiling a specific module
DIR_RULE =\
@for d in $(DIRS); do \
if [ -d $$d ]; then \
$(MAKE) -C $$d $@; \
fi \
done
endif # ! compiling a specific program module

View File

@@ -1,99 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
ifeq ($(HB_COMPILER),gpp)
HB_CMP = g++
else
HB_CMP = $(HB_COMPILER)
endif
OBJ_EXT = .o
EXE_EXT =
LIB_PREF = lib
LIB_EXT = .a
CC = $(HB_CCACHE) $(HB_CMP)
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
# We are under linux
CFLAGS = -DHB_OS_LINUX -Wall -W
# uncomment this if you want to force relocateable code for .so libs
# it's necessary on some platforms but can reduce performance
#CFLAGS += -fPIC
LD = $(HB_CCACHE) $(HB_CMP)
LD_OUT = -o
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
# our libs have a lot of cross referenced now and we have to group them
# untill we don't clean them
LINKLIBS += -Wl,--start-group
LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library and other RTLs
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt))
# screen driver libraries
ifeq ($(HB_CRS_LIB),)
HB_CRS_LIB=ncurses
endif
ifneq ($(findstring gtcrs, $(HB_GT_LIBS)),)
LINKLIBS += -l$(HB_CRS_LIB)
endif
ifneq ($(findstring gtsln, $(HB_GT_LIBS)),)
LINKLIBS += -lslang
endif
ifneq ($(findstring gtalleg, $(HB_GT_LIBS)),)
LINKLIBS += `allegro-config --static`
endif
ifneq ($(findstring gtxwc, $(HB_GT_LIBS)),)
LINKLIBS += -lX11
#LINKPATHS += -L/usr/X11R6/lib64
LINKPATHS += -L/usr/X11R6/lib
endif
# HB_GPM_MOUSE: use gpm mouse driver
ifeq ($(HB_GPM_MOUSE),yes)
LINKLIBS += -lgpm
endif
endif
ifneq ($(findstring -DHB_PCRE_REGEX, $(C_USR)),)
LINKLIBS += -lpcre
endif
ifneq ($(findstring -DHB_EXT_ZLIB, $(C_USR)),)
LINKLIBS += -lz
endif
LINKLIBS += -lm -ldl -Wl,--end-group
LDFLAGS = $(LINKPATHS)
AR = ar
ARFLAGS = $(A_USR)
AR_RULE = $(AR) $(ARFLAGS) cr $(LIB_DIR)/$@ $(^F) && $(RANLIB) $(LIB_DIR)/$@ || ( $(RM) $(LIB_DIR)/$@ && false )
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,52 +0,0 @@
#
# $Id$
#
all : first
HB_GT_LIST=\
gtcgi \
gtpca \
gtstd \
gttrm \
ifneq ($(HB_WITHOUT_GTCRS),yes)
HB_GT_LIST += gtcrs
endif
ifeq ($(HB_COMMERCE),yes)
HB_GPM_MOUSE = no
else
ifneq ($(HB_WITHOUT_GTSLN),yes)
HB_GT_LIST += gtsln
endif
endif
ifneq ($(HB_WITHOUT_X11),yes)
HB_GT_LIST += gtxwc
endif
ifeq ($(HB_GTALLEG),yes)
HB_GT_LIST += gtalleg
endif
# verify if GT drivers exist
HB_GT_LIBS := $(foreach gt, $(HB_GT_LIST), $(if $(wildcard $(TOP)$(ROOT)source/rtl/$(gt)),$(gt),))
ifeq ($(HB_GT_LIB),)
HB_GT_LIB = gtstd
endif
ARCH_DIR = $(HB_ARCH)
MK = $(MAKE)
RM = rm -f
RD = rm -f -r
CP = cp -f
MV = mv -f
MD = mkdir
MDP = mkdir -p
RANLIB = ranlib
dirbase::
@[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR)
@[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR)
clean::
-$(RD) $(ARCH_DIR) $(LIB_ARCH)

View File

@@ -1,5 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/gcc.cf

View File

@@ -1,20 +0,0 @@
#
# $Id$
#
INSTALL_RULE =\
@if [ ! -d $(INSTALL_DIR) ]; \
then \
echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \
else \
for i in $(INSTALL_OBJS); \
do \
if [ -r $$i ]; \
then \
echo "! Installing $$i on $(INSTALL_DIR)"; \
$(CP) $$i $(INSTALL_DIR); \
else \
echo "! Can't install $$i, not found" 1>&2; \
fi \
done \
fi

View File

@@ -1,77 +0,0 @@
#
# $Id$
#
# The Harbour project
# GNU MAKE file for OpenWatcom C/C++
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT =
LIB_PREF =
LIB_EXT = .lib
CC = wpp386
CC_IN =
CC_OUT = -fo=
#CPPFLAGS = -j -w3 -d1 -5s -5r -fp5 -oehtz -s -zq -zt0 -bt=linux
CPPFLAGS = -w2 -d1 -zq -bt=linux
#architecture flags
CPPFLAGS += -5 -fp5
# optimization flags
# don't enable -ol optimization in OpenWatcom 1.1 - gives buggy code
CPPFLAGS += -onaehtzr -oi+ -ei -zp8 -s -zt0
CPPFLAGS += -i. -i$(TOP)include -i$(TOP)$(ROOT)include -iinclude
ifneq ($(HB_LIB_COMPILE),)
CPPFLAGS += -i$(HB_INC_COMPILE)
endif
empty:=
space:= $(empty) $(empty)
comma:= ,
LD = wlink
LDFLAGS = debug all sys Linux OP CASEEXACT
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS = $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib))
LINKLIBS += $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib))
else
LINKLIBS = $(foreach lib, $(CONTRIBS), $(HB_LIB_COMPILE)/$(lib))
LINKLIBS += $(foreach lib, $(LIBS), $(HB_LIB_COMPILE)/$(lib))
endif
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
ifeq ($(HB_LIB_COMPILE),)
RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv))
else
RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv))
endif
endif
ifeq ($(findstring rtl,$(LIBS)),rtl)
ifeq ($(HB_LIB_COMPILE),)
GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt))
else
GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(HB_LIB_COMPILE)/$(gt))
endif
endif
LDFILES = $(subst $(space),$(comma) ,$(^F))
LDLIBS = $(subst $(space),$(comma) ,$(strip $(LINKLIBS) $(RDDLIBS) $(GTLIBS)))
LD_RULE = $(LD) $(LDFLAGS) NAME $@ FILE $(LDFILES)
ifneq ($(LDLIBS),)
LD_RULE += LIB $(LDLIBS)
endif
AR = wlib
# ARFLAGS = -c -n -fa $(A_USR)
ARFLAGS = -c -n $(A_USR)
AR_RULE = $(AR) $(ARFLAGS) $(LIB_DIR)/$@ $(foreach file, $(^F), -+$(file))
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,29 +0,0 @@
#
# $Id$
#
ifeq ($(PM),) # Only traverse directories if not compiling a specific module
ifeq ($(SHLVL),) # An OS/2 command shell
ifeq ($(DIRS),) # Empty directory list
DIR_RULE =\
@echo Done
else
DIR_MAKE = $(subst /,\,$(MK))
DIR_LIST = $(subst /,\,$(DIRS))
DIR_RULE = CMD.EXE /C FOR %d IN ($(DIR_LIST)) DO $(DIR_MAKE) -C %d $@
endif
else # bash
DIR_RULE =\
@for d in $(DIRS); do \
if [ -d $$d ]; then \
$(MAKE) -C $$d $@; \
fi \
done
endif # ! Windows
endif # ! compiling a specific program module

View File

@@ -1,102 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .a
CC = gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(TOP)include -I$(HB_INC_COMPILE)
CFLAGS = -W -Wall -DHB_OS_OS2 -O2
# 26/03/2004 - <maurilio.longo@libero.it>
# added -DTCPV40HDRS to compile with GCC 3.2.2 on OS/2 v4.0 with mixed 16/32 bit tcp/ip stack
# to be removed if compiled on a tcp/ip stack >= 4.1 (eComStation, for example)
# disabled, if you need it please use: C_USR=-DTCPV40HDRS
# CFLAGS += -DTCPV40HDRS
LD = gcc
LDFLAGS =
LD_OUT = -o $(SPACE)
ifeq ($(C_MAIN),)
ifeq ($(HB_GT_LIB),os2pm)
# If building a PM program, override the main object.
LDFLAGS +=$(TOP)$(ROOT)source/vm/$(HB_ARCH)/mainpm.o
endif
endif
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
#LINKLIBS += -Wl,-(
LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
ifeq ($(C_MAIN),)
ifeq ($(findstring os2pm,$(HB_GT_LIB)),os2pm)
# Special handling for PM mode
LINKLIBS += -l$(HB_GT_LIB)
LINKLIBS += -lgtos2
else
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl
endif
endif
endif
# add socket library
LINKLIBS += -lsocket
#LINKLIBS += -Wl,-)
# statical linking with GCC 3.2.2 libc as not require its presence on user system
LDFLAGS += $(LINKPATHS)
ifeq ($(C_MAIN),)
ifeq ($(HB_GT_LIB),os2pm)
# Override the default link rule in order to add a call to emxbind
LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$@ $(^F) $(LDFLAGS) $(L_USR) $(LINKLIBS) & emxbind -ep $@
endif
endif
# Note: The empty line directly before 'endef' HAVE TO exist!
# It causes that every echo command will be separated by LF
define lib_object
echo ADDMOD $(file) >> __lib__.tmp
endef
# We have to use a script to overcome the AR limit of max 850 characters
# in commmand line
define create_library
IF EXIST $(OS2_LIB_ARCH) $(RM) $(OS2_LIB_ARCH)
echo CREATE $(LIB_DIR)/$@ > __lib__.tmp
$(foreach file, $(^F), $(lib_object))
echo SAVE >> __lib__.tmp
echo END >> __lib__.tmp
$(AR) -M < __lib__.tmp
endef
# Under OS/2 || isn't a command separator (inside a shell, that is); correct separator is &
AR = ar
ARFLAGS = $(A_USR)
AR_RULE = $(create_library) & $(RM) __lib__.tmp
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,87 +0,0 @@
#
# $Id$
#
all : first
HB_GT_LIST=\
gtcgi \
gtos2 \
gtpca \
gtstd \
# verify if GT drivers exist
#HB_GT_LIBS := $(foreach gt, $(HB_GT_LIST), $(if $(wildcard $(TOP)$(ROOT)source/rtl/$(gt)),$(gt),))
# temporary workaround for some possible problems with some GNU make versions
HB_GT_LIBS := $(HB_GT_LIST)
ifeq ($(HB_GT_LIB),)
HB_GT_LIB = gtos2
endif
ifeq ($(SHLVL),) # An OS/2 command shell
ARCH_DIR = $(HB_ARCH)
OS2_ARCH_DIR = $(subst /,\,$(HB_ARCH))
OS2_LIB_DIR = $(subst /,\,$(LIB_DIR))
OS2_LIB_PATH = $(subst /,\,$(LIB_PATH))
OS2_LIB_ARCH = $(subst /,\\,$(LIB_ARCH))
DIRSEP = $(subst /,\,\)
MK = $(subst /,\,$(subst \~,~,$(MAKE)))
ifeq ($(OS2_SHELL),)
# Not running on OS/2 (which comes in handy for 'make -r clean')
RM = del /q
else
# Running on OS/2
RM = del /n
endif
RD = rmdir
CP = copy
MV = move
MD = md
ifeq ($(LIB_PATH),)
dirbase::
-CMD.EXE /C FOR %d IN ($(HB_ARCHITECTURE) $(OS2_ARCH_DIR)) DO IF NOT EXIST %d $(MD) %d
clean::
-CMD.EXE /C IF EXIST $(OS2_ARCH_DIR)\*.* $(RM) $(OS2_ARCH_DIR)\\*.*
-CMD.EXE /C FOR %d IN ($(OS2_ARCH_DIR) $(HB_ARCHITECTURE)) DO IF EXIST %d $(RD) %d
else
dirbase::
-CMD.EXE /C FOR %d IN ($(HB_ARCHITECTURE) $(OS2_ARCH_DIR) $(OS2_LIB_PATH) $(OS2_LIB_DIR)) DO IF NOT EXIST %d $(MD) %d
clean::
-CMD.EXE /C IF EXIST $(OS2_ARCH_DIR)\*.* $(RM) $(OS2_ARCH_DIR)\\*.*
-CMD.EXE /C FOR %d IN ($(OS2_ARCH_DIR) $(HB_ARCHITECTURE)) DO IF EXIST %d $(RD) %d
-CMD.EXE /C IF EXIST $(OS2_LIB_ARCH) $(RM) $(OS2_LIB_ARCH)
endif
else # bash
ARCH_DIR = $(HB_ARCH)
MK = $(MAKE)
RM = rm -f
RD = rm -f -r
CP = cp -f
MV = mv -f
MD = mkdir
MDP = mkdir -p
OS2_LIB_ARCH = $(LIB_ARCH)
dirbase::
@[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR)
@[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR)
clean::
-$(RD) $(ARCH_DIR) $(LIB_ARCH)
endif

View File

@@ -1,77 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
CC = icc
CC_IN = /C+ /Tp
CC_OUT = /Fo
CPPFLAGS = /I$(GRANDP) /I$(HB_INC_COMPILE)
#CFLAGS = /Gs+ /W2 /Se /Sd+ /Ti+
CFLAGS = /Gs+ /W2 /Se /Sd+ -DHB_LONG_LONG_OFF
LD = icc
LD_OUT = /Fe
LDFLAGS = /C- /B"/NOIgnoreCase"
ifeq ($(HB_MAIN),)
else
ifeq ($(C_MAIN),)
ifeq ($(HB_GT_LIB),os2pm)
LDFLAGS +=/B"/PMtype:PM" $(TOP)$(ROOT)source/vm/$(HB_ARCH)/mainpm.obj
else
LDFLAGS += $(TOP)$(ROOT)source/vm/$(HB_ARCH)/mainstd.obj
endif
endif
endif
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS = $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib)$(LIB_EXT))
LINKLIBS += $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib)$(LIB_EXT))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach lib, $(HB_DB_DRIVERS), $(LIB_DIR)/$(lib)$(LIB_EXT))
endif
else
LINKLIBS = $(foreach lib, $(LIBS), $(lib)$(LIB_EXT))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach lib, $(HB_DB_DRIVERS), $(lib)$(LIB_EXT))
endif
endif
# Add the specified GT driver library
ifeq ($(C_MAIN),)
ifeq ($(findstring rtl,$(LIBS)),rtl)
ifeq ($(HB_GT_LIB),hbgfos2pm)
# Special handling for PM mode
LINKLIBS += $(LIB_DIR)/hbgfos2pm.lib
LINKLIBS += $(LIB_DIR)/gtos2.lib
else
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)$(LIB_EXT))
else
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT))
endif
endif
endif
endif
# HB_SCREEN_LIB: empty, or one of ncurses, slang
# HB_SCREEN_LIB=ncurses
# HB_SCREEN_LIB=slang
ifneq ($(HB_SCREEN_LIB),)
LINKLIBS += $(HB_SCREEN_LIB)
endif
AR = ilib
ARFLAGS = /NOE /NOIgnoreCase $(A_USR)
AROBJS = $(foreach file, $(^F), -+$(file))
AR_RULE = $(AR) $(ARFLAGS) $(LIB_DIR)/$@ $(AROBJS),,
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,36 +0,0 @@
#
# $Id$
#
ifeq ($(SHLVL),) # An OS/2 command shell
define inst_file
ECHO $(CP) $(file) $(INSTALL_OS2_DIR) >> _NSTALL.CMD
endef
INSTALL_LIST = $(subst /,\,$(INSTALL_OBJS))
INSTALL_OS2_DIR = $(subst /,\,$(INSTALL_DIR))
INSTALL_RULE = $(foreach file, $(INSTALL_LIST), $(inst_file)) \
$(COMSPEC) /c _NSTALL.CMD & $(RM) _NSTALL.CMD
else # bash
INSTALL_RULE =\
@if [ ! -d $(INSTALL_DIR) ]; \
then \
echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \
else \
for i in $(INSTALL_OBJS); \
do \
if [ -r $$i ]; \
then \
echo "! Installing $$i on $(INSTALL_DIR)"; \
$(CP) $$i $(INSTALL_DIR); \
else \
echo "! Can't install $$i, not found" 1>&2; \
fi \
done \
fi
endif

View File

@@ -1,15 +0,0 @@
#
# $Id$
#
PRG_C_SOURCES = $(PRG_SOURCES:.prg=.c)
PRG_OBJS = $(PRG_SOURCES:.prg=$(OBJ_EXT))
PRG_EXES = $(PRG_SOURCES:.prg=$(EXE_EXT))
PRG_MAIN_OBJ = $(PRG_MAIN:.prg=$(OBJ_EXT))
ALL_PRG_OBJS = $(PRG_OBJS) $(PRG_MAIN_OBJ)
$(PRG_OBJS) : %$(OBJ_EXT) : %.c
$(PRG_C_SOURCES) : %.c : $(GRANDP)%.prg

View File

@@ -1,88 +0,0 @@
#
# $Id$
#
# How to run yacc.
YACC = bison
YACC_FLAGS := -d $(YACC_FLAGS)
# How to run lex.
LEX = flex
LEX_FLAGS := -i -8 $(LEX_FLAGS)
#
# How to run Harbour.
#
HB := $(notdir $(HB_BIN_COMPILE))
ifneq ($(HB),)
# there is no slash at the end
HB := $(HB_BIN_COMPILE)/
endif
HB := $(HB)harbour$(EXE_EXT)
HB_FLAGS = -n -q0 -w3 -es2 -gc0 -kM -I$(TOP) -I$(HB_INC_COMPILE)
# The rule to link an executable.
ifeq ($(LD_RULE),)
# Use default rule if architecture/compiler specific rule is not defined
LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$@ $(^F) $(LDFLAGS) $(L_USR) $(LINKLIBS)
endif
# The rule to compile a C source file.
ifeq ($(CC_RULE),)
# Use default rule if architecture/compiler specific rule is not defined
CC_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_IN) $? $(CC_OUT)$(?F:.c=$(OBJ_EXT))
endif
# The rule to compile a C++ source file.
ifeq ($(CPP_RULE),)
# Use default rule if architecture/compiler specific rule is not defined
CPP_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_IN) $? $(CC_OUT)$(?F:.cpp=$(OBJ_EXT))
endif
# Eliminate these rules.
%.c : %.y
%.c : %.l
# Location of source C files
# Some DOS compilers doesn't like '/' in filenames - however the MAKE system
# requires '/' in filenames - this trick allows to solve this conflict
SOURCE_DIR := $($(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP)
ifeq ($(SOURCE_DIR),)
SOURCE_DIR = $(GRANDP)
endif
# Rule to generate an object file from a C source file in the parent.
%$(OBJ_EXT) : $(SOURCE_DIR)%.c
$(CC_RULE)
# Rule to generate an object file from a C source file.
%$(OBJ_EXT) : %.c
$(CC_RULE)
#rules for CPP files
%$(OBJ_EXT) : $(SOURCE_DIR)%.cpp
$(CPP_RULE)
%$(OBJ_EXT) : %.cpp
$(CPP_RULE)
# Rule to generate an executable file from an object file.
%$(EXE_EXT) : %$(OBJ_EXT)
$(LD_RULE)
# Rule to generate a C file from a PRG file.
%.c : $(GRANDP)%.prg
$(HB) $? $(PRG_USR) $(HB_FLAGS)
ifeq ($(SHLVL),) # COMMAND.COM
# Do nothing. the $(hb_architecture)/global.cf will handle clean up.
else
# Generic rule to clean up.
clean::
-$(RM) *.bak *.obj core *.core *~ *.o *.ppo
endif

View File

@@ -1,14 +0,0 @@
#
# $Id$
#
ifeq ($(PM),) # Only traverse directories if not compiling a specific module
DIR_RULE =\
@for d in $(DIRS); do \
if [ -d $$d ]; then \
$(MAKE) -C $$d $@; \
fi \
done
endif # ! compiling a specific program module

View File

@@ -1,88 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT =
LIB_PREF = lib
LIB_EXT = .a
CC = $(HB_CCACHE) gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
CFLAGS = -DHB_OS_SUNOS -Wall -W
# uncomment this if you want to farce relocateable code for .so libs
# it's necessary on some platforms but can reduce performance
#CFLAGS += -fPIC
LD = $(HB_CCACHE) gcc
LD_OUT = -o
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl
# screen driver libraries
ifeq ($(HB_CRS_LIB),)
HB_CRS_LIB=curses
endif
ifneq ($(findstring gtcrs, $(HB_GT_LIBS)),)
LINKLIBS += -l$(HB_CRS_LIB)
endif
ifneq ($(findstring gtsln, $(HB_GT_LIBS)),)
LINKLIBS += -lslang
endif
ifneq ($(findstring gtalleg, $(HB_GT_LIBS)),)
LINKLIBS += `allegro-config --static`
endif
ifneq ($(findstring gtxwc, $(HB_GT_LIBS)),)
LINKLIBS += -lX11
#LINKPATHS += -L/usr/X11R6/lib64
LINKPATHS += -L/usr/X11R6/lib
endif
# HB_GPM_MOUSE: use gpm mouse driver
ifeq ($(HB_GPM_MOUSE),yes)
LINKLIBS += -lgpm
endif
endif
ifneq ($(findstring -DHB_PCRE_REGEX, $(C_USR)),)
LINKLIBS += -lpcre
endif
ifneq ($(findstring -DHB_EXT_ZLIB, $(C_USR)),)
LINKLIBS += -lz
endif
LINKLIBS += -lm -lrt
LDFLAGS = $(LINKPATHS)
AR = ar
ARFLAGS = $(A_USR)
AR_RULE = $(AR) $(ARFLAGS) cr $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,51 +0,0 @@
#
# $Id$
#
all : first
HB_GT_LIST=\
gtcgi \
gtpca \
gtstd \
gttrm \
ifneq ($(HB_WITHOUT_GTCRS),yes)
HB_GT_LIST += gtcrs
endif
ifeq ($(HB_COMMERCE),yes)
HB_GPM_MOUSE = no
else
ifneq ($(HB_WITHOUT_GTSLN),yes)
HB_GT_LIST += gtsln
endif
endif
ifneq ($(HB_WITHOUT_X11),yes)
# HB_GT_LIST += gtxwc
endif
ifeq ($(HB_GTALLEG),yes)
HB_GT_LIST += gtalleg
endif
# verify if GT drivers exist
HB_GT_LIBS := $(foreach gt, $(HB_GT_LIST), $(if $(wildcard $(TOP)$(ROOT)source/rtl/$(gt)),$(gt),))
ifeq ($(HB_GT_LIB),)
HB_GT_LIB = gtstd
endif
ARCH_DIR = $(HB_ARCH)
MK = $(MAKE)
RM = rm -f
RD = rm -f -r
CP = cp -f
MV = mv -f
MD = mkdir
MDP = mkdir -p
dirbase::
@[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR)
@[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR)
clean::
-$(RD) $(ARCH_DIR) $(LIB_ARCH)

View File

@@ -1,20 +0,0 @@
#
# $Id$
#
INSTALL_RULE =\
@if [ ! -d $(INSTALL_DIR) ]; \
then \
echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \
else \
for i in $(INSTALL_OBJS); \
do \
if [ -r $$i ]; \
then \
echo "! Installing $$i on $(INSTALL_DIR)"; \
$(CP) $$i $(INSTALL_DIR); \
else \
echo "! Can't install $$i, not found" 1>&2; \
fi \
done \
fi

View File

@@ -1,19 +0,0 @@
#
# $Id$
#
ifneq ($(HB_ARCHITECTURE),)
ifneq ($(HB_COMPILER),)
include $(TOP)$(ROOT)config/global.cf
include $(TOP)$(ROOT)config/prg.cf
first:: dirbase ^^^d^e^s^c^e^n^d^^^
^^^d^e^s^c^e^n^d^^^ :
@$(MK) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(PRG_EXES)
endif
endif
install:

View File

@@ -1,80 +0,0 @@
#
# $Id$
#
# The Harbour Project
# GNU MAKE file for Borland C/C++ 32bit (4.x, 5.x)
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
CC = bcc32.exe
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(TOP) -I$(TOP)$(ROOT)
CFLAGS = -O2 -d -w -w-sig-
ifneq ($(HB_INC_COMPILE),)
CPPFLAGS += -I$(HB_INC_COMPILE)
endif
LD = bcc32.exe
LDFLAGS = -O2
LD_OUT = -e
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
LIBLIST = $(foreach lib, $(CONTRIBS), $(lib)$(LIB_EXT))
LIBLIST += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LIBLIST += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT))
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LIBLIST += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT))
endif
# It's probably not necessary in native Windows but I need it
# for my Linux box because -L<path> seems to not work with WINE
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS += $(foreach lib, $(LIBLIST), $(LIB_DIR)/$(lib))
else
LINKLIBS += $(foreach lib, $(LIBLIST), $(HB_LIB_COMPILE)/$(lib))
endif
# HB_SCREEN_LIB: empty, or one of ncurses, slang
# HB_SCREEN_LIB=ncurses
# HB_SCREEN_LIB=slang
ifneq ($(HB_SCREEN_LIB),)
LINKLIBS += $(HB_SCREEN_LIB)
endif
# Add the optional user path(s)
ifneq ($(LNK_USR_PATH),)
LINKPATHS += $(foreach path, $(LNK_USR_PATH), -L$(path))
endif
# Add the optional user libarary (or libraries)
ifneq ($(LNK_USR_LIB),)
LINKLIBS += $(foreach lib, $(LNK_USR_LIB), $(lib)$(LIB_EXT))
endif
LDFLAGS = $(LINKPATHS)
AR = tlib.exe
ARFLAGS = $(A_USR)
AROBJS = $(foreach file, $(^F), -+$(file))
AR_RULE = $(AR) $(ARFLAGS) "$(subst /,\,$(LIB_DIR)/$@)" $(AROBJS),,
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,141 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT = .exe
LIB_PREF = lib
LIB_EXT = .a
CC = $(CCPREFIX)gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
CFLAGS = -Wall -W
LD = $(CCPREFIX)gcc
LD_OUT = -o
LINKPATHS =
LDLIBS =
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
LDLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LDLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LDLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LDLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt))
endif
# HB_SCREEN_LIB: empty, or one of ncurses, slang
# HB_SCREEN_LIB=ncurses
# HB_SCREEN_LIB=slang
ifneq ($(HB_SCREEN_LIB),)
LDLIBS += -l$(HB_SCREEN_LIB)
endif
# Add the optional user path(s)
ifneq ($(LNK_USR_PATH),)
LINKPATHS += $(foreach path, $(LNK_USR_PATH), -L$(path))
endif
# Add the optional user libarary (or libraries)
ifneq ($(LNK_USR_LIB),)
LDLIBS += $(foreach lib, $(LNK_USR_LIB), -l$(lib))
endif
#SYSLIBS = -luser32 -lwinspool -lgdi32 -lcomctl32 -lcomdlg32 \
# -lole32 -loleaut32 -luuid -lmpr -lwsock32 -lws2_32 -lmapi32
SYSLIBS = -lwininet -lws2
# for contribs
SYSLIBS += -lcommdlg -lcommctrl -luuid -lole32
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every echo command will be separated by LF
define lib_object
echo. ADDMOD $(file) >> __lib__.tmp
endef
# We have to use script to overcome the DOS limit of max 128 characters
# in commmand line
define create_library
echo. CREATE $(LIB_DIR)/$@ > __lib__.tmp
$(foreach file, $(^F), $(lib_object))
echo. SAVE >> __lib__.tmp
echo. END >> __lib__.tmp
$(AR) $(ARFLAGS) -M < __lib__.tmp
endef
# NOTE: The empty line below HAVE TO exist!
define link_file
echo. $(file) >> __link__.tmp
endef
define search_dir
echo. SEARCH_DIR($(file)) >> __link__.tmp
endef
ifneq ($(strip $(LDLIBS)),)
define libs_list
echo. GROUP( >> __link__.tmp
$(foreach file, $(LDLIBS), $(link_file))
echo. ) >> __link__.tmp
endef
else
libs_list=
endif
define link_exe_file
echo. INPUT( >> __link__.tmp
$(foreach file, $(^F), $(link_file))
echo. ) >> __link__.tmp
$(libs_list)
$(foreach file, $(subst -L,,$(LINKPATHS)), $(search_dir))
echo. GROUP( >> __link__.tmp
$(foreach file, $(SYSLIBS), $(link_file))
echo. ) >> __link__.tmp
-$(LD) $(LDFLAGS) $(L_USR) $(LD_OUT)$@ __link__.tmp
endef
LDFLAGS =
AR = $(CCPREFIX)ar
ARFLAGS = $(A_USR)
RANLIB = $(CCPREFIX)ranlib
AR = $(CCPREFIX)ar
ARFLAGS = $(A_USR)
ifeq ($(SHLVL),) # COMMAND.COM - length of command line is limited
ifneq ($(OS),Windows_NT)
AR_RULE = $(create_library)
LD_RULE = $(link_exe_file)
endif
endif
ifeq ($(AR_RULE),)
AR_RULE = $(AR) $(ARFLAGS) cr $(LIB_DIR)/$@ $(^F) && $(RANLIB) $(LIB_DIR)/$@ || $(RM) $(LIB_DIR)/$@
# our libs have a lot of cross referenced now and we have to group them
# until we won't have cleaned them
LINKLIBS = $(LINKPATHS) -Wl,--start-group $(LDLIBS) -Wl,--end-group $(SYSLIBS)
endif
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,30 +0,0 @@
#
# $Id$
#
ifeq ($(PM),) # Only traverse directories if not compiling a specific module
ifeq ($(SHLVL),) # COMMAND.COM
ifeq ($(DIRS),) # Empty directory list
DIR_RULE =\
@echo Done
else
DIR_LIST := $(subst /,\,$(DIRS))
DIR_MAKE := $(subst /,\,$(MK))
DIR_RULE =\
$(COMSPEC) /C FOR %d IN ($(DIR_LIST)) DO $(DIR_MAKE) -C %d $@
endif
else # bash
DIR_RULE =\
@for d in $(DIRS); do \
if [ -d $$d ]; then \
$(MAKE) -C $$d $@; \
fi \
done
endif # ! Windows
endif # ! compiling a specific program module

View File

@@ -1,77 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT = .exe
LIB_PREF = lib
LIB_EXT = .a
CC = gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
CFLAGS = -Wall -W
LD = gcc
LD_OUT = -o
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
# The -( option could be appropriate to link against libraries with
# cyclic dependencies, but I think it is not really necessary if the
# libraries are kept in proper order.
# LINKLIBS += -Wl,-(
LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# This library is needed for CharToOemBuff() and OemToCharBuff() support.
LINKLIBS += -luser32 -lwinspool
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl
endif
# HB_SCREEN_LIB: empty, or one of ncurses, slang
# HB_SCREEN_LIB=ncurses
# HB_SCREEN_LIB=slang
ifneq ($(HB_SCREEN_LIB),)
LINKLIBS += -l$(HB_SCREEN_LIB)
endif
# Add the optional user path(s)
ifneq ($(LNK_USR_PATH),)
LINKPATHS += $(foreach path, $(LNK_USR_PATH), -L$(path))
endif
# Add the optional user libarary (or libraries)
ifneq ($(LNK_USR_LIB),)
LINKLIBS += $(foreach lib, $(LNK_USR_LIB), -l$(lib))
endif
# The -) option could be appropriate to link against libraries with
# cyclic dependencies, but I think it is not really necessary if the
# libraries are kept in proper order.
# LINKLIBS += -Wl,-)
LDFLAGS = $(LINKPATHS)
AR = ar
ARFLAGS = $(A_USR)
AR_RULE = $(AR) $(ARFLAGS) r $(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,111 +0,0 @@
#
# $Id$
#
all : first
HB_GT_LIST=\
gtcgi \
gtpca \
gtstd \
gtwin \
gtwvt \
gtgui \
# gtcrs \
# gtsln \
ifeq ($(HB_GTALLEG),yes)
HB_GT_LIST += gtalleg
endif
# verify if GT drivers exist
HB_GT_LIBS := $(foreach gt, $(HB_GT_LIST), $(if $(wildcard $(TOP)$(ROOT)source/rtl/$(gt)),$(gt),))
ifeq ($(HB_GT_LIB),)
HB_GT_LIB = gtwin
endif
ifeq ($(SHLVL),) # COMMAND.COM
# There is a conflict with the use of '\' and '/' characters
# The MAKE requires '/' in filenames (ARCH_DIR) however some compilers
# and some DOS commands require '\' (ARCH_DOS)
ARCH_DIR = $(subst \,/,$(HB_ARCH))
ARCH_DOS = $(subst /,\,$(HB_ARCH))
LIB_DIR_DOS = $(subst /,\,$(LIB_DIR))
LIB_PATH_DOS = $(subst /,\,$(LIB_PATH))
LIB_ARCH_DOS = $(subst /,\,$(LIB_ARCH))
DIRSEP = $(subst /,\,\)
MK := $(subst \,/,$(subst \~,~,$(MAKE)))
ifeq ($(COMSPEC),) #location of command.com
ifeq ($(OS),Windows_NT)
COMSPEC := cmd.exe
else
COMSPEC := command.com
endif
endif
ifeq ($(findstring cmd.exe,$(COMSPEC)),cmd.exe)
CMD_EXE := yes
else
CMD_EXE := no
endif
RM = del
RD = rmdir
MD = md
CP = $(COMSPEC) /C copy
MV = move
ifeq ($(CMD_EXE),yes)
RM = del /q /f
RD = rmdir /q /s
dirbase::
-@$(COMSPEC) /c \
for %d in ($(HB_ARCHITECTURE) $(ARCH_DOS)) do if not exist %d\. $(MD) %d
$(if $(LIB_PATH_DOS),-@$(COMSPEC) /c \
for %d in ($(LIB_PATH_DOS) $(LIB_DIR_DOS)) do if not exist %d\. $(MD) %d,)
clean::
-@$(COMSPEC) /c \
if exist $(ARCH_DOS) $(RD) $(ARCH_DOS)
$(if $(LIB_ARCH_DOS),-@$(COMSPEC) /c if exist $(LIB_ARCH_DOS) $(RM) $(LIB_ARCH_DOS),)
else # command.com
dirbase::
-@for %%d in ($(HB_ARCHITECTURE) $(ARCH_DOS)) do if not exist %%d\nul $(MD) %%d
$(if $(LIB_PATH_DOS),-@for %%d in ($(LIB_PATH_DOS) $(LIB_DIR_DOS)) do if not exist %%d\nul $(MD) %%d,)
clean::
-@for %%f in ($(ARCH_DOS)\*.* *.bak *.obj *.o *.tds) do $(RM) %%f
-@for %%d in ($(ARCH_DOS) $(HB_ARCHITECTURE)) do if exist %%d\nul $(RD) %%d
$(if $(LIB_ARCH_DOS),-@if exist $(LIB_ARCH_DOS) $(RM) $(LIB_ARCH_DOS),)
endif
else # bash
ARCH_DIR = $(HB_ARCH)
MK = $(MAKE)
RM = rm -f
RD = rm -f -r
CP = cp -f
MV = mv -f
MD = mkdir
MDP = mkdir -p
dirbase::
@[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR)
@[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR)
clean::
-$(RD) $(ARCH_DIR) $(LIB_ARCH)
endif

View File

@@ -1,69 +0,0 @@
#
# $Id$
#
# The Harbour Project
# GNU MAKE file for IBM Visual Age for C++
#
# This code is NOT TESTED yet! (19990711)
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
$(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP = $(subst /,\\,$(GRANDP))
_HB_INC_COMPILE = $(subst /,\\,$(HB_INC_COMPILE))
_HL = $(notdir $(HB_LIB_COMPILE))
ifeq ($(_HL),)
#there is an ending slash
_HB_LIB_COMPILE = $(subst /,\,$(HB_LIB_COMPILE))
else
_HB_LIB_COMPILE = $(subst /,\,$(HB_LIB_COMPILE)/)
endif
CC = icc
CC_IN = /Tp
CC_OUT = /Fo
CPPFLAGS = /C+
CFLAGS = /W2 /Sd /Se+ /Ti+ /i. /i$(_HB_INC_COMPILE)
#Note: The empty line below HAVE TO exist!
define link_file
echo /fo$(file) >> __link__.tmp
endef
define link_exe_file
echo $(LDFLAGS) -Fe$@ > __link__.tmp
$(foreach file, $(^F), $(link_file))
echo $(LINKLIBS) >> __link__.tmp
-$(LD) @__link__.tmp
endef
LD = icc
LDFLAGS = $(CFLAGS)
LINKLIBS += $(foreach lib, $(CONTRIBS), $(_HB_LIB_COMPILE)$(lib))
LINKLIBS += $(foreach lib, $(LIBS), $(_HB_LIB_COMPILE)$(lib))
LD_RULE = $(link_exe_file)
#Note: The empty line below HAVE TO exist!
define lib_object
echo -+$(file) >> __lib__.tmp
endef
define create_library
echo $@ > __lib__.tmp
$(foreach file, $(^F), $(lib_object))
$(AR) @__lib__.tmp
del __lib__.tmp
endef
AR = ilib
ARFLAGS = $(A_USR)
AR_RULE = $(create_library)
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,52 +0,0 @@
#
# $Id$
#
ifeq ($(INSTALL_OBJS),) # Empty install list
INSTALL_RULE = @echo Done
else
ifeq ($(SHLVL),) # COMMAND.COM or CMD.EXE
INSTALL_LIST = $(subst /,\,$(INSTALL_OBJS))
ifeq ($(CMD_EXE),yes)
# CMD.EXE no command line size limit
INSTALL_RULE = \
$(COMSPEC) /c for %f in ($(INSTALL_LIST)) do copy %f $(subst /,\,$(INSTALL_DIR))
else
# We have to use script to overcome the DOS limit of max 128 characters
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every commands will be separated by LF
define inst_file
$(CP) $(file) $(subst /,\,$(INSTALL_DIR))
endef
INSTALL_RULE = \
$(foreach file, $(INSTALL_LIST), $(inst_file))
endif
else # bash
INSTALL_RULE =\
@if [ ! -d $(INSTALL_DIR) ]; \
then \
echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \
else \
for i in $(INSTALL_OBJS); \
do \
if [ -r $$i ]; \
then \
echo "! Installing $$i on $(INSTALL_DIR)"; \
$(CP) $$i $(INSTALL_DIR); \
else \
echo "! Can't install $$i, not found" 1>&2; \
fi \
done \
fi
endif
endif # Empty install list

View File

@@ -1,146 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT = .exe
LIB_PREF = lib
LIB_EXT = .a
CC = $(CCPREFIX)gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE) -mno-cygwin
CFLAGS = -Wall -W
LD = $(CCPREFIX)gcc
LD_OUT = -o
LINKPATHS =
LDLIBS =
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
LDLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LDLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LDLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the standard C main() entry
ifeq ($(HB_MAIN),std)
ifeq ($(findstring vm,$(LIBS)),vm)
ifneq ($(HB_GT_LIB),gtwvt)
LDLIBS += -lhbmainstd
endif
endif
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LDLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt))
endif
# HB_SCREEN_LIB: empty, or one of ncurses, slang
# HB_SCREEN_LIB=ncurses
# HB_SCREEN_LIB=slang
ifneq ($(HB_SCREEN_LIB),)
LDLIBS += -l$(HB_SCREEN_LIB)
endif
# Add the optional user path(s)
ifneq ($(LNK_USR_PATH),)
LINKPATHS += $(foreach path, $(LNK_USR_PATH), -L$(path))
endif
# Add the optional user libarary (or libraries)
ifneq ($(LNK_USR_LIB),)
LDLIBS += $(foreach lib, $(LNK_USR_LIB), -l$(lib))
endif
# This library is needed for CharToOemBuff() and OemToCharBuff() support.
SYSLIBS = -luser32 -lwinspool -lgdi32 -lcomctl32 -lcomdlg32 \
-lole32 -loleaut32 -luuid -lmpr -lwsock32 -lws2_32 -lmapi32
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every echo command will be separated by LF
define lib_object
echo. ADDMOD $(file) >> __lib__.tmp
endef
# We have to use script to overcome the DOS limit of max 128 characters
# in commmand line
define create_library
echo. CREATE $(LIB_DIR)/$@ > __lib__.tmp
$(foreach file, $(^F), $(lib_object))
echo. SAVE >> __lib__.tmp
echo. END >> __lib__.tmp
$(AR) $(ARFLAGS) -M < __lib__.tmp
endef
# NOTE: The empty line below HAVE TO exist!
define link_file
echo. $(file) >> __link__.tmp
endef
define search_dir
echo. SEARCH_DIR($(file)) >> __link__.tmp
endef
ifneq ($(strip $(LDLIBS)),)
define libs_list
echo. GROUP( >> __link__.tmp
$(foreach file, $(LDLIBS), $(link_file))
echo. ) >> __link__.tmp
endef
else
libs_list=
endif
define link_exe_file
echo. INPUT( >> __link__.tmp
$(foreach file, $(^F), $(link_file))
echo. ) >> __link__.tmp
$(libs_list)
$(foreach file, $(subst -L,,$(LINKPATHS)), $(search_dir))
echo. GROUP( >> __link__.tmp
$(foreach file, $(SYSLIBS), $(link_file))
echo. ) >> __link__.tmp
-$(LD) $(LDFLAGS) $(L_USR) $(LD_OUT)$@ __link__.tmp
endef
LDFLAGS = -mno-cygwin
AR = $(CCPREFIX)ar
ARFLAGS = $(A_USR)
RANLIB = $(CCPREFIX)ranlib
ifeq ($(SHLVL),) # COMMAND.COM - length of command line is limited
ifneq ($(OS),Windows_NT)
AR_RULE = $(create_library)
LD_RULE = $(link_exe_file)
endif
endif
ifeq ($(AR_RULE),)
AR_RULE = $(AR) $(ARFLAGS) cr $(LIB_DIR)/$@ $(^F) && $(RANLIB) $(LIB_DIR)/$@ || $(RM) $(LIB_DIR)/$@
# our libs have a lot of cross referenced now and we have to group them
# until we won't have cleaned them
LINKLIBS = $(LINKPATHS) -Wl,--start-group $(LDLIBS) -Wl,--end-group $(SYSLIBS)
endif
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,46 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
CC = cl.exe
CC_IN = -c
CC_OUT = -Fo
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
CFLAGS = -nologo -W0 -Zi # -W4 for max warnings
LD = cl.exe
LD_OUT = -Fe
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -link -LIBPATH:$(LIB_DIR)
else
LINKPATHS += -link -LIBPATH:$(HB_LIB_COMPILE)
endif
LINKLIBS += $(foreach lib, $(CONTRIBS), $(subst lib,,$(lib))$(LIB_EXT))
LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT))
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT))
endif
LDFLAGS = $(LINKPATHS)
AR = lib.exe
ARFLAGS = $(A_USR)
AR_RULE = $(AR) $(ARFLAGS) /out:$(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,111 +0,0 @@
#
# $Id$
#
# The Harbour project
# GNU MAKE file for Open Watcom C/C++ compiler
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
CC = wpp386
CC_IN =
CC_OUT = -fo=
#CPPFLAGS = -j -w3 -d2 -5s -5r -fp5 -oxehtz -zq -zt0 -mf -bt=NT
CPPFLAGS = -w2 -d1 -zq -bt=NT
#architecture flags
CPPFLAGS += -5 -fp5
# optimization flags
# don't enable -ol optimization in OpenWatcom 1.1 - gives buggy code
CPPFLAGS += -onaehtzr -oi+ -ei -zp8 -s -zt0
CPPFLAGS += -i. -i$(TOP)include -i$(TOP)$(ROOT)include -iinclude
ifneq ($(HB_LIB_COMPILE),)
CPPFLAGS += -i$(HB_INC_COMPILE)
endif
# work arround to DOS command line size limit
export WPP386 := $(strip $(CPPFLAGS))
CPPFLAGS =
# Note: The empty line directly before 'endef' HAVE TO exist!
# It causes that the 'echo' command is separated by LF
define link_file
echo. FILE $(file) >> __link__.tmp
endef
#Note: The empty line directly before 'endef' HAVE TO exist!
define link_lib
echo. LIB $(lib) >> __link__.tmp
endef
define link_exe_file
echo. $(LDFLAGS) NAME $@ > __link__.tmp
$(foreach file, $(^F), $(link_file))
$(foreach lib, $(LINKLIBS), $(link_lib))
$(foreach lib, $(RDDLIBS), $(link_lib))
$(foreach lib, $(GTLIBS), $(link_lib))
echo. @%watcom%/binnt/wlink.lnk >> __link__.tmp
echo. LIB kernel32.lib, user32.lib, winspool.lib, oleaut32.lib, uuid.lib, comctl32.lib, mapi32.lib, wsock32.lib >> __link__.tmp
-$(LD) @__link__.tmp
endef
LD = wlink
LDFLAGS = debug all OP osn=NT OP stack=65536 OP CASEEXACT
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS = $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib))
LINKLIBS += $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib))
else
LINKLIBS = $(foreach lib, $(CONTRIBS), $(HB_LIB_COMPILE)/$(lib))
LINKLIBS += $(foreach lib, $(LIBS), $(HB_LIB_COMPILE)/$(lib))
endif
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
ifeq ($(HB_LIB_COMPILE),)
RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv))
else
RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv))
endif
endif
ifeq ($(findstring rtl,$(LIBS)),rtl)
ifeq ($(HB_LIB_COMPILE),)
GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt))
else
GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(HB_LIB_COMPILE)/$(gt))
endif
endif
LD_RULE = $(link_exe_file)
#Note: The empty line below HAVE TO exist!
define lib_object
echo. -+$(file) >> __lib__.tmp
endef
define create_library
echo. $(LIB_DIR)/$@ > __lib__.tmp
$(foreach file, $(^F), $(lib_object))
$(AR) $(ARFLAGS) @__lib__.tmp
endef
AR = wlib
ARFLAGS = -p=64 -c -n $(A_USR)
AR_RULE = $(create_library)
include $(TOP)$(ROOT)config/rules.cf
# work arround to DOS command line size limit
export HARBOURCMD := $(HB_FLAGS)
HB_FLAGS =

View File

@@ -1,79 +0,0 @@
#
# $Id$
#
# The Harbour Project
# GNU MAKE file for Pelles ISO C Compiler
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
CC = pocc.exe
CC_IN = -c
CC_OUT = -Fo
CPPFLAGS = -I. -I$(TOP) -I$(TOP)$(ROOT)
CPPFLAGS += -Ze -Zx -Go
# optimizations
CPPFLAGS += -Ot -Ox
# For Pocket PC and ARM processors (including XScale)
#CPPFLAGS += -Tarm-coff
# For x86 based CPUs
#CPPFLAGS += -Tx86-coff
ifneq ($(HB_INC_COMPILE),)
CPPFLAGS += -I$(HB_INC_COMPILE)
endif
CFLAGS =
LD = polink.exe
LD_OUT = -OUT:
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -LIBPATH:$(LIB_DIR)
else
LINKPATHS += -LIBPATH:$(HB_LIB_COMPILE)
endif
LINKLIBS += $(foreach lib, $(CONTRIBS), $(subst lib,,$(lib))$(LIB_EXT))
LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT))
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT))
endif
#LDFLAGS = $(LINKPATHS)
LDFLAGS = $(LINKPATHS) kernel32.lib user32.lib \
winspool.lib ole32.lib oleaut32.lib uuid.lib \
comctl32.lib mapi32.lib advapi32.lib \
gdi32.lib mpr.lib wsock32.lib ws2.lib ws2_32.lib \
comdlg32.lib
# ws2 ws2_32
ifeq ($(HB_GT_DEFAULT),gtgui)
LDFLAGS += /SUBSYSTEM:WINDOWS
else
ifeq ($(HB_GT_LIB),gtgui)
LDFLAGS += /SUBSYSTEM:WINDOWS
endif
endif
AR = polib.exe
ARFLAGS = $(A_USR)
AR_RULE = $(AR) $(ARFLAGS) /out:$(LIB_DIR)/$@ $(^F)
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,80 +0,0 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .a
CC = gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE) -Zwin32
CFLAGS = -Wall
LD = gcc
LDFLAGS = -Zwin32
# Note the space after -o
LD_OUT = -o
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
# The -( option could be appropriate to link against libraries with
# cyclic dependencies, but I think it is not really necessary if the
# libraries are kept in proper order.
# LINKLIBS += -Wl,-(
LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# This library is needed for CharToOemBuff() and OemToCharBuff() support.
# it's automatically added by RSXNT
#LINKLIBS += -luser32
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl
endif
# HB_SCREEN_LIB: empty, or one of ncurses, slang
# HB_SCREEN_LIB=ncurses
# HB_SCREEN_LIB=slang
ifneq ($(HB_SCREEN_LIB),)
LINKLIBS += -l$(HB_SCREEN_LIB)
endif
# Add the optional user path(s)
ifneq ($(LNK_USR_PATH),)
LINKPATHS += $(foreach path, $(LNK_USR_PATH), -L$(path))
endif
# Add the optional user libarary (or libraries)
ifneq ($(LNK_USR_LIB),)
LINKLIBS += $(foreach lib, $(LNK_USR_LIB), -l$(lib))
endif
# The -) option could be appropriate to link against libraries with
# cyclic dependencies, but I think it is not really necessary if the
# libraries are kept in proper order.
# LINKLIBS += -Wl,-)
LDFLAGS += $(LINKPATHS)
AR = ar
ARFLAGS = $(A_USR)
AR_RULE = $(AR) $(ARFLAGS) r $(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,119 +0,0 @@
#
# $Id$
#
# The Harbour project
# GNU MAKE file for Watcom C/C++ 10.x
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
$(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP = $(subst /,\,$(GRANDP))
CC = wpp386
CC_IN =
CC_OUT = -fo=
#CPPFLAGS = -j -w3 -d2 -5s -5r -fp5 -oxehtz -zq -zt0 -mf -bt=NT
CPPFLAGS = -w2 -d1 -zq -bt=NT
#architecture flags
CPPFLAGS += -5 -fp5
# optimization flags
# don't enable -ol optimization in OpenWatcom 1.1 - gives buggy code
CPPFLAGS += -onaehtzr -oi+ -ei -zp8 -s -zt0
CPPFLAGS += -i. -i$(TOP)include -i$(TOP)$(ROOT)include -iinclude
ifneq ($(HB_LIB_COMPILE),)
CPPFLAGS += -i$(HB_INC_COMPILE)
endif
# work arround to DOS command line size limit
export WPP386 := $(strip $(CPPFLAGS))
CPPFLAGS =
# Note: The empty line directly before 'endef' HAVE TO exist!
# It causes that the 'echo' command is separated by LF
define link_file
echo. FILE $(file) >> __link__.tmp
endef
#Note: The empty line directly before 'endef' HAVE TO exist!
define link_lib
echo. LIB $(lib) >> __link__.tmp
endef
define link_exe_file
echo. $(LDFLAGS) NAME $@ > __link__.tmp
echo. LIB kernel32.lib, user32.lib, winspool.lib, oleaut32.lib, uuid.lib, comctl32.lib, mapi32.lib, wsock32.lib >> __link__.tmp
$(foreach file, $(^F), $(link_file))
$(foreach lib, $(LINKLIBS), $(link_lib))
$(foreach lib, $(RDDLIBS), $(link_lib))
$(foreach lib, $(GTLIBS), $(link_lib))
-$(LD) @__link__.tmp
endef
LD = wlink
LDFLAGS = debug all OP osn=NT OP stack=65536 OP CASEEXACT
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS := $(foreach lib, $(CONTRIBS), $(subst /,\,$(LIB_DIR)/$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), $(subst /,\,$(LIB_DIR)/$(lib)))
else
LINKLIBS := $(foreach lib, $(CONTRIBS), $(subst /,\,$(HB_LIB_COMPILE)/$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), $(subst /,\,$(HB_LIB_COMPILE)/$(lib)))
endif
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
ifeq ($(HB_LIB_COMPILE),)
RDDLIBS := $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv))
else
RDDLIBS := $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv))
endif
RDDLIBS := $(subst /,\,$(RDDLIBS))
endif
ifeq ($(findstring rtl,$(LIBS)),rtl)
ifeq ($(HB_LIB_COMPILE),)
GTLIBS := $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt))
else
GTLIBS := $(foreach gt, $(HB_GT_LIBS), $(HB_LIB_COMPILE)/$(gt))
endif
GTLIBS := $(subst /,\,$(GTLIBS))
endif
LD_RULE = $(link_exe_file)
#Note: The empty line below HAVE TO exist!
define lib_object
echo. -+$(file) >> __lib__.tmp
endef
LIB_DDIR := $(subst /,\,$(LIB_DIR))
define create_library
echo. $(LIB_DDIR)\$@ > __lib__.tmp
$(foreach file, $(^F), $(lib_object))
$(AR) $(ARFLAGS) @__lib__.tmp
endef
AR = wlib
ARFLAGS = -p=64 -c -n $(A_USR)
AR_RULE = $(create_library)
include $(TOP)$(ROOT)config/rules.cf
HB := $(subst /,\,$(HB))
HB_FLAGS := $(subst /,\,$(HB_FLAGS))
# work arround to DOS command line size limit
export HARBOURCMD := $(HB_FLAGS)
HB_FLAGS =

View File

@@ -1,71 +0,0 @@
#
# $Id$
#
# The Harbour Project
# GNU MAKE file for xHarbour.com POCC compiler
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
CC = xcc.exe
CC_IN = -c
CC_OUT = -Fo
CPPFLAGS = -I. -I$(TOP) -I$(TOP)$(ROOT)
# disabled - it produces bad code
#CPPFLAGS += -Ot
# For Pocket PC and ARM processors (including XScale)
#CPPFLAGS += /Tarm-coff
ifneq ($(HB_INC_COMPILE),)
CPPFLAGS += -I$(HB_INC_COMPILE)
endif
CFLAGS =
LD = xlink.exe
LD_OUT = -OUT:
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -LIBPATH:$(LIB_DIR)
else
LINKPATHS += -LIBPATH:$(HB_LIB_COMPILE)
endif
LINKLIBS += $(foreach lib, $(CONTRIBS), $(subst lib,,$(lib))$(LIB_EXT))
LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT))
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT))
endif
LDFLAGS = $(LINKPATHS) kernel32.lib user32.lib \
winspool.lib ole32.lib oleaut32.lib uuid.lib \
comctl32.lib mapi32.lib advapi32.lib \
gdi32.lib mpr.lib wsock32.lib
ifeq ($(HB_GT_DEFAULT),gtgui)
LDFLAGS += /SUBSYSTEM:WINDOWS
else
ifeq ($(HB_GT_LIB),gtgui)
LDFLAGS += /SUBSYSTEM:WINDOWS
endif
endif
# mpr wsock32 ws2_32 mapi32
AR = xlib.exe
ARFLAGS = $(A_USR)
AR_RULE = $(AR) $(ARFLAGS) /out:$(LIB_DIR)/$@ $(^F)
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -1,56 +0,0 @@
#
# $Id$
#
ROOT = ../
DIRS=\
hbbtree \
hbct \
hbgt \
hbmisc \
hbnf \
hbclipsm \
hbvpdf \
xhb \
hbmzip \
# examples \
ifneq ($(HB_ARCHITECTURE),dos)
DIRS += hbbmcdx
endif
ifeq ($(HB_ARCHITECTURE),w32)
DIRS += rddads gtwvg
ifneq ($(HB_COMPILER),rsxnt)
DIRS += hbw32 hbodbc rddado
endif
endif
ifeq ($(HB_COMPILER),icc)
DIRS += hbgf/os2pm
else
ifeq ($(HB_ARCHITECTURE),os2)
DIRS += hbgf/os2pm
endif
endif
ifeq ($(HB_ARCHITECTURE),linux)
ifneq ($(HB_WITHOUT_ODBC),yes)
DIRS += hbodbc
endif
ifneq ($(HB_WITHOUT_ADS),yes)
DIRS += rddads
endif
endif
ifneq ($(HB_ARCHITECTURE),dos)
DIRS += hbtip
endif
ifneq ($(HB_CONTRIBLIBS),)
DIRS += $(HB_CONTRIBLIBS)
endif
include $(ROOT)config/dir.cf

View File

@@ -1,13 +0,0 @@
#
# $Id$
#
ROOT = ../../
DIRS=\
guestbk \
hscript \
misc \
pe \
include $(ROOT)config/dir.cf

View File

@@ -1,36 +0,0 @@
#
# $Id$
#
ROOT = ../../../
PRG_SOURCES=\
DBU.PRG \
DBUCOPY.PRG \
DBUEDIT.PRG \
DBUHELP.PRG \
DBUINDX.PRG \
DBUNET.PRG \
DBUSTRU.PRG \
DBUUTIL.PRG \
DBUVIEW.PRG \
PRG_MAIN=DBU.PRG
LIBS=\
hbdebug \
hbvm \
hbrtl \
hblang \
hbrdd \
hbrtl \
hbvm \
hbmacro \
hbpp \
rddntx \
rddcdx \
rddfpt \
hbsix \
hbcommon \
include $(TOP)$(ROOT)config/bin.cf

View File

@@ -1,65 +0,0 @@
@echo off
rem
rem $Id$
rem
set HB_DIR_DBU=%CLIPPER_DIR%\SOURCE\DBU
if exist "%HB_DIR_DBU%\DBU.PRG" goto DIR_OK
set HB_DIR_DBU=.
if exist "%HB_DIR_DBU%\DBU.PRG" goto DIR_OK_LOCAL
echo ---------------------------------------------------------------
echo IMPORTANT: You'll either need to copy the original CA-Cl*pper
echo DBU sources to this directory, or set the location of
echo your original CA-Cl*pper installation (with DBU sources
echo in SOURCE\DBU):
echo set CLIPPER_DIR=C:\CLIPPER5
echo ---------------------------------------------------------------
goto EXIT
:DIR_OK_LOCAL
if exist hb_dbu.dif patch -i hb_dbu.dif
:DIR_OK
..\..\..\bin\harbour /n %HB_DIR_DBU%\DBU.PRG /i..\..\..\include\
..\..\..\bin\harbour /n %HB_DIR_DBU%\DBUCOPY.PRG /i..\..\..\include\
..\..\..\bin\harbour /n %HB_DIR_DBU%\DBUEDIT.PRG /i..\..\..\include\
..\..\..\bin\harbour /n %HB_DIR_DBU%\DBUHELP.PRG /i..\..\..\include\
..\..\..\bin\harbour /n %HB_DIR_DBU%\DBUINDX.PRG /i..\..\..\include\
..\..\..\bin\harbour /n %HB_DIR_DBU%\DBUNET.PRG /i..\..\..\include\
..\..\..\bin\harbour /n %HB_DIR_DBU%\DBUSTRU.PRG /i..\..\..\include\
..\..\..\bin\harbour /n %HB_DIR_DBU%\DBUUTIL.PRG /i..\..\..\include\
..\..\..\bin\harbour /n %HB_DIR_DBU%\DBUVIEW.PRG /i..\..\..\include\
echo -O2 -I..\..\..\include -L..\..\..\lib > build.tmp
echo -edbu.exe >> build.tmp
echo dbu.c >> build.tmp
echo dbucopy.c >> build.tmp
echo dbuedit.c >> build.tmp
echo dbuhelp.c >> build.tmp
echo dbuindx.c >> build.tmp
echo dbunet.c >> build.tmp
echo dbustru.c >> build.tmp
echo dbuutil.c >> build.tmp
echo dbuview.c >> build.tmp
echo hbdebug.lib >> build.tmp
echo hbvm.lib >> build.tmp
echo hbrtl.lib >> build.tmp
echo gtwin.lib >> build.tmp
echo hblang.lib >> build.tmp
echo hbrdd.lib >> build.tmp
echo hbmacro.lib >> build.tmp
echo hbpp.lib >> build.tmp
echo rddntx.lib >> build.tmp
echo rddcdx.lib >> build.tmp
echo rddfpt.lib >> build.tmp
echo hbsix.lib >> build.tmp
echo hbcommon.lib >> build.tmp
bcc32 @build.tmp
del build.tmp
dbu
:EXIT

View File

@@ -1,224 +0,0 @@
diff -u -x make_dif.bat ..\ori_src\DBU.PRG .\DBU.PRG
--- ..\ori_src\DBU.PRG Thu Mar 04 05:20:00 1993
+++ .\DBU.PRG Fri May 30 15:37:11 2008
@@ -378,13 +378,13 @@
ENDIF
- CASE FILE(com_line + ".VEW")
+ CASE FILE(com_line + ".vew")
* look for file name with .VEW extension
- com_line = com_line + ".VEW"
+ com_line = com_line + ".vew"
- CASE FILE(com_line + ".DBF")
+ CASE FILE(com_line + ".dbf")
* look for file name with .DBF extension
- com_line = com_line + ".DBF"
+ com_line = com_line + ".dbf"
OTHERWISE
* file not found..ignore command line
@@ -395,7 +395,7 @@
IF .NOT. EMPTY(com_line)
* command line file exists
- IF RAT(".VEW", com_line) = LEN(com_line) - 3
+ IF RAT(".vew", Lower( com_line ) ) = LEN(com_line) - 3
* assume a valid .VEW file
view_file = com_line
set_from(.F.) && restore view
diff -u -x make_dif.bat ..\ori_src\DBUCOPY.PRG .\DBUCOPY.PRG
--- ..\ori_src\DBUCOPY.PRG Thu Mar 04 05:20:00 1993
+++ .\DBUCOPY.PRG Fri May 30 15:41:33 2008
@@ -104,7 +104,7 @@
* DBF for normal mode
files = "dbf_list"
- def_ext = ".DBF"
+ def_ext = ".dbf"
* when is a filename acceptable?
fi_done = "not_empty('filename')"
@@ -208,7 +208,7 @@
SELECT (M->cur_area)
- IF RAT(M->def_ext, M->filename) = LEN(M->filename) - 3
+ IF RAT(Lower( M->def_ext ), Lower( M->filename )) = LEN(M->filename) - 3
* target has default extension..does it exists in current dir?
add_name = .NOT. FILE(name(M->filename) + M->def_ext)
@@ -735,7 +735,7 @@
cur_el = 1
rel_row = 0
files = "dbf_list"
- def_ext = ".DBF"
+ def_ext = ".dbf"
filelist(1) && display new list
ELSE
@@ -750,7 +750,7 @@
cur_el = 1
rel_row = 0
files = "txt_list"
- def_ext = ".TXT"
+ def_ext = ".txt"
filelist(1) && display new list
ENDIF
@@ -813,7 +813,7 @@
cur_el = 1
rel_row = 0
files = "dbf_list"
- def_ext = ".DBF"
+ def_ext = ".dbf"
filelist(1) && display new list
ELSE
@@ -828,7 +828,7 @@
cur_el = 1
rel_row = 0
files = "txt_list"
- def_ext = ".TXT"
+ def_ext = ".txt"
filelist(1) && display new list
ENDIF
diff -u -x make_dif.bat ..\ori_src\DBUINDX.PRG .\DBUINDX.PRG
--- ..\ori_src\DBUINDX.PRG Thu Mar 04 05:20:00 1993
+++ .\DBUINDX.PRG Fri May 30 15:40:42 2008
@@ -240,7 +240,7 @@
INDEX ON &k_exp TO &filename
CLOSE INDEX
- IF AT(INDEXEXT(), M->filename) = LEN(M->filename) - 3 .AND.;
+ IF AT(Lower( INDEXEXT() ), Lower( M->filename )) = LEN(M->filename) - 3 .AND.;
FILE(name(M->filename) + INDEXEXT()) .AND. M->add_name
* add only .ntx files in the current directory
diff -u -x make_dif.bat ..\ori_src\DBUSTRU.PRG .\DBUSTRU.PRG
--- ..\ori_src\DBUSTRU.PRG Thu Mar 04 05:20:00 1993
+++ .\DBUSTRU.PRG Fri May 30 15:34:49 2008
@@ -811,7 +811,7 @@
is_insert = .F.
filename = stru_name
- IF filebox(".DBF", "dbf_list", "stru_title",;
+ IF filebox(".dbf", "dbf_list", "stru_title",;
"do_modstru", .T., 13) <> 0
* structure created or altered
stru_name = filename
@@ -1215,7 +1215,7 @@
USE
* remember if file existed in current directory before
- add_name = .NOT. FILE(name(filename) + ".DBF")
+ add_name = .NOT. FILE(name(filename) + ".dbf")
IF FILE(filename)
* file exists..modify structure and save old data
@@ -1236,11 +1236,11 @@
* establish temp filespec and dbt specs in same directory
name_temp = SUBSTR(filename, 1, RAT("\", filename)) +;
- "DDBBUUUU.TMP"
+ "ddbbuuuu.tmp"
dbt_spec = SUBSTR(filename, 1, RAT(".", filename)) +;
- "DBT"
+ "dbt"
dbt_temp = SUBSTR(name_temp, 1, RAT(".", name_temp)) +;
- "DBT"
+ "dbt"
IF FILE(dbt_spec)
* data file contains memo fields
@@ -1321,7 +1321,7 @@
USE
IF AT(".DBF", filename) = LEN(filename) - 3 .AND.;
- FILE(name(filename) + ".DBF") .AND. add_name
+ FILE(name(filename) + ".dbf") .AND. add_name
* add only .dbf files in the current directory
i = afull(dbf_list) + 1
diff -u -x make_dif.bat ..\ori_src\DBUUTIL.PRG .\DBUUTIL.PRG
--- ..\ori_src\DBUUTIL.PRG Thu Mar 04 05:20:00 1993
+++ .\DBUUTIL.PRG Fri May 30 15:36:26 2008
@@ -2152,7 +2152,7 @@
IF FILE(M->filename)
* only if the file exists
- IF INDEXEXT() = ".NTX"
+ IF Lower( INDEXEXT() ) = ".ntx"
* Clipper index file format
k_pos = 23
diff -u -x make_dif.bat ..\ori_src\DBUVIEW.PRG .\DBUVIEW.PRG
--- ..\ori_src\DBUVIEW.PRG Thu Mar 04 05:20:00 1993
+++ .\DBUVIEW.PRG Fri May 30 15:36:04 2008
@@ -1110,7 +1110,7 @@
IF .NOT. (RAT(".", M->filename) > RAT("\", M->filename))
* no extension entered..provide default
- filename = M->filename + ".DBF"
+ filename = M->filename + ".dbf"
ENDIF
@@ -1141,7 +1141,7 @@
ELSE
* insert or enter or menu selection..use filebox
- ret_val = filebox(".DBF", "dbf_list", "dopen_titl",;
+ ret_val = filebox(".dbf", "dbf_list", "dopen_titl",;
"do_opendbf", .F., 8) <> 0
ENDIF
@@ -2790,7 +2790,7 @@
* get user entered file name..will default to primary + ".VEW"
IF EMPTY(M->view_file) .AND. .NOT. EMPTY(dbf[1])
* default to name of primary data file
- filename = name(dbf[1]) + ".VEW"
+ filename = name(dbf[1]) + ".vew"
ELSE
* whatever the last view was
@@ -2799,7 +2799,7 @@
ENDIF
* it's better in a box
-filebox(".VEW", "vew_list", "vcrea_titl", "do_creavew", .T., 8)
+filebox(".vew", "vew_list", "vcrea_titl", "do_creavew", .T., 8)
* restore help code
help_code = M->old_help
@@ -2841,7 +2841,7 @@
stat_msg("Generating View File")
* add new .VEW files to vew_list if created in current directory only
-add_name = .NOT. FILE(name(filename) + ".VEW")
+add_name = .NOT. FILE(name(filename) + ".vew")
* create structure extended template
CREATE ddbbuuuu.ext
@@ -3010,8 +3010,8 @@
USE
* add file name to array of view files
-IF AT(".VEW", filename) = LEN(filename) - 3 .AND.;
- FILE(name(filename) + ".VEW") .AND. add_name
+IF AT(".vew", Lower(filename)) = LEN(filename) - 3 .AND.;
+ FILE(name(filename) + ".vew") .AND. add_name
* add only new .VEW files in the current directory
* determine number of first empty element
@@ -3081,7 +3081,7 @@
IF M->from_view
* called from set_view
- IF filebox(".VEW", "vew_list", "vopen_titl", "do_openvew", .F., 8) <> 0
+ IF filebox(".vew", "vew_list", "vopen_titl", "do_openvew", .F., 8) <> 0
* indicate new View has been set
keystroke = 13

View File

@@ -1,13 +0,0 @@
/*
* $Id$
*/
Copy the full content of /SOURCE/DBU from your original
CA-Cl*pper installation, and run the batch file to compile.
If DBU source is present in this directory, it will be
patched by hb_dbu.dif to make the original code run better
under various platforms. This patch is optional, you can
delete it if you want.
[vszakats]

View File

@@ -1,30 +0,0 @@
#
# $Id$
#
ROOT = ../../../
PRG_SOURCES=\
guestbk.prg \
inifiles.prg \
testcgi.prg \
PRG_MAIN=guestbk.prg
LIBS=\
hbdebug \
hbvm \
hbrtl \
hblang \
hbrdd \
hbrtl \
hbvm \
hbmacro \
hbpp \
rddntx \
rddcdx \
rddfpt \
hbsix \
hbcommon \
include $(TOP)$(ROOT)config/bin.cf

View File

@@ -1,29 +0,0 @@
@echo off
rem
rem $Id$
rem
..\..\..\bin\harbour /n guestbk /i..\..\..\include\
..\..\..\bin\harbour /n inifiles /i..\..\..\include\
..\..\..\bin\harbour /n testcgi /i..\..\..\include\
echo -O2 -I..\..\..\include -L..\..\..\lib > build.tmp
echo -eguestbk.exe >> build.tmp
echo guestbk.c inifiles.c testcgi.c >> build.tmp
echo hbdebug.lib >> build.tmp
echo hbvm.lib >> build.tmp
echo hbrtl.lib >> build.tmp
echo gtwin.lib >> build.tmp
echo hblang.lib >> build.tmp
echo hbrdd.lib >> build.tmp
echo hbmacro.lib >> build.tmp
echo hbpp.lib >> build.tmp
echo rddntx.lib >> build.tmp
echo rddcdx.lib >> build.tmp
echo rddfpt.lib >> build.tmp
echo hbsix.lib >> build.tmp
echo hbcommon.lib >> build.tmp
bcc32 @build.tmp
del build.tmp
guestbk

View File

@@ -1,36 +0,0 @@
/*
* $Id$
*/
// CGI.ch
//+
// Harbour project
//
//
// 99.05.31 initial posting.
//
//
//-
#define CGI_SERVER_SOFTWARE 01
#define CGI_SERVER_NAME 02
#define CGI_GATEWAY_INTERFACE 03
#define CGI_SERVER_PROTOCOL 04
#define CGI_SERVER_PORT 05
#define CGI_REQUEST_METHOD 06
#define CGI_HTTP_ACCEPT 07
#define CGI_HTTP_USER_AGENT 08
#define CGI_HTTP_REFERER 09
#define CGI_PATH_INFO 10
#define CGI_PATH_TRANSLATED 11
#define CGI_SCRIPT_NAME 12
#define CGI_QUERY_STRING 13
#define CGI_REMOTE_HOST 14
#define CGI_REMOTE_ADDR 15
#define CGI_REMOTE_USER 16
#define CGI_AUTH_TYPE 17
#define CGI_CONTENT_TYPE 18
#define CGI_CONTENT_LENGTH 19
#define CGI_ANNOTATION_SERVER 20

View File

@@ -1,33 +0,0 @@
<HTML>
<HEAD>
<TITLE>The Harbour Guestbook</TITLE>
<META NAME="Generator" CONTENT="EditPlus 1.2">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<!-- Harbour Guestbook Webpage -->
<!-- Copyright (C) 1999 by Felipe G. Coury -->
<BODY BGCOLOR="#FFFFFF">
<FONT FACE="Tahoma">
<CENTER><B>Harbour GuestBook Script</B></CENTER>
<HR>
<CENTER>
<FORM NAME="GuestBook" ACTION="/cgi-bin/guestbk.exe" METHOD="GET">
<TABLE>
<TR><TD><FONT SIZE=2><B>Name:</B></TD><TD><INPUT NAME="Name" TYPE="text" SIZE="60"></TD></TR>
<TR><TD><FONT SIZE=2><B>City/State/Country:</TD><TD><INPUT NAME="City" TYPE="text" SIZE="20"><INPUT NAME="State" TYPE="text" SIZE="20"><INPUT NAME="Country" TYPE="text" SIZE="20"></TD></TR>
<TR><TD><FONT SIZE=2><B>E-Mail:</TD><TD><INPUT NAME="EMail" TYPE="text" SIZE="30"></TD></TR>
<TR><TD><FONT SIZE=2><B>Homepage:</TD><TD><INPUT NAME="Homepage" TYPE="text" SIZE="40"></TD></TR>
<TR><TD valign="TOP"><FONT SIZE=2><B>Comments:</TD><TD><TEXTAREA NAME="Comments" ROWS="5" COLS="60"></TEXTAREA></TD></TR>
</TABLE>
<INPUT TYPE="Submit" VALUE=" Submit Entry ">&nbsp;<INPUT TYPE="Reset" VALUE=" Reset Data "><BR>
<INPUT TYPE="Hidden" NAME="Oper" VALUE="A">
</CENTER>
<IMG SRC="http://www.flexsys-ci.com/harbour-project/images/hscbtn.gif">
</FORM>
<HR>
<#Entries>
</BODY>
</HTML>

View File

@@ -1,60 +0,0 @@
;
; The Harbour Guestbook Script
; Copyright (C) 1999 Felipe G. Coury
;
; GUESTBK.INI - Script configuration file
;
;
; 1. Section [Header]
;
; This section defines the Guestbook fields and color look.
; DataFields=<n> n is the number of fields on guestbook
; DataFieldn=<fieldname> defines the name of the nth field of guestbook
; EvenLine=<color> color of even lines on guestbook
; OddLine=<color> color of odd lines on guestbook
[Header]
DataFields=7
DataField1=Name
DataField2=City
DataField3=State
DataField4=Country
DataField5=EMail
DataField6=Homepage
DataField7=Comments
EvenLine=#F0F0F0
OddLine=#000000
; 2. Section [Format]
; Formats each guestbook entry.
; FormatLines=<n> number of lines per entry
; FormatLinen=<format> format of the nth line of the entry. You can
; use metatags for replacing its content with the
; correspondent field value. Ex.:
; Format1=Name: <B><#Name></B>
; Format2=<A HREF="<#URL>"><#URL></A>
; Formats one line with "Name:" and the content
; of the "Name" field in bold and the other
; with a link to the "URL" field. The fields
; within metatags must be defined in the [Header]
; section. In addition to those tags you can use
; <#DateTime> tag, which will be expanded to the
; entry date on the format "Month DD, YYYY".
[Format]
FormatLines=3
Format1=<B><#Comments></B>
Format2=<A HREF="<#Homepage>"><#Name></A> &lt;<A HREF="mailto:<#EMail>"><#EMail></A>>
Format3=<#City>, <#State> <#Country> - <#DateTime>
; 3. Section [Entries]
; This section is not a configuration section. The Guestbook itself controls
; it adding entries here. Should not be modified.
[Entries]
Entries=1
Name1=Felipe G. Coury
City1=Campinas
State1=SP
Country1=Brazil
EMail1=fcoury@flexsys-ci.com
Homepage1=http://www.flexsys-ci.com
Comments1=This is Harbour Guestbook. Powered by Harbour. Leave your message after the beep!!!&ltg>
DateTime1=July 25, 1999 12:00:00

View File

@@ -1,162 +0,0 @@
/*
* $Id$
*/
/*
Harbour Project source code
This file contains source for a script of a Guestbook
Copyright (C) 1999 Felipe G. Coury <fcoury@creation.com.br>
www - http://www.harbour-project.org
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*/
FUNCTION Main()
LOCAL oIni := TIniFile():New( "c:\inetpub\wwwroot\guestbk.ini" )
LOCAL oHTML := THTML():New()
LOCAL aEntr := {}
LOCAL cOddColor, cEvenColor
LOCAL cCode, i, j, l, cField, nEntry, cColor
LOCAL aEntries, aLine, cLine
oHTML:ProcessCGI()
IF oHTML:QueryFields( "Oper" ) = "A" // Add Entry
nEntry := oIni:ReadNumber( "Entries", "Entries", 0 ) + 1
oIni:WriteNumber( "Entries", "Entries", nEntry )
// Reads all "Header" fields from CGI
FOR i := 1 TO oIni:ReadNumber( "Header", "DataFields", 0 )
cField := oIni:ReadString( "Header", "DataField"+ltrim(str(i)), "" )
oIni:WriteString( "Entries", cField + ltrim(str(nEntry)), ;
strtran( strtran( oHTML:QueryFields( cField ), chr(10), "" ), chr(13), "<BR>" ) )
NEXT
// Write fields to .ini file
oIni:WriteString( "Entries", "DateTime" + ltrim(str(nEntry)), ;
cmonth( date() ) + " " + ltrim(str(day(date()))) + ", " + ;
ltrim(str(year(date()))) + " " + time() )
oIni:UpdateFile()
oHTML:cContent := '<HTML><HEAD><META HTTP-EQUIV="Refresh" ' + ;
'CONTENT="0;URL=/cgi-bin/guestbk.exe"></HEAD>' + ;
'<BODY></BODY></HTML>'
oHTML:ShowResult()
ELSE
// Sets the metahtml file
oHTML:SetHTMLFile( "c:\inetpub\wwwroot\guestbk.htm" )
// Retrieves odd and even entries color
cOddColor := oIni:ReadString( "Header", "OddColor", "#FFFFFF" )
cEvenColor := oIni:ReadString( "Header", "EvenColor", "#F0F0F0" )
cCode := ""
i := oIni:ReadNumber( "Entries", "Entries", 0 )
aEntries := {}
// Preprocess entries and stores in aEntries
DO WHILE i > 0
aLine := {}
FOR j := 1 TO oIni:ReadNumber( "Header", "DataFields", 0 )
cField := oIni:ReadString( "Header", "DataField" + ltrim( str(j) ), "" )
aadd( aLine, { cField, ;
oIni:ReadString( "Entries", cField + ltrim( str(i) ), "" ) } )
NEXT
aadd( aEntries, aLine )
i--
ENDDO
cCode := ""
// Formats each line according to the INI file
FOR i := 1 TO len( aEntries )
cCode += "<TABLE WIDTH=100% CELLSPACING=0>" + chr(13) + chr(10)
cColor := if( Mod( i, 2 ) == 0, cEvenColor, cOddColor )
FOR j := 1 TO oIni:ReadNumber( "Format", "FormatLines", 0 )
cCode += "<TR><TD BGCOLOR='" + cColor +"'>"
cLine := oIni:ReadString( "Format", "Format" + ltrim(str(j)), "" )
FOR l := 1 TO len( aEntries[i] )
cLine := strtran( cLine, "<#" + aEntries[i,l,1] + ">", ;
aEntries[i,l,2] )
NEXT
cLine := strtran( cLine, "<#DateTime>", ;
oIni:ReadString( "Entries", "DateTime" + ltrim(str(len(aEntries)-i+1)), "" ) )
cCode += cLine + "</TD></TR>" + chr(13)+chr(10)
NEXT
cCode += "</TABLE>" + chr(13)+chr(10)
NEXT
// Generates the output
oHTML:AddReplaceTag( "Entries", cCode )
oHTML:Generate()
oHTML:ShowResult()
ENDIF
RETURN( NIL )

View File

@@ -1,24 +0,0 @@
Harbour Guestbook
Felipe Coury <fcoury@flexsys-ci.com>
How to create and test the Harbour Guestbook
You'll find BLDGUEST.BAT, GUESTBK.PRG, GUESTBK.HTM and
GUESTBK.HTM files. To build the executable, review
GUESTBK.PRG and check the directories for locating
GUESTBK.INI and GUESTBK.HTM correctly.
With that done, build it using BLDGUEST.BAT. Put the
resulting EXE, the INI and HTM files on a script-
enabled directory and call GUESTBK.EXE via WebBrowser.
The best thing about this guestbook is its highly
configurable architecture. Please review GUESTBK.INI
for configuration options and further explanation.
That's it !!!
PS: If you don't have a WebServer, I will be pleased to
demonstrate it to you. Just contact me via ICQ, my
UIN is #19504786. Thanks!!!

View File

@@ -1,312 +0,0 @@
/*
* $Id$
*/
#define CRLF (Chr(13) + Chr(10))
function TIniFile()
static oClass
if oClass == nil
oClass := HBClass():New( 'TINIFILE' ) // starts a new class definition
oClass:AddData( 'FileName' ) // define this class objects datas
oClass:AddData( 'Contents' )
oClass:AddMethod( 'New', @New() ) // define this class objects methods
oClass:AddMethod( 'ReadString', @ReadString() )
oClass:AddMethod( 'WriteString', @WriteString() )
oClass:AddMethod( 'ReadNumber', @ReadNumber() )
oClass:AddMethod( 'WriteNumber', @WriteNumber() )
oClass:AddMethod( 'ReadDate', @ReadDate() )
oClass:AddMethod( 'WriteDate', @WriteDate() )
oClass:AddMethod( 'ReadBool', @ReadBool() )
oClass:AddMethod( 'WriteBool', @WriteBool() )
oClass:AddMethod( 'ReadSection', @ReadSection() )
oClass:AddMethod( 'ReadSections', @ReadSections() )
oClass:AddMethod( 'DeleteKey', @DeleteKey() )
oClass:AddMethod( 'EraseSection', @EraseSection() )
oClass:AddMethod( 'UpdateFile', @UpdateFile() )
oClass:Create() // builds this class
endif
return oClass:Instance() // builds an object of this class
static function New(cFileName)
local Self := QSelf()
local Done, hFile, cFile, cLine, cIdent, nPos
local CurrArray
if empty(cFileName)
// raise an error?
outerr('No filename passed to TIniFile():New()')
return nil
else
::FileName := cFilename
::Contents := {}
CurrArray := ::Contents
if File(cFileName)
hFile := fopen(cFilename, 0)
else
hFile := fcreate(cFilename)
endif
cLine := ''
Done := .f.
while !Done
cFile := space(256)
Done := (fread(hFile, @cFile, 256) <= 0)
cFile := strtran(cFile, chr(10), '') // so we can just search for CHR(13)
// prepend last read
cFile := cLine + cFile
while !empty(cFile)
if (nPos := at(chr(13), cFile)) > 0
cLine := left(cFile, nPos - 1)
cFile := substr(cFile, nPos + 1)
if !empty(cLine)
if Left(cLine, 1) == '[' // new section
if (nPos := At(']', cLine)) > 1
cLine := substr(cLine, 2, nPos - 2);
else
cLine := substr(cLine, 2)
endif
AAdd(::Contents, { cLine, { /* this will be CurrArray */ } } )
CurrArray := ::Contents[Len(::Contents)][2]
elseif Left(cLine, 1) == ';' // preserve comments
AAdd( CurrArray, { NIL, cLine } )
else
if (nPos := At('=', cLine)) > 0
cIdent := Left(cLine, nPos - 1)
cLine := SubStr(cLine, nPos + 1)
AAdd( CurrArray, { cIdent, cLine } )
else
AAdd( CurrArray, { cLine, '' } )
endif
endif
cLine := '' // to stop prepend later on
endif
else
cLine := cFile
cFile := ''
endif
end
end
fclose(hFile)
endif
return Self
static function ReadString(cSection, cIdent, cDefault)
local Self := QSelf()
local cResult := cDefault
local i, j, cFind
if Empty(cSection)
cFind := lower(cIdent)
j := AScan( ::Contents, {|x| valtype(x[1]) == 'C' .and. lower(x[1]) == cFind .and. ValType(x[2]) == 'C'} )
if j > 0
cResult := ::Contents[j][2]
endif
else
cFind := lower(cSection)
i := AScan( ::Contents, {|x| valtype(x[1]) == 'C' .and. lower(x[1]) == cFind} )
if i > 0
cFind := lower(cIdent)
j := AScan( ::Contents[i][2], {|x| valtype(x[1]) == 'C' .and. lower(x[1]) == cFind} )
if j > 0
cResult := ::Contents[i][2][j][2]
endif
endif
endif
return cResult
static procedure WriteString(cSection, cIdent, cString)
local Self := QSelf()
local i, j, cFind
if Empty(cIdent)
outerr('Must specify an identifier')
elseif Empty(cSection)
cFind := lower(cIdent)
j := AScan( ::Contents, {|x| valtype(x[1]) == 'C' .and. lower(x[1]) == cFind .and. ValType(x[2]) == 'C'} )
if j > 0
::Contents[j][2] := cString
else
AAdd(::Contents, nil)
AIns(::Contents, 1)
::Contents[1] := {cIdent, cString}
endif
else
cFind := lower(cSection)
if (i := AScan( ::Contents, {|x| valtype(x[1]) == 'C' .and. lower(x[1]) == cFind .and. ValType(x[2]) == 'A'})) > 0
cFind := lower(cIdent)
j := AScan( ::Contents[i][2], {|x| valtype(x[1]) == 'C' .and. lower(x[1]) == cFind} )
if j > 0
::Contents[i][2][j][2] := cString
else
AAdd( ::Contents[i][2], {cIdent, cString} )
endif
else
AAdd( ::Contents, {cSection, {{cIdent, cString}}} )
endif
endif
return
static function ReadNumber(cSection, cIdent, nDefault)
local Self := QSelf()
return Val( ::ReadString(cSection, cIdent, str(nDefault)) )
static procedure WriteNumber(cSection, cIdent, nNumber)
local Self := QSelf()
::WriteString( cSection, cIdent, alltrim(str(nNumber)) )
return
static function ReadDate(cSection, cIdent, dDefault)
local Self := QSelf()
return SToD( ::ReadString(cSection, cIdent, DToS(dDefault)) )
static procedure WriteDate(cSection, cIdent, dDate)
local Self := QSelf()
::WriteString( cSection, cIdent, DToS(dDate) )
return
static function ReadBool(cSection, cIdent, lDefault)
local Self := QSelf()
local cDefault := Iif( lDefault, '.t.', '.f.' )
return ::ReadString(cSection, cIdent, cDefault) == '.t.'
static procedure WriteBool(cSection, cIdent, lBool)
local Self := QSelf()
::WriteString( cSection, cIdent, Iif(lBool, '.t.', '.f.') )
return
static procedure DeleteKey(cSection, cIdent)
local Self := QSelf()
local i, j
cSection := lower(cSection)
i := AScan( ::Contents, {|x| valtype(x[1]) == 'C' .and. lower(x[1]) == cSection} )
if i > 0
cIdent := lower(cIdent)
j := AScan( ::Contents[i][2], {|x| valtype(x[1]) == 'C' .and. lower(x[1]) == cIdent} )
ADel( ::Contents[i][2], j )
ASize( ::Contents[i][2], Len(::Contents[i][2]) - 1 )
endif
return
static procedure EraseSection(cSection)
local Self := QSelf()
local i
if Empty(cSection)
while (i := AScan( ::Contents, {|x| valtype(x[1]) == 'C' .and. ValType(x[2]) == 'C'})) > 0
ADel( ::Contents, i )
ASize( ::Contents, len(::Contents) - 1 )
end
else
cSection := lower(cSection)
if (i := AScan( ::Contents, {|x| valtype(x[1]) == 'C' .and. lower(x[1]) == cSection .and. ValType(x[2]) == 'A'})) > 0
ADel( ::Contents, i )
ASize( ::Contents, Len(::Contents) - 1 )
endif
endif
return
static function ReadSection(cSection)
local Self := QSelf()
local i, j, aSection := {}
if Empty(cSection)
for i := 1 to len(::Contents)
if valtype(::Contents[i][1]) == 'C' .and. valtype(::Contents[i][2]) == 'C'
aadd(aSection, ::Contents[i][1])
endif
next
else
cSection := lower(cSection)
if (i := AScan( ::Contents, {|x| valtype(x[1]) == 'C' .and. x[1] == cSection .and. ValType(x[2]) == 'A'})) > 0
for j := 1 to Len(::Contents[i][2])
if ::Contents[i][2][j][1] <> NIL
AAdd(aSection, ::Contents[i][2][j][1])
endif
next
endif
endif
return aSection
static function ReadSections()
local Self := QSelf()
local i, aSections := {}
for i := 1 to Len(::Contents)
if ValType(::Contents[i][2]) == 'A'
AAdd(aSections, ::Contents[i][1])
endif
next
return aSections
static procedure UpdateFile()
local Self := QSelf()
local i, j, hFile
hFile := fcreate(::Filename)
for i := 1 to Len(::Contents)
if ::Contents[i][1] == NIL
fwrite(hFile, ::Contents[i][2] + Chr(13) + Chr(10))
elseif ValType(::Contents[i][2]) == 'A'
fwrite(hFile, '[' + ::Contents[i][1] + ']' + Chr(13) + Chr(10))
for j := 1 to Len(::Contents[i][2])
if ::Contents[i][2][j][1] == NIL
fwrite(hFile, ::Contents[i][2][j][2] + Chr(13) + Chr(10))
else
fwrite(hFile, ::Contents[i][2][j][1] + '=' + ::Contents[i][2][j][2] + Chr(13) + Chr(10))
endif
next
fwrite(hFile, Chr(13) + Chr(10))
elseif ValType(::Contents[i][2]) == 'C'
fwrite(hFile, ::Contents[i][1] + '=' + ::Contents[i][2] + Chr(13) + Chr(10))
endif
next
fclose(hFile)
return

View File

@@ -1,389 +0,0 @@
/*
* $Id$
*/
/*
*
* TestCGI.PRG
* Harbour Test of a CGI/HTML-Generator class.
*
* 1999/05/30 First implementation.
*
* Tips: - Use ShowResults to make dynamic html (to test dynamic
* results, put the exe file on CGI-BIN dir or equivalent);
* - Use SaveToFile to make static html page
*
* 1999/05/31 Initial CGI functionality.
* 1999/06/01 Translated %nn to correct chars.
* 1999/06/02 Dynamic TAG matching routines (inspired on Delphi).
* First attempt to convert Delphi's ISAPI dll of WebSites'
* Function List
* (See http://www.flexsys-ci.com/harbour-project/functions.htm)
* 1999/06/11 List can be viewed online at
* http://www.flexsys-ci.com/cgi-bin/testcgi.exe
* 1999/07/29 Changed qOut() calls to OutStd() calls.
*
**/
#include "cgi.ch"
#ifndef __HARBOUR__
#include "hbclip.ch"
#endif
#define IF_BUFFER 65535
FUNCTION ParseString( cString, cDelim, nRet )
LOCAL cBuf, aElem, nPosFim, nSize, i
nSize := len( cString ) - len( StrTran( cString, cDelim, '' ) ) + 1
aElem := array( nSize )
cBuf := cString
i := 1
FOR i := 1 TO nSize
nPosFim := at( cDelim, cBuf )
IF nPosFim > 0
aElem[i] := substr( cBuf, 1, nPosFim - 1 )
ELSE
aElem[i] := cBuf
ENDIF
cBuf := substr( cBuf, nPosFim + 1, len( cBuf ) )
NEXT i
RETURN( aElem[ nRet ] )
FUNCTION Hex2Dec( cHex )
LOCAL aHex := { { "0", 00 }, ;
{ "1", 01 }, ;
{ "2", 02 }, ;
{ "3", 03 }, ;
{ "4", 04 }, ;
{ "5", 05 }, ;
{ "6", 06 }, ;
{ "7", 07 }, ;
{ "8", 08 }, ;
{ "9", 09 }, ;
{ "A", 10 }, ;
{ "B", 11 }, ;
{ "C", 12 }, ;
{ "D", 13 }, ;
{ "E", 14 }, ;
{ "F", 15 } }
LOCAL nRet
LOCAL nRes
nRet := ascan( aHex, { |x| upper( x[1] ) = upper( left( cHex, 1 ) ) } )
nRes := aHex[nRet, 2] * 16
nRet := ascan( aHex, { |x| upper( x[1] ) = upper( right( cHex, 1 ) ) } )
nRes += aHex[nRet, 2]
RETURN( nRes )
/*-------------------------------------------------------------------------*/
FUNCTION THTML
STATIC oClass
IF oClass == NIL
oClass = HBClass():New( "THTML" )
oClass:AddData( "cTitle" ) // Page Title
oClass:AddData( "cBody" ) // HTML Body Handler
oClass:AddData( "cBGColor" ) // Background Color
oClass:AddData( "cLinkColor" ) // Link Color
oClass:AddData( "cvLinkColor" ) // Visited Link Color
oClass:AddData( "cContent" ) // Page Content Handler
oClass:AddData( "aCGIContents" )
oClass:AddData( "aQueryFields" )
oClass:AddData( "cHTMLFile" )
oClass:AddData( "aReplaceTags" )
oClass:AddMethod( "New", @New() ) // New Method
oClass:AddMethod( "SetTitle", @SetTitle() ) // Set Page Title
oClass:AddMethod( "AddHead", @AddHead() ) // Add <H1> Header
oClass:AddMethod( "AddLink", @AddLink() ) // Add Hyperlink
oClass:AddMethod( "AddPara", @AddPara() ) // Add Paragraph
oClass:AddMethod( "SaveToFile", @SaveToFile() ) // Saves Content to File
oClass:AddMethod( "ShowResult", @ShowResult() ) // Show Result - SEE Fcn
oClass:AddMethod( "Generate", @Generate() ) // Generate HTML
oClass:AddMethod( "SetHTMLFile",@SetHTMLFile() ) // Sets source HTML file
oClass:AddMethod( "ProcessCGI", @ProcessCGI() )
oClass:AddMethod( "GetCGIParam", @GetCGIParam() )
oClass:AddMethod( "QueryFields", @QueryFields() )
oClass:AddMethod( "AddReplaceTag", @AddReplaceTag() )
oClass:Create()
ENDIF
RETURN( oClass:Instance() )
STATIC FUNCTION New()
LOCAL Self := QSelf()
::cTitle := "Untitled"
::cBGColor := "#FFFFFF"
::cLinkColor := "#0000FF"
::cvLinkColor := "#FF0000"
::cContent := ""
::cBody := ""
::aCGIContents := {}
::aQueryFields := {}
::aReplaceTags := {}
::cHTMLFile := ""
RETURN( Self )
STATIC FUNCTION SetTitle( cTitle )
LOCAL Self := QSelf()
::cTitle := cTitle
RETURN( Self )
STATIC FUNCTION AddLink( cLinkTo, cLinkName )
LOCAL Self := QSelf()
::cBody := ::cBody + ;
"<A HREF='" + cLinkTo + "'>" + cLinkName + "</A>"
RETURN( Self )
STATIC FUNCTION AddHead( cDescr )
LOCAL Self := QSelf()
// Why this doesn't work?
// ::cBody += ...
// ???
::cBody := ::cBody + ;
"<H1>" + cDescr + "</H1>"
RETURN( NIL )
STATIC FUNCTION AddPara( cPara, cAlign )
LOCAL Self := QSelf()
::cBody := ::cBody + ;
"<P ALIGN='" + cAlign + "'>" + hb_OSNewLine() + ;
cPara + hb_OSNewLine() + ;
"</P>"
RETURN( Self )
STATIC FUNCTION Generate()
LOCAL Self := QSelf()
LOCAL cFile, i, hFile, nPos, cRes := ""
LOCAL lFlag := .f.
// Is this a meta file or hand generated script?
IF empty( ::cHTMLFile )
::cContent := ;
"<HTML><HEAD>" + hb_OSNewLine() + ;
"<TITLE>" + ::cTitle + "</TITLE>" + hb_OSNewLine() + ;
"<BODY link='" + ::cLinkColor + "' " + ;
"vlink='" + ::cvLinkColor + "'>" + + hb_OSNewLine() + ;
::cBody + hb_OSNewLine() + ;
"</BODY></HTML>"
ELSE
::cContent := ""
// Does cHTMLFile exists?
IF !File( ::cHTMLFile )
::cContent := "<H1>Server Error</H1><P><I>No such file: " + ;
::cHTMLFile
ELSE
// Read from file
hFile := fOpen( ::cHTMLFile, 0 )
cFile := space( IF_BUFFER )
DO WHILE (nPos := fRead( hFile, @cFile, IF_BUFFER )) > 0
cFile := left( cFile, nPos )
cRes += cFile
cFile := space( IF_BUFFER )
ENDDO
fClose( hFile )
// Replace matched tags
i := 1
::cContent := cRes
/* TODO: Replace this DO WHILE with FOR..NEXT */
DO WHILE i <= len( ::aReplaceTags )
::cContent := strtran( ::cContent, ;
"<#" + ::aReplaceTags[i, 1] + ">", ::aReplaceTags[i, 2] )
i++
ENDDO
/* TODO: Clear remaining (not matched) tags */
/*
cRes := ""
FOR i := 1 TO len( ::cContent )
IF substr( ::cContent, i, 1 ) == "<" .AND. ;
substr( ::cContent, i + 1, 1 ) == "#"
lFlag := .t.
ELSEIF substr( ::cContent, i, 1 ) == ">" .AND. lFlag
lFlag := .f.
ELSEIF !lFlag
cRes += substr( ::cContent, i, 1 )
ENDIF
NEXT i
::cContent := cRes
*/
ENDIF
ENDIF
RETURN( Self )
STATIC FUNCTION ShowResult()
LOCAL Self := QSelf()
OutStd( ;
"HTTP/1.0 200 OK" + hb_OSNewLine() + ;
"CONTENT-TYPE: TEXT/HTML" + hb_OSNewLine() + hb_OSNewLine() + ;
::cContent )
RETURN( Self )
STATIC FUNCTION SaveToFile( cFile )
LOCAL Self := QSelf()
LOCAL hFile := fCreate( cFile )
fWrite( hFile, ::cContent )
fClose( hFile )
RETURN( Self )
STATIC FUNCTION ProcessCGI()
LOCAL Self := QSelf()
LOCAL cQuery := ""
LOCAL cBuff := ""
LOCAL nBuff := 0
LOCAL i
IF empty( ::aCGIContents )
::aCGIContents := { ;
GetEnv( "SERVER_SOFTWARE" ), ;
GetEnv( "SERVER_NAME" ), ;
GetEnv( "GATEWAY_INTERFACE" ), ;
GetEnv( "SERVER_PROTOCOL" ), ;
GetEnv( "SERVER_PORT" ), ;
GetEnv( "REQUEST_METHOD" ), ;
GetEnv( "HTTP_ACCEPT" ), ;
GetEnv( "HTTP_USER_AGENT" ), ;
GetEnv( "HTTP_REFERER" ), ;
GetEnv( "PATH_INFO" ), ;
GetEnv( "PATH_TRANSLATED" ), ;
GetEnv( "SCRIPT_NAME" ), ;
GetEnv( "QUERY_STRING" ), ;
GetEnv( "REMOTE_HOST" ), ;
GetEnv( "REMOTE_ADDR" ), ;
GetEnv( "REMOTE_USER" ), ;
GetEnv( "AUTH_TYPE" ), ;
GetEnv( "CONTENT_TYPE" ), ;
GetEnv( "CONTENT_LENGTH" ), ;
GetEnv( "ANNOTATION_SERVER" ) ;
}
cQuery := ::GetCGIParam( CGI_QUERY_STRING )
IF !empty( cQuery )
::aQueryFields := {}
FOR i := 1 TO len( cQuery ) + 1
IF i > len( cQuery ) .OR. substr( cQuery, i, 1 ) == "&"
aadd( ::aQueryFields, ;
{ substr( cBuff, 1, at( "=", cBuff ) - 1 ), ;
strtran( substr( cBuff, at( "=", cBuff ) + 1, ;
len( cBuff ) - at( "=", cBuff ) + 1 ), "+", " " ) } )
cBuff := ""
ELSE
IF substr( cQuery, i, 1 ) = "%"
cBuff += chr( Hex2Dec( substr( cQuery, i + 1, 2 ) ) )
nBuff := 3
ENDIF
IF nBuff = 0
cBuff += substr( cQuery, i, 1 )
ELSE
nBuff--
ENDIF
ENDIF
NEXT
ENDIF
ENDIF
RETURN( Self )
STATIC FUNCTION GetCGIParam( nParam )
LOCAL Self := QSelf()
::ProcessCGI()
IF nParam > 20 .OR. nParam < 1
outerr( "Invalid CGI parameter" )
RETURN( NIL )
ENDIF
RETURN( ::aCGIContents[nParam] )
STATIC FUNCTION QueryFields( cQueryName )
LOCAL Self := QSelf()
LOCAL cRet := ""
LOCAL nRet
::ProcessCGI()
nRet := aScan( ::aQueryFields, ;
{ |x| upper( x[1] ) = upper( cQueryName ) } )
IF nRet > 0
cRet := ::aQueryFields[nRet, 2]
ENDIF
RETURN( cRet )
STATIC FUNCTION SetHTMLFile( cFile )
LOCAL Self := QSelf()
::cHTMLFile := cFile
RETURN( Self )
STATIC FUNCTION AddReplaceTag( cTag, cReplaceText )
LOCAL Self := QSelf()
aAdd( ::aReplaceTags, { cTag, cReplaceText } )
RETURN( Self )

View File

@@ -1,28 +0,0 @@
#
# $Id$
#
ROOT = ../../../
PRG_SOURCES=\
hscript.prg \
PRG_MAIN=hscript.prg
LIBS=\
hbdebug \
hbvm \
hbrtl \
hblang \
hbrdd \
hbrtl \
hbvm \
hbmacro \
hbpp \
rddntx \
rddcdx \
rddfpt \
hbsix \
hbcommon \
include $(TOP)$(ROOT)config/bin.cf

View File

@@ -1,28 +0,0 @@
@echo off
rem
rem $Id$
rem
rem NOTE: This sample program needs hbnf.lib from contrib/hbnf
..\..\..\bin\harbour hscript /n /i..\..\..\include
bcc32 -O2 -I..\..\..\include -L..\..\..\lib -ehscript.exe hscript.c hbdebug.lib hbvm.lib hbrtl.lib gtwin.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddntx.lib rddcdx.lib rddfpt.lib hbcpage.lib hbsix.lib hbcommon.lib hbpcre.lib hbhsx.lib hbnf.lib hbzlib.lib
del hscript.c
if not exist hscript.exe goto :EXIT
hscript dir.hs > dir.htm
hscript hello.hs > hello.htm
hscript multiply.hs > multiply.htm
hscript ugly.hs > ugly.htm
echo Ready to go!
echo.
echo Try:
echo.
echo start dir.htm
echo start hello.htm
echo start multiply.htm
echo start ugly.htm
:EXIT

View File

@@ -1,32 +0,0 @@
// CGI.ch
//+
// Harbour project
//
//
// 99.05.31 initial posting.
//
//
//-
#define CGI_SERVER_SOFTWARE 01
#define CGI_SERVER_NAME 02
#define CGI_GATEWAY_INTERFACE 03
#define CGI_SERVER_PROTOCOL 04
#define CGI_SERVER_PORT 05
#define CGI_REQUEST_METHOD 06
#define CGI_HTTP_ACCEPT 07
#define CGI_HTTP_USER_AGENT 08
#define CGI_HTTP_REFERER 09
#define CGI_PATH_INFO 10
#define CGI_PATH_TRANSLATED 11
#define CGI_SCRIPT_NAME 12
#define CGI_QUERY_STRING 13
#define CGI_REMOTE_HOST 14
#define CGI_REMOTE_ADDR 15
#define CGI_REMOTE_USER 16
#define CGI_AUTH_TYPE 17
#define CGI_CONTENT_TYPE 18
#define CGI_CONTENT_LENGTH 19
#define CGI_ANNOTATION_SERVER 20

View File

@@ -1,50 +0,0 @@
<%
/*
* Written by Felipe Coury <fcoury@flexsys-ci.com>
* www - http://www.harbour-project.org
*
*/
FUNCTION Start()
LOCAL aDir := Directory( "*.*" )
LOCAL i
IF !Empty( GetEnv( "SERVER_NAME" ) )
OutStd( "HTTP/1.0 200 OK" + chr(10) )
OutStd( "CONTENT-TYPE: TEXT/HTML" + chr(10) + chr(10) )
ENDIF
ASort( aDir,,, { |x, y| x[1] < y[1] } )
%>
<HTML>
<HEAD><TITLE>dir.hs - HarourScript demo of active context</TITLE></HEAD>
<BODY>
<TABLE border=1>
<TR>
<TD><B>File Name</B></TD>
<TD><B>Size</B></TD>
<TD><B>Date</B></TD>
<TD><B>Time</B></TD>
<TD><B>Attributes</B></TD>
</TR>
<%
FOR i := 1 TO Len( aDir )
%>
<TR>
<TD><% OutStd( aDir[i,1] ) %></TD>
<TD><% OutStd( aDir[i,2] ) %></TD>
<TD><% OutStd( aDir[i,3] ) %></TD>
<TD><% OutStd( aDir[i,4] ) %></TD>
<TD><% OutStd( aDir[i,5] ) %></TD>
</TR>
<%
NEXT
%>
</TABLE>
</BODY>
</HTML>
<%
RETURN( NIL )
%>

View File

@@ -1,40 +0,0 @@
<%
/*
*
* hello.hs
* Famous "Hello World"!
*
* Written by Felipe Coury <fcoury@flexsys-ci.com>
* www - http://www.harbour-project.org
*
*/
FUNCTION Start()
// Add content-type parameter if using active page on a Web Server
IF !empty( GetEnv( "SERVER_NAME" ) )
OutStd( "HTTP/1.0 200 OK" + chr(10) )
OutStd( "CONTENT-TYPE: TEXT/HTML" + chr(10) + chr(10) )
ENDIF
%>
<HTML>
<HEAD>
<TITLE>Hello world!</TITLE>
</HEAD>
<BODY>
<%
// Now saying hello to the world in 3 different ways:
// 1. Pure harbour:
OutStd( "<H1>Hello world!</H1></P>" )
// 2. Hybrid harbour-html:
%>
<H1><% OutStd( "Hello world!" ) %></H1></P>
<%
// 3. Pure html:
%>
<H1>Hello world!</H1></P>
</BODY>
</HTML>

View File

@@ -1,224 +0,0 @@
/*
* $Id$
*/
/*
* HScript.PRG
* HarbourScript translation engine
*
*
* Copyright (C) 1999 Felipe Coury <fcoury@creation.com.br>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
* 1999/06/13 First implementation.
* 1999/06/24 Enhanced tag matching routines.
* 1999/07/26 Corrections to CGI output, QOut() -> OutStd().
*
*/
#include "hbextern.ch"
#include "cgi.ch"
#define IF_BUFFER 65535
FUNCTION Main( cScript )
LOCAL aHRSHandle := {} // Handle for script lines
LOCAL aResult := {} // Handle for transl'd lines
LOCAL cLocation // Location of scripts
LOCAL cHarbourDir := GetEnv( "HARBOURDIR" ) // Harbour.exe dir with '\'
LOCAL cHost := StrTran( alltrim( ; // Random (not et al)
Str( Seconds() ) ), '.' ) // file name
LOCAL cScriptName, cFile, cLine, cTrans, c
LOCAL hFile, i, lOpen, nLen
WHILE .T.
IF Empty( GetEnv( "SERVER_NAME" ) )
cScriptName := cScript
cLocation := cHarbourDir
ELSE
cScriptName := GetEnv( "QUERY_STRING" )
IF At( "=", cScriptName ) != 0
cScriptName := ParseString( cScriptName, "=", 2 )
ENDIF
cLocation := GetEnv( "PATH_TRANSLATED" ) + ;
StrTran( GetEnv( "SCRIPT_NAME" ), "/", "\" )
cLocation := SubStr( cLocation, 1, RAt( "\", cLocation ) )
cHarbourDir := cLocation
ENDIF
IF Empty( cScriptName )
IF !Empty( GetEnv( "SERVER_NAME" ) )
OutStd( "content-type: text/html" + hb_OSNewLine() )
OutStd( hb_OSNewLine() )
OutStd( "<HTML><BODY><H1>Server Error</H1><P>" + hb_OSNewLine() )
OutStd( "Must specify scriptname using hscript.exe?script=<scriptname>" + hb_OSNewLine() )
OutStd( "</BODY></HTML>" + hb_OSNewLine() )
ELSE
OutStd( "Please give .hs name" + hb_OSNewLine() )
ENDIF
EXIT
ENDIF
// Script not found
IF !File( cScriptName )
IF !Empty( GetEnv( "SERVER_NAME" ) )
OutStd( "CONTENT-TYPE: text/html" + hb_OSNewLine() )
ENDIF
OutStd( "<H1>Server Error</H1><P>Script not found: " + cScriptName + hb_OSNewLine() )
EXIT
ENDIF
lOpen := .f.
ft_FUse( cScriptName )
WHILE !ft_FEof()
cLine := AllTrim( ft_FReadLn() )
cTrans := ""
nLen := Len( cLine )
IF lOpen
cTrans += "OutStd( '"
ENDIF
FOR i := 1 TO nLen
c := SubStr( cLine, i, 1 )
IF c = "%" .AND. substr( cLine, i + 1, 1 ) = ">"
IF lOpen
// Error - Already in htm mode
ELSE
// Abre script
IF i > 1
//cTrans += " ; "
cTrans += hb_OSNewLine()
ENDIF
IF i + 1 < nLen
cTrans += "OutStd( '"
ENDIF
lOpen := .t.
ENDIF
i++
ELSEIF c = "<" .AND. substr( cLine, i + 1, 1 ) = "%"
IF !lOpen
// Error - Not in htm mode
ELSE
// Fecha script
cTrans += "' + chr(10) )"
lOpen := .f.
IF i < nLen
// cTrans += " ; "
cTrans += hb_OSNewLine()
ENDIF
ENDIF
i++
ELSE
cTrans += c
ENDIF
NEXT
IF lOpen .AND. substr( cLine, nLen - 1, 2 ) <> "%>"
cTrans += "' + chr(10) )"
ENDIF
AAdd( aResult, cTrans )
ft_FSkip()
ENDDO
ft_FUse()
cFile := cLocation + cHost + ".prg" // Output file name
hFile := FCreate( cFile )
FOR i := 1 TO Len( aResult )
FWrite( hFile, aResult[i] + hb_OSNewLine() )
NEXT
FClose( hFile )
// Creates the temporary HRB, erases the PRG
__Run( cHarbourDir + "harbour.exe " + cFile + " /q /n /gh /o" + Left( cHarbourDir, Len( cHarbourDir ) - 1 ) + iif( !Empty( Left( cHarbourDir, Len( cHarbourDir ) - 1 ) ), "\", "" ) )
FErase( cFile )
// Runs using Tugboat
cFile := StrTran( Upper( cFile ), ".PRG", ".hrb" )
__hrbRun( cFile )
// Erases the HRB file
FErase( cFile )
// That's all, folks!
EXIT
ENDDO
RETURN NIL
FUNCTION ParseString( cString, cDelim, nRet )
LOCAL cBuf, aElem, nPosFim, nSize, i
nSize := len( cString ) - len( StrTran( cString, cDelim, '' ) ) + 1
aElem := array( nSize )
cBuf := cString
i := 1
FOR i := 1 TO nSize
nPosFim := at( cDelim, cBuf )
IF nPosFim > 0
aElem[i] := substr( cBuf, 1, nPosFim - 1 )
ELSE
aElem[i] := cBuf
ENDIF
cBuf := substr( cBuf, nPosFim + 1, len( cBuf ) )
NEXT i
RETURN( aElem[ nRet ] )

View File

@@ -1,51 +0,0 @@
<%
/*
*
* multiply.hs
* HarbourScript Test
*
* Written by Felipe Coury <fcoury@flexsys-ci.com>
* www - http://www.harbour-project.org
*
*/
FUNCTION Start()
LOCAL i, j
IF !empty( GetEnv( "SERVER_NAME" ) )
OutStd( "HTTP/1.0 200 OK" + chr(10) )
OutStd( "CONTENT-TYPE: TEXT/HTML" + chr(10) + chr(10) )
ENDIF
%>
<HTML>
<HEAD>
<TITLE>Testing script</TITLE>
</HEAD>
<H1><% OutStd( "HarbourScript Test!" ) %></H1>
<BODY>
<%
FOR i := 1 TO 10
%>
<TABLE border=1>
<TR>
<%
FOR j := 1 TO 10
%>
<TR>
<TD><% OutStd( str( i, 2 ) + " x " + str( j, 2 ) ) %></TD>
<TD><% OutStd( i*j ) %></TD>
</TR>
<%
NEXT
%>
</TABLE>
<BR>
<%
NEXT
%>
</BODY>
</HTML>

View File

@@ -1,85 +0,0 @@
WARNING
-------
This document has serious bugs related to English Language.
I take no responsabilities for any misinformation in any form.
<GG>
HarbourScript Alfa Edition
--------------------------
Inside this zip file you will find HarbourScript package. This
should be unzipped to TESTS\WORKING\HSCRIPT directory in order
to work w/o any changes.
To make the HarbourScript Translator, hscript.exe, use MAKEHS.BAT.
If you are going to test offline, there's no need to make it,
it will be done automatically for you (Batch Power<g>). To test it,
you'll have the following options:
Testing HarbourScript using MS-Personal Web Server
--------------------------------------------------
(and maybe IIS 3.0+ too!)
1. Copy hscript.exe and harbour.exe to your cgi-bin directory
(or any other with Scripting allowed)
2. Copy all the scripts that you want to the same directory
3. You can now test Harbour Script using
http://localhost/cgi-bin/hscript?script=<script>.hs
Note: The hscript.exe program still locks the server sometimes.
This is due to external compilation of the resulting code. As
soon as we start to use macro substitution instead, this will
become more stable.
Testing HarbourScript without a Web Server
------------------------------------------
1. Make the sample scripts with MAKEHTM.
2. Browse the resulting .htm files as reported on screen.
How do this thing work?
-----------------------
Well, the HS (HarbourScript) tecnology is based on the ASP
(Active Server Pages) concept and someway in new Oracle 8i's
too.
A .hs page is like any normal HTML page with Special Tags and
Embedded Code. Those tags are: <% (Start Scripting) and %>
(End Scripting). Once you run this script, the HS translator
translates the Embedded Code into true Harbour Code and executes
it. In other words, you write your PRGs INSIDE your web pages.
This concept is called active content.
Known bugs
----------
- Web Server hanging some times (see above);
Open questions
--------------
Things not working due to lack of knowledge (if you know how
to do any of this things, leave a message on Harbour List with
subject HS Open questions, thanks! ;) ):
- How to associate .hs with hscript.exe safely in PWS and IIS.
I associated it using the Registry Key HKEY_LOCAL_MACHINE\System\>
CurrentControlSet\Services\W3SVC\Parameters\Script Map but
whenever I call the script I get a Server Error 500 without any
further explanation.
Felipe G. Coury
fcoury@flexsys-ci.com

View File

@@ -1,16 +0,0 @@
<% FUNCTION Start()
/* Written by Felipe Coury <fcoury@flexsys-ci.com>
* www - http://www.harbour-project.org
*
*/
LOCAL a := "Hello Mom!" %><HTML><BODY><%
OutStd( a ) %><P>This is a <B>very ugly</B> script!!!<%
OutStd( "Line 2" )
%>
<P>
<%
OutStd( a, a, a )
%>
</HTML><%RETURN( NIL )%>

View File

@@ -1,52 +0,0 @@
#
# $Id$
#
ROOT = ../../../
LIBS=\
hbdebug \
hbvm \
hbrtl \
hblang \
hbrdd \
hbrtl \
hbvm \
hbmacro \
hbpp \
rddntx \
rddcdx \
rddfpt \
hbsix \
hbcommon \
ifeq ($(PM),)
PM := $(pm)
endif
ifeq ($(PM),) # PM not defined = build all files
PRG_SOURCES=\
guess.prg \
mankala.prg \
PRG_HEADERS=\
C_SOURCES=\
C_HEADERS=\
include $(TOP)$(ROOT)config/test.cf
else #PM defined = build specified file
ifneq ($(findstring .prg,$(PM)),)
PRG_MAIN := $(PM)
else
ifneq ($(findstring .PRG,$(PM)),)
PRG_MAIN := $(PM)
else
PRG_MAIN := $(PM).prg
endif
endif
include $(TOP)$(ROOT)config/bin.cf
endif

Some files were not shown because too many files have changed in this diff Show More