2009-09-17 00:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* source/Makefile
  * config/lib.mk
    + Added Przemek's patch to add local hbzlib and hbpcre
      libs to Harbour dynlib.
    ; TODO: Add some ways to disable this because it has some
            drawbacks (it f.e. makes it impossible to link 3rd
            party libs also exporting zlib / pcre interfaces).
            This information needs to be passed to hbmk2, too.
            I don't have any elegant way to solve this problem ATM.

  * utils/hbmk2/hbmk2.prg
    * Changed to only add local hbzlib and hbpcre libs to liblist
      in static mode. (this is needed to support change above).
    + Enabled lib grouping for beos/gcc.
    + Added supc++/supcxx lib to liblist of gcc family compilers.
      This aims to solve link problems when Harbour is built
      in C++, but hbmk2 is used in C mode.

  * contrib/hbqt/hbqts.hbc
  * contrib/hbqt/hbqt.hbc
  * contrib/gtqtc/gtqtcs.hbc
  * contrib/gtqtc/gtqtc.hbc
    - Deleted explicit supc++ libspec. Now it's added by
      hbmk2 automatically.

  * config/dyn.mk
    ! Modified to add local hbpcre and hbzlib to syslib
      list to make it link with beos/haiku.
      Please test/confirm this change.
    - Disabled above logic, since it's not needed.

  * config/global.mk
    + Added autodetection for linux/sunpro, linux/icc,
      darwin/clang, darwin/gcc, darwin/icc.
      On darwin clang became the default, if available.

  * external/sqlite3/Makefile
    + Tweak for linux/watcom. Based on Przemek patch sent to the devlist.

  * config/detfun.mk
  * config/bin.mk
  * config/dyn.mk
  * source/Makefile
  * config/lib.mk
    % Minor modification to HB_HAS_*_LOCAL logic to make
      it safe to use this var without first checking HB_HAS_*.

  ; Please test/review these. I didn't restest everything after above changes.
This commit is contained in:
Viktor Szakats
2009-09-16 22:59:47 +00:00
parent 4acf19bc1d
commit 55fa645e86
13 changed files with 139 additions and 40 deletions

View File

@@ -17,6 +17,56 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-09-17 00:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* source/Makefile
* config/lib.mk
+ Added Przemek's patch to add local hbzlib and hbpcre
libs to Harbour dynlib.
; TODO: Add some ways to disable this because it has some
drawbacks (it f.e. makes it impossible to link 3rd
party libs also exporting zlib / pcre interfaces).
This information needs to be passed to hbmk2, too.
I don't have any elegant way to solve this problem ATM.
* utils/hbmk2/hbmk2.prg
* Changed to only add local hbzlib and hbpcre libs to liblist
in static mode. (this is needed to support change above).
+ Enabled lib grouping for beos/gcc.
+ Added supc++/supcxx lib to liblist of gcc family compilers.
This aims to solve link problems when Harbour is built
in C++, but hbmk2 is used in C mode.
* contrib/hbqt/hbqts.hbc
* contrib/hbqt/hbqt.hbc
* contrib/gtqtc/gtqtcs.hbc
* contrib/gtqtc/gtqtc.hbc
- Deleted explicit supc++ libspec. Now it's added by
hbmk2 automatically.
* config/dyn.mk
! Modified to add local hbpcre and hbzlib to syslib
list to make it link with beos/haiku.
Please test/confirm this change.
- Disabled above logic, since it's not needed.
* config/global.mk
+ Added autodetection for linux/sunpro, linux/icc,
darwin/clang, darwin/gcc, darwin/icc.
On darwin clang became the default, if available.
* external/sqlite3/Makefile
+ Tweak for linux/watcom. Based on Przemek patch sent to the devlist.
* config/detfun.mk
* config/bin.mk
* config/dyn.mk
* source/Makefile
* config/lib.mk
% Minor modification to HB_HAS_*_LOCAL logic to make
it safe to use this var without first checking HB_HAS_*.
; Please test/review these. I didn't restest everything after above changes.
2009-09-16 22:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
* utils/hbmk2/hbmk2.pt_BR.po

View File

@@ -26,10 +26,8 @@ HB_LIBS_TPL = \
hbpp \
hbcommon
ifneq ($(HB_HAS_PCRE),)
ifneq ($(HB_HAS_PCRE_LOCAL),)
HB_LIBS_TPL += hbpcre
endif
ifneq ($(HB_HAS_PCRE_LOCAL),)
HB_LIBS_TPL += hbpcre
endif
ifneq ($(HB_HAS_ZLIB_LOCAL),)
HB_LIBS_TPL += hbzlib

View File

@@ -20,7 +20,7 @@
# _DET_INC_DEFP - default location to look at. Not effective in 'HB_BUILD_EXTDEF=no' mode.
# _DET_INC_LOCL - embedded location to look at.
# _DET_INC_HEAD - header filename to look for. Unless looking for a directory, prefix with forward slash.
# - variable name specified by _DET_VAR_INC_ (typically "HB_INC_*") should contains:
# - variable name specified by _DET_VAR_INC_ (typically "HB_INC_*") containing:
# (empty) or yes - will enable external component if found on default locations.
# no - will disable external component.
# force - will forcibly enable external component, bypassing location checks,
@@ -54,6 +54,7 @@ endif
_DET_RES_TEXT :=
ifeq ($($(_DET_VAR_HAS_)),)
$(_DET_VAR_HAS_)_LOCAL :=
ifneq ($($(_DET_VAR_INC_)),no)
_DET_POS := $(filter-out !%,$(_DET_FLT_PLAT))
_DET_NEG := $(subst !,,$(filter !%,$(_DET_FLT_PLAT)))
@@ -95,7 +96,6 @@ ifeq ($($(_DET_VAR_HAS_)),)
$(call do_info,$(_DET_RES_TEXT))
else
# detect if the component was found in locally hosted dir
$(_DET_VAR_HAS_)_LOCAL :=
ifneq ($(_DET_INC_LOCL),)
ifneq ($(filter $(_DET_INC_LOCL),$($(_DET_VAR_HAS_))),)
$(_DET_VAR_HAS_)_LOCAL := (local)

View File

@@ -19,14 +19,13 @@ endif
-include $(TOP)$(ROOT)config/$(HB_PLATFORM)/libs.mk
ifneq ($(HB_HAS_PCRE),)
ifneq ($(HB_HAS_PCRE_LOCAL),)
LIBS += hbpcre
endif
endif
ifneq ($(HB_HAS_ZLIB_LOCAL),)
LIBS += hbzlib
endif
# We're linking them directly to Harbour dynlib now.
#ifneq ($(HB_HAS_PCRE_LOCAL),)
# SYSLIBS += hbpcre
#endif
#ifneq ($(HB_HAS_ZLIB_LOCAL),)
# SYSLIBS += hbzlib
#endif
include $(TOP)$(ROOT)config/$(HB_PLATFORM)/$(HB_COMPILER).mk
include $(TOP)$(ROOT)config/c.mk

View File

@@ -778,42 +778,56 @@ ifeq ($(HB_COMPILER),)
HB_COMP_PATH := $(call find_in_path,gcc)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := gcc
else
HB_COMP_PATH := $(call find_in_path,suncc)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := sunpro
else
HB_COMP_PATH := $(call find_in_path,icc)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := icc
endif
endif
endif
endif
else
ifneq ($(filter $(HB_PLATFORM),darwin hpux bsd),)
ifneq ($(filter $(HB_PLATFORM),hpux bsd),)
HB_COMP_PATH := $(call find_in_path,gcc)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := gcc
endif
else
ifeq ($(HB_PLATFORM),sunos)
HB_COMP_PATH := $(call find_in_path,suncc)
ifeq ($(HB_PLATFORM),darwin)
HB_COMP_PATH := $(call find_in_path,clang)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := sunpro
HB_COMPILER := clang
else
HB_COMP_PATH := $(call find_in_path,gcc)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := gcc
else
HB_COMP_PATH := $(call find_in_path,icc)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := icc
endif
endif
endif
else
ifeq ($(HB_PLATFORM),dos)
HB_COMP_PATH := $(call find_in_path,gcc)
ifeq ($(HB_PLATFORM),sunos)
HB_COMP_PATH := $(call find_in_path,suncc)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := djgpp
HB_COMPILER := sunpro
else
HB_COMP_PATH := $(call find_in_path,wpp386)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := watcom
$(eval $(call detect_watcom_platform))
endif
endif
else
ifeq ($(HB_PLATFORM),os2)
HB_COMP_PATH := $(call find_in_path,gcc)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := gcc
endif
endif
else
ifeq ($(HB_PLATFORM),dos)
HB_COMP_PATH := $(call find_in_path,gcc)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := djgpp
else
HB_COMP_PATH := $(call find_in_path,wpp386)
ifneq ($(HB_COMP_PATH),)
@@ -822,13 +836,26 @@ ifeq ($(HB_COMPILER),)
endif
endif
else
ifeq ($(HB_PLATFORM),beos)
ifeq ($(HB_PLATFORM),os2)
HB_COMP_PATH := $(call find_in_path,gcc)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := gcc
else
HB_COMP_PATH := $(call find_in_path,wpp386)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := watcom
$(eval $(call detect_watcom_platform))
endif
endif
else
ifeq ($(HB_PLATFORM),beos)
HB_COMP_PATH := $(call find_in_path,gcc)
ifneq ($(HB_COMP_PATH),)
HB_COMPILER := gcc
endif
endif
# add other platforms here
endif
# add other platforms here
endif
endif
endif

View File

@@ -38,6 +38,13 @@ HB_DYN_LIBS := \
hbvmmt \
hbmaindllh
ifneq ($(HB_HAS_PCRE_LOCAL),)
HB_DYN_LIBS += hbpcre
endif
ifneq ($(HB_HAS_ZLIB_LOCAL),)
HB_DYN_LIBS += hbzlib
endif
# Added only for hbpp
-include $(TOP)$(ROOT)config/$(HB_PLATFORM)/libs.mk
include $(TOP)$(ROOT)config/$(HB_PLATFORM)/$(HB_COMPILER).mk

View File

@@ -10,7 +10,6 @@ libs=QtCore4 QtGui4 QtNetwork4 QtWebKit4
{darwin}libs=/Library/Frameworks/QtGui.framework/QtGui
{darwin}libs=/Library/Frameworks/QtNetwork.framework/QtNetwork
{darwin}libs=/Library/Frameworks/QtWebKit.framework/QtWebKit
{allgcc}libs=supc++
gui=yes
gt=gtqtc
# optional

View File

@@ -5,7 +5,6 @@
{allwin}libpaths=${HB_DIR_QT}\lib
libs=QtCore QtGui QtNetwork QtWebKit
{allgcc}libs=supc++
gui=yes
gt=gtqtcs
# optional

View File

@@ -14,6 +14,5 @@ libs=hbqt
{darwin}libs=/Library/Frameworks/QtGui.framework/QtGui
{darwin}libs=/Library/Frameworks/QtNetwork.framework/QtNetwork
{darwin}libs=/Library/Frameworks/QtWebKit.framework/QtWebKit
{allgcc}libs=supc++
gui=yes
gt=gtnul

View File

@@ -9,6 +9,5 @@ incpaths=.
libs=hbqts
{win}libs=version shlwapi
{allwin}libs=QtCore QtGui QtNetwork QtWebKit
{allgcc}libs=supc++
gui=yes
gt=gtnul

View File

@@ -56,6 +56,10 @@ ifeq ($(HB_SUPPORTED),yes)
# externals though. [vszakats]
HB_CFLAGS += -DSQLITE_OS_OTHER
endif
ifeq ($(HB_PLATFORM)-$(HB_COMPILER),linux-watcom)
# Watcom Linux builds cannot use system header files
HB_CFLAGS += -DSQLITE_OS_OTHER
endif
include $(TOP)$(ROOT)config/lib.mk
else

View File

@@ -104,6 +104,13 @@ else
DYNDIRLIST_BASE += source/vm/maindllh
endif
ifneq ($(HB_HAS_PCRE_LOCAL),)
DYNDIRLIST_BASE += external/pcre
endif
ifneq ($(HB_HAS_ZLIB_LOCAL),)
DYNDIRLIST_BASE += external/zlib
endif
export DYNDIRLIST_BASE
export DYNNAME_POST
endif

View File

@@ -2140,6 +2140,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
cLibLibExt := ".a"
IF l_lLIBGROUPING .AND. ;
( hbmk[ _HBMK_cPLAT ] == "linux" .OR. ;
hbmk[ _HBMK_cPLAT ] == "beos" .OR. ;
hbmk[ _HBMK_cPLAT ] == "bsd" )
AAdd( hbmk[ _HBMK_aOPTL ], "-Wl,--start-group {LL} {LB} -Wl,--end-group" )
AAdd( hbmk[ _HBMK_aOPTD ], "-Wl,--start-group {LL} {LB} -Wl,--end-group" )
@@ -2260,6 +2261,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
AAdd( l_aLIBSYS, "X11" )
ENDIF
AAdd( l_aLIBSYS, "supc++" ) /* NOTE: or stdc++? */
CASE ( hbmk[ _HBMK_cPLAT ] == "win" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
( hbmk[ _HBMK_cPLAT ] == "win" .AND. hbmk[ _HBMK_cCOMP ] == "mingw" ) .OR. ;
( hbmk[ _HBMK_cPLAT ] == "win" .AND. hbmk[ _HBMK_cCOMP ] == "mingw64" ) .OR. ;
@@ -2375,6 +2378,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
ENDIF
ENDIF
AAdd( l_aLIBSYS, "supc++" ) /* NOTE: or stdc++? */
CASE hbmk[ _HBMK_cPLAT ] == "os2" .AND. hbmk[ _HBMK_cCOMP ] == "gcc"
IF hbmk[ _HBMK_lDEBUG ]
@@ -2441,6 +2446,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
cBin_Res := FN_Escape( hbmk[ _HBMK_cCCPATH ] + hb_osPathSeparator() + cBin_Res, nCmd_Esc )
ENDIF
AAdd( l_aLIBSYS, "supc++" ) /* NOTE: or stdc++? */
CASE hbmk[ _HBMK_cPLAT ] == "dos" .AND. hbmk[ _HBMK_cCOMP ] == "djgpp"
IF hbmk[ _HBMK_lDEBUG ]
@@ -2501,6 +2508,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
cBin_Link := FN_Escape( hbmk[ _HBMK_cCCPATH ] + hb_osPathSeparator() + cBin_Link, nCmd_Esc )
ENDIF
AAdd( l_aLIBSYS, "supcxx" ) /* NOTE: or stdcxx? */
/* Watcom family */
CASE hbmk[ _HBMK_cCOMP ] == "watcom"
@@ -3521,11 +3530,13 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
ENDIF
ENDIF
IF ! Empty( cLIB_BASE_PCRE ) .AND. hb_FileExists( DirAddPathSep( l_cHB_LIB_INSTALL ) + hb_osPathSeparator() + cLibLibPrefix + cLIB_BASE_PCRE + cLibLibExt )
AAdd( l_aLIBSYS, cLIB_BASE_PCRE )
ENDIF
IF ! Empty( cLIB_BASE_ZLIB ) .AND. hb_FileExists( DirAddPathSep( l_cHB_LIB_INSTALL ) + hb_osPathSeparator() + cLibLibPrefix + cLIB_BASE_ZLIB + cLibLibExt )
AAdd( l_aLIBSYS, cLIB_BASE_ZLIB )
IF ! hbmk[ _HBMK_lSHARED ]
IF ! Empty( cLIB_BASE_PCRE ) .AND. hb_FileExists( DirAddPathSep( l_cHB_LIB_INSTALL ) + hb_osPathSeparator() + cLibLibPrefix + cLIB_BASE_PCRE + cLibLibExt )
AAdd( l_aLIBSYS, cLIB_BASE_PCRE )
ENDIF
IF ! Empty( cLIB_BASE_ZLIB ) .AND. hb_FileExists( DirAddPathSep( l_cHB_LIB_INSTALL ) + hb_osPathSeparator() + cLibLibPrefix + cLIB_BASE_ZLIB + cLibLibExt )
AAdd( l_aLIBSYS, cLIB_BASE_ZLIB )
ENDIF
ENDIF
/* Library list assembly */