2008-10-10 10:42 UTC+0200 Viktor Szakats (harbour.01 syenar hu)

* make_b32.mak
  * make_vc.mak
  * make_gcc.mak
    * Removed special 'set HB_GT_LIB=gtXXX' support. For the exact 
      same effect - in case you want to modify default GT at 
      build time, which is not recommended -, pls use this:
      'set C_USR=-DHB_GT_LIB=XXX' where XXX is 'wvt', 'std', etc.
    - Removed HARBOURFLAGSDLL, LDFLAGSDLL, CFLAGSDLL as public options. 
      It's better to keep these settings common IMO, and handle 
      all DLL subtleties in our make files.
    + L_USR is now respected for .dlls, too.
    ! Fixed make_gcc.mak internal HARBOURFLAGSDLL to be in sync 
      with the other .mak files (removed -l switch).
    - Removed HB_BUILD_MODE for VC builds. Now C/C++ is left to 
      the default value (which is C mode for core), and it's possible 
      to override using:
      'set C_USR=-TP' for C++ mode (or -TC for forced C mode).
    % Other minor cleanups.

  * contrib/mtpl_b32.mak
  * contrib/mtpl_vc.mak
    - Removed HB_BUILD_MODE undocumented options from contrib 
      make files. For Borland C++ mode, use 'set C_USR=-P'.
      For VC, see above.
    - Removed HB_BUILD_ST undocumented option.
    % Other minor cleanups.
      
  * contrib/xhb/hbcompat.ch
  * contrib/xhb/xhb.ch
    ! Moved __COPYFILE() translation to xhb.ch.
This commit is contained in:
Viktor Szakats
2008-10-10 08:47:25 +00:00
parent 0e119bdb15
commit ed8bb45de8
8 changed files with 70 additions and 124 deletions

View File

@@ -8,6 +8,38 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2008-10-10 10:42 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* make_b32.mak
* make_vc.mak
* make_gcc.mak
* Removed special 'set HB_GT_LIB=gtXXX' support. For the exact
same effect - in case you want to modify default GT at
build time, which is not recommended -, pls use this:
'set C_USR=-DHB_GT_LIB=XXX' where XXX is 'wvt', 'std', etc.
- Removed HARBOURFLAGSDLL, LDFLAGSDLL, CFLAGSDLL as public options.
It's better to keep these settings common IMO, and handle
all DLL subtleties in our make files.
+ L_USR is now respected for .dlls, too.
! Fixed make_gcc.mak internal HARBOURFLAGSDLL to be in sync
with the other .mak files (removed -l switch).
- Removed HB_BUILD_MODE for VC builds. Now C/C++ is left to
the default value (which is C mode for core), and it's possible
to override using:
'set C_USR=-TP' for C++ mode (or -TC for forced C mode).
% Other minor cleanups.
* contrib/mtpl_b32.mak
* contrib/mtpl_vc.mak
- Removed HB_BUILD_MODE undocumented options from contrib
make files. For Borland C++ mode, use 'set C_USR=-P'.
For VC, see above.
- Removed HB_BUILD_ST undocumented option.
% Other minor cleanups.
* contrib/xhb/hbcompat.ch
* contrib/xhb/xhb.ch
! Moved __COPYFILE() translation to xhb.ch.
2008-10-10 09:41 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* common.mak
* make_b32.mak

View File

@@ -105,23 +105,7 @@ MKLIB = tlib.exe
#**********************************************************
# BORLAND has ST mode as default
!if "$(HB_BUILD_ST)" == ""
HB_BUILD_ST = yes
!endif
#**********************************************************
# In which mode compile Harbour C or CPP
!if "$(HB_BUILD_MODE)" == "cpp"
HB_BUILD_MODE = -P
!else
HB_BUILD_MODE =
!endif
#**********************************************************
CFLAGS = -I$(INCLUDE_DIR) $(C_USR) $(CFLAGS) $(HB_BUILD_MODE)
CFLAGS = -I$(INCLUDE_DIR) $(C_USR) $(CFLAGS)
#-----------
!if "$(HB_BUILD_DEBUG)" == "yes"
@@ -132,10 +116,6 @@ CFLAGS = -I$(INCLUDE_DIR) $(C_USR) $(CFLAGS) $(HB_BUILD_MODE)
CFLAGS = -O2 -OS -Ov -Oi -Oc $(CFLAGS)
!endif
#-----------
!if "$(HB_BUILD_ST)" != "yes"
CFLAGS = -tWM $(CFLAGS)
!endif
#-----------
#**********************************************************

View File

@@ -102,15 +102,6 @@ MKLIB = lib.exe
#**********************************************************
# In which mode compile Harbour C or CPP
!if "$(HB_BUILD_MODE)" == "cpp"
HB_BUILD_MODE = P
!else
HB_BUILD_MODE = C
!endif
#**********************************************************
# Visual C++ version
!ifndef HB_VISUALC_VER
HB_VISUALC_VER = 80
@@ -124,17 +115,12 @@ CFLAGS_VER = -Ogt2yb1p -GX- -G6 -YX
!endif
#-----------
CFLAGS = -nologo -W4 -wd4127 -Gs -I$(INCLUDE_DIR) $(CFLAGS_VER) -T$(HB_BUILD_MODE) \
CFLAGS = -nologo -W4 -wd4127 -Gs -I$(INCLUDE_DIR) $(CFLAGS_VER) \
$(C_USR) $(CFLAGS)
#-----------
!if "$(HB_BUILD_DEBUG)" == "yes"
CFLAGS = -Zi $(CFLAGS)
DBGMARKER = d
!endif
#-----------
!if "$(HB_BUILD_ST)" != "yes"
CFLAGS = -MT$(DBGMARKER) $(CFLAGS)
!endif
#-----------

View File

@@ -115,8 +115,6 @@
#xtranslate hb_IniRead([<x,...>]) => hb_ReadIni(<x>)
#xtranslate hb_IniWrite([<x,...>]) => hb_WriteIni(<x>)
#xtranslate xhb_CopyFile([<x,...>]) => __CopyFile(<x>)
/* Some statement endings */
#xcommand ENDSEQUENCE => END
#xcommand ENDSWITCH => END
@@ -194,8 +192,6 @@
#xtranslate hb_ReadIni([<x,...>]) => hb_IniRead(<x>)
#xtranslate hb_WriteIni([<x,...>]) => hb_IniWrite(<x>)
#xtranslate __CopyFile([<x,...>]) => xhb_CopyFile(<x>)
#xtranslate Str(<x>,[<y>],[<y>],<z>)=> iif(<z>, LTrim(Str(<x>)), Str(<x>))
#xtranslate hb_CMDARGARGV([<x,...>])=> hb_ARGV(0)

View File

@@ -62,6 +62,7 @@
REQUEST XHB_LIB
#xtranslate __Keyboard([<x,...>]) => xhb__Keyboard(<x>)
#xtranslate __CopyFile([<x,...>]) => xhb_CopyFile(<x>)
#endif
#endif /* __HARBOUR__ */

View File

@@ -22,16 +22,9 @@
# (note that these are all optional)
#
# C_USR - Extra C compiler options for libraries and for executables
# CLIBFLAGSDLL - Extra C compiler options for the shared libraries
#
# L_USR - Extra linker options for the static libraries
# LDFLAGSDLL - Extra linker options for the shared libraries
#
# L_USR - Extra linker options for libraries
# PRG_USR - Extra Harbour compiler options
# HARBOURFLAGSDLL - Extra Harbour compiler options for shared libraries
#
# HB_GT_LIB - The default GT driver, choose between:
# gtwin (default), gtcgi, gtwvt, gtstd, gtpca
# HB_BUILD_DLL - If set to yes enables building harbour VM+RTL
# dll in addition to normal static build
# HB_BUILD_DEBUG - If set to yes causes to compile with debug info
@@ -39,9 +32,9 @@
# HB_REBUILD_PARSER - If set to yes force preprocessing new rules by
# bison (you must use bison 2.3 or later)
# HB_INSTALL_PREFIX - Path to installation directory into which
# Harbour will be installed when the command
# "make_bc.bat install" is lauched. Defaults
# to current directory
# Harbour will be installed when using 'install'
# mode. Defaults to current directory
#
# HB_BCCDLL_DYNRT - If set to -tWR causes that harbour-bc.dll
# will use dynamic runtime library (recommended)
@@ -107,29 +100,25 @@ CFLAGSMT = -DHB_MT_VM
RTLIBSUFFIX = i
!endif
#-----------
!if "$(HB_GT_LIB)" != ""
CFLAGS = -DHB_GT_LIB=$(HB_GT_LIB:gt=) $(CFLAGS)
!endif
#-----------
#**********************************************************
CLIBFLAGS = -c -q -d -Q -w -w-sig- -tWM $(CFLAGS)
CLIBFLAGSDLL = $(HB_BCCDLL_DYNRT) $(CLIBFLAGSDLL) -DHB_DYNLIB
CEXEFLAGSDLL = $(HB_BCCDLL_DYNRT) $(CEXEFLAGSDLL)
CLIBFLAGSDLL = $(HB_BCCDLL_DYNRT) $(CLIBFLAGS) -DHB_DYNLIB
CEXEFLAGSDLL = $(HB_BCCDLL_DYNRT) $(CLIBFLAGS)
#**********************************************************
# Harbour Compiler Flags
HBFLAGSCMN = -i$(INCLUDE_DIR) -q0 -w3 -es2 -km $(PRG_USR)
HARBOURFLAGS = -n $(HBFLAGSCMN)
HARBOURFLAGSDLL= -n1 $(HBFLAGSCMN) $(HARBOURFLAGSDLL)
HARBOURFLAGSDLL= -n1 $(HBFLAGSCMN)
#**********************************************************
# Linker Flags
LDFLAGS = -Gn -C -ap -Tpe -L$(LIB_DIR) -L$(BIN_DIR) $(L_USR)
LDFLAGSDLL = -Gn -C -aa -Tpd -Gi -L$(LIB_DIR) $(LDFLAGSDLL)
LDFLAGSDLL = -Gn -C -aa -Tpd -Gi -L$(LIB_DIR) $(L_USR)
!if "$(HB_BUILD_DEBUG)" == "yes"
LDFLAGS = -v $(LDFLAGS)
LDFLAGSDLL = -v $(LDFLAGSDLL)
@@ -193,7 +182,7 @@ ARFLAGS = /P32 $(A_USR)
# General *.prg --> *.obj COMPILE rules for EXECUTABLES,
# which use Harbour SHARED Library compiled as DLL
{$(ALL_EXE_SRC_DIRS)}.prg{$(DLL_OBJ_DIR)}$(OBJEXT):
$(HB) $(HARBOURFLAGS) -o$(DLL_OBJ_DIR)\ $**
$(HB) $(HARBOURFLAGS) -o$(DLL_OBJ_DIR)\ $**
$(CC) $(CEXEFLAGSDLL) -o$@ $(DLL_OBJ_DIR)\$&.c
#**********************************************************

View File

@@ -22,32 +22,23 @@
# (note that these are all optional)
#
# C_USR - Extra C compiler options for libraries and for executables
# CLIBFLAGSDLL - Extra C compiler options for the shared libraries
#
# L_USR - Extra linker options for the static libraries
# LDFLAGSDLL - Extra linker options for the shared libraries
#
# L_USR - Extra linker options for libraries
# PRG_USR - Extra Harbour compiler options
# HARBOURFLAGSDLL - Extra Harbour compiler options for shared libraries
#
# HB_GT_LIB - The default GT driver, choose between:
# gttrm (default), gtcgi, gtpca, gtcrs, gtsln, gtxwc
# HB_GPM_MOUSE - If set to yes enables using GPM mouse driver on console
# HB_WITHOUT_GTSLN - If set to yes causes to not build gtsln
# (if you don't have slang installed)
#
# HB_COMMERCE - If set to yes disables pure GNU modules (slang,GPM,...)
# HB_BUILD_DLL - If set to yes enables building harbour VM+RTL
# dll in addition to normal static build (currently not working)
# HB_BUILD_DEBUG - If set to yes causes to compile with debug info
# HB_BUILD_VERBOSE - enables echoing commands being executed
# HB_REBUILD_PARSER - If set to yes force preprocessing new rules by
# bison (you must use bison 2.3 or later)
#
# HB_INSTALL_PREFIX - Path to installation directory into which
# Harbour will be installed when the command
# "make_gcc.bat install" is lauched. Defaults
# to current directory
# Harbour will be installed when using 'install'
# mode. Defaults to current directory
#
# HB_GPM_MOUSE - If set to yes enables using GPM mouse driver on console
# HB_WITHOUT_GTSLN - If set to yes causes to not build gtsln
# (if you don't have slang installed)
# HB_COMMERCE - If set to yes disables pure GNU modules (slang,GPM,...)
# ---------------------------------------------------------------
@@ -169,13 +160,9 @@ ifeq ($(HB_BUILD_DEBUG),yes)
CFLAGS := -g $(CFLAGS)
endif
#-----------
ifneq ($(HB_GT_LIB),)
CFLAGS += -DHB_GT_LIB=$(HB_GT_LIB:gt%=%)
endif
#-----------
CLIBFLAGS := -c $(CFLAGS)
CLIBFLAGSDLL := -DHB_DYNLIB $(CLIBFLAGS) $(CLIBFLAGSDLL)
CEXEFLAGSDLL := $(CFLAGS) $(CEXEFLAGSDLL)
CLIBFLAGSDLL := $(CLIBFLAGS) -DHB_DYNLIB
CEXEFLAGSDLL := $(CFLAGS)
# Under architectures other than "DOS based" add -fPIC
# to gcc compiler flags for compiling shared libraries
@@ -191,7 +178,7 @@ endif
HBFLAGSCMN := -i$(INCLUDE_DIR) -q0 -w3 -es2 -km $(PRG_USR)
HARBOURFLAGS := -n $(HBFLAGSCMN)
HARBOURFLAGSDLL:= -n1 -l $(HBFLAGSCMN) $(HARBOURFLAGSDLL)
HARBOURFLAGSDLL:= -n1 $(HBFLAGSCMN)
#**********************************************************
# Linker Flags
@@ -228,7 +215,7 @@ LDFLAGS += $(STANDARD_STATIC_HBLIBS) $(HB_OS_LIBS)
#LDFLAGS += $(RTL_LIB) $(VM_LIB)
endif
LDFLAGSDLL := -shared $(L_USR) -L$(LIB_DIR) $(LDFLAGSDLL)
LDFLAGSDLL := -shared $(L_USR) -L$(LIB_DIR)
#**********************************************************
# Library manager Flags

View File

@@ -22,30 +22,22 @@
# (note that these are all optional)
#
# C_USR - Extra C compiler options for libraries and for executables
# CLIBFLAGSDLL - Extra C compiler options for the shared libraries
#
# L_USR - Extra linker options for the static libraries
# LDFLAGSDLL - Extra linker options for the shared libraries
#
# L_USR - Extra linker options for libraries
# PRG_USR - Extra Harbour compiler options
# HARBOURFLAGSDLL - Extra Harbour compiler options for shared libraries
#
# HB_GT_LIB - The default GT driver, choose between:
# gtwin (default), gtcgi, gtwvt, gtstd, gtpca
# HB_BUILD_DLL - If set to yes enables building harbour VM+RTL
# dll in addition to normal static build
# HB_BUILD_MODE - If set to cpp causes to compile in C++ mode
# HB_BUILD_WINCE - If set to yes, a WinCE build will be created.
# HB_BUILD_DEBUG - If set to yes causes to compile with debug info
# HB_BUILD_VERBOSE - enables echoing commands being executed
# HB_REBUILD_PARSER - If set to yes force preprocessing new rules by
# bison (you must use bison 2.3 or later)
# HB_INSTALL_PREFIX - Path to installation directory into which
# Harbour will be installed when the command
# "make_vc.bat install" is lauched. Defaults
# to current directory
# Harbour will be installed when using 'install'
# mode. Defaults to current directory
#
# HB_VISUALC_VER - Version of Visual C++ compiler.
# Possible values are: 60, 70, 71, 80 (default), 90
# HB_BUILD_WINCE - If set to yes, a WinCE build will be created.
#**********************************************************
@@ -108,15 +100,6 @@ INCLUDE_DIR = include
#**********************************************************
# In which mode compile Harbour C or CPP
!if "$(HB_BUILD_MODE)" == "cpp"
HB_BUILD_MODE = P
!else
HB_BUILD_MODE = C
!endif
#**********************************************************
# C Compiler Flags
!if "$(HB_BUILD_WINCE)" == "yes"
@@ -128,7 +111,7 @@ CFLAGS_VER = -Oxsb1 -EHsc -YX -GF
# TOFIX: These should be cleaned from everything not absolutely necessary:
CFLAGS = -nologo -W3 -I$(INCLUDE_DIR) -I$(CFLAGS_VER) -T$(HB_BUILD_MODE) \
CFLAGS = -nologo -W3 -I$(INCLUDE_DIR) -I$(CFLAGS_VER) \
-D"_WIN32_WCE=0x420" -D"UNDER_CE=0x420" -D"WIN32_PLATFORM_PSPC" \
-D"WINCE" -D"_WINCE" -D"_WINDOWS" -D"ARM" -D"_ARM_" -D"ARMV4" \
-D"POCKETPC2003_UI_MODEL" -D"_M_ARM" -D"UNICODE" -D"_UNICODE" \
@@ -156,7 +139,7 @@ CFLAGS_VER = -Ot2b1 -EHs-c- -D_CRT_SECURE_NO_DEPRECATE
CFLAGS_VER = -Ogt2yb1p -GX- -G6 -YX
!endif
CFLAGS = -nologo -W4 -wd4127 -Gs -I$(INCLUDE_DIR) $(CFLAGS_VER) -T$(HB_BUILD_MODE) \
CFLAGS = -nologo -W4 -wd4127 -Gs -I$(INCLUDE_DIR) $(CFLAGS_VER) \
$(C_USR) -I$(OBJ_DIR)
#-----------
@@ -169,23 +152,15 @@ CFLAGSMT = -MT$(DBGMARKER) -DHB_MT_VM
!endif
#-----------
!if "$(HB_GT_LIB)" != ""
CFLAGS = -D"HB_GT_LIB=$(HB_GT_LIB:gt=)" $(CFLAGS)
!endif
#-----------
#**********************************************************
CLIBFLAGS = -c $(CFLAGS)
CLIBFLAGSxxx = $(CLIBFLAGS: -MT= )
CLIBFLAGSxxx = $(CLIBFLAGSxxx: -MTd= )
!if "$(HB_BUILD_WINCE)" == "yes"
CLIBFLAGSDLL = $(CLIBFLAGS) $(CLIBFLAGSDLL) -DHB_DYNLIB
CEXEFLAGSDLL = $(CLIBFLAGS) $(CEXEFLAGSDLL)
CLIBFLAGSDLL = $(CLIBFLAGS) -DHB_DYNLIB
CEXEFLAGSDLL = $(CLIBFLAGS)
!else
CLIBFLAGSDLL = -MT$(DBGMARKER) $(CLIBFLAGS) $(CLIBFLAGSDLL) -DHB_DYNLIB
CEXEFLAGSDLL = -MT$(DBGMARKER) $(CLIBFLAGS) $(CEXEFLAGSDLL)
CLIBFLAGSDLL = -MT$(DBGMARKER) $(CLIBFLAGS) -DHB_DYNLIB
CEXEFLAGSDLL = -MT$(DBGMARKER) $(CLIBFLAGS)
!endif
#**********************************************************
@@ -196,7 +171,7 @@ HBFLAGSCMN = -i$(INCLUDE_DIR) -q0 -w3 -es2 -km $(PRG_USR)
HBFLAGSCMN = $(HBFLAGSCMN) -D__PLATFORM__WINCE
!endif
HARBOURFLAGS = -n $(HBFLAGSCMN)
HARBOURFLAGSDLL= -n1 $(HBFLAGSCMN) $(HARBOURFLAGSDLL)
HARBOURFLAGSDLL= -n1 $(HBFLAGSCMN)
#**********************************************************
@@ -213,11 +188,11 @@ LDFLAGS = $(LDFLAGS) /MANIFEST:NO
LDFLAGSDLL = /DLL \
/NOLOGO /SUBSYSTEM:WINDOWSCE,4.20 /MACHINE:ARM /ARMPADCODE \
/STACK:65536,4096 /NODEFAULTLIB:"oldnames.lib" \
/LIBPATH:$(LIB_DIR) $(LDFLAGSDLL)
/LIBPATH:$(LIB_DIR) $(L_USR)
!else
LDFLAGS = /NOLOGO /SUBSYSTEM:console /LIBPATH:$(LIB_DIR) $(L_USR)
LDFLAGSDLL = /DLL \
/NOLOGO /LIBPATH:$(LIB_DIR) $(LDFLAGSDLL)
/NOLOGO /LIBPATH:$(LIB_DIR) $(L_USR)
!endif
!if "$(HB_BUILD_DEBUG)" == "yes"