diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bd599d83bf..eda48f37a5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,37 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-26 18:42 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * source/rtl/gtcrs/Makefile + * source/rtl/gttrm/Makefile + * source/rtl/gtsln/Makefile + * Using HB_HAS_GPM instead of old HB_GPM_MOUSE. + + * config/bin.mk + * config/dyn.mk + * config/bsd/libs.mk + * config/darwin/libs.mk + * config/hpux/libs.mk + * config/dos/djgpp.mk + * config/win/mingw.mk + * config/linux/libs.mk + * config/os2/gcc.mk + * config/sunos/libs.mk + * Extended the way it's decided whether to include + rtl external lib dependencies or not. Now binary specific + logic was moved to bin.mk, and dynamic lib logic was added + to dyn.mk. + The flag is called HB_LINKING_RTL (not empty means yes). + + Updated syslib list assembly parts to use HB_HAS_* + autodetection variables instead of trying to find it out + by other means. + + * config/global.mk + + Adding gtcrs, gtsln, gtxwc to std liblist if required + components are available. This means that it's now again + possible to select these as build-time default GTs. + * Updated comment for setting plans. + 2009-08-26 17:55 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + config/detfun.mk + config/detect.mk diff --git a/harbour/config/bin.mk b/harbour/config/bin.mk index 324dc0190e..0feaef997c 100644 --- a/harbour/config/bin.mk +++ b/harbour/config/bin.mk @@ -52,6 +52,12 @@ HB_LIBS_TPL := _HB_RDD := _HB_VM := +ifneq ($(filter hbrtl, $(LIBS)),) + HB_LINKING_RTL := yes +else + HB_LINKING_RTL := +endif + -include $(TOP)$(ROOT)config/$(HB_PLATFORM)/libs.mk include $(TOP)$(ROOT)config/$(HB_PLATFORM)/$(HB_COMPILER).mk include $(TOP)$(ROOT)config/c.mk diff --git a/harbour/config/bsd/libs.mk b/harbour/config/bsd/libs.mk index 32de62e853..c1e3a39bf3 100644 --- a/harbour/config/bsd/libs.mk +++ b/harbour/config/bsd/libs.mk @@ -5,21 +5,21 @@ SYSLIBS := SYSLIBPATHS := -ifneq ($(filter hbrtl, $(LIBS)),) +ifneq ($(HB_LINKING_RTL),) ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := ncurses endif - ifneq ($(filter gtcrs, $(LIBS)),) + ifneq ($(HB_HAS_CURSES),) SYSLIBS += $(HB_CRS_LIB) endif - ifneq ($(filter gtsln, $(LIBS)),) + ifneq ($(HB_HAS_SLANG),) SYSLIBS += slang # In BSD, slang still needs curses :( - ifeq ($(filter gtcrs, $(LIBS)),) + ifneq ($(HB_HAS_CURSES),) SYSLIBS += $(HB_CRS_LIB) endif endif - ifneq ($(filter gtxwc, $(LIBS)),) + ifneq ($(HB_HAS_X11),) SYSLIBS += X11 # SYSLIBPATHS += /usr/X11R6/lib64 SYSLIBPATHS += /usr/X11R6/lib diff --git a/harbour/config/darwin/libs.mk b/harbour/config/darwin/libs.mk index a92180a56c..c9d742d914 100644 --- a/harbour/config/darwin/libs.mk +++ b/harbour/config/darwin/libs.mk @@ -5,21 +5,21 @@ SYSLIBS := SYSLIBPATHS := -ifneq ($(filter hbrtl, $(LIBS)),) +ifneq ($(HB_LINKING_RTL),) ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := ncurses endif - ifneq ($(filter gtcrs, $(LIBS)),) + ifneq ($(HB_HAS_CURSES),) SYSLIBS += $(HB_CRS_LIB) endif - ifneq ($(filter gtsln, $(LIBS)),) + ifneq ($(HB_HAS_SLANG),) SYSLIBS += slang # In BSD, slang still needs curses :( - ifeq ($(filter gtcrs, $(LIBS)),) + ifneq ($(HB_HAS_CURSES),) SYSLIBS += $(HB_CRS_LIB) endif endif - ifneq ($(filter gtxwc, $(LIBS)),) + ifneq ($(HB_HAS_X11),) SYSLIBS += X11 # SYSLIBPATHS += /usr/X11R6/lib64 SYSLIBPATHS += /usr/X11R6/lib diff --git a/harbour/config/dos/djgpp.mk b/harbour/config/dos/djgpp.mk index 465436243f..c6e8225940 100644 --- a/harbour/config/dos/djgpp.mk +++ b/harbour/config/dos/djgpp.mk @@ -39,8 +39,7 @@ LIBPATHS := -L$(LIB_DIR) LDLIBS := $(foreach lib,$(LIBS),-l$(lib)) -ifneq ($(filter hbrtl, $(LIBS)),) - # Add the specified GT driver library +ifneq ($(HB_LINKING_RTL),) ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := pdcurses endif diff --git a/harbour/config/dyn.mk b/harbour/config/dyn.mk index e87c3fdfd2..a16513e8cb 100644 --- a/harbour/config/dyn.mk +++ b/harbour/config/dyn.mk @@ -7,6 +7,12 @@ include $(TOP)$(ROOT)config/global.mk ifneq ($(HB_PLATFORM),) ifneq ($(HB_COMPILER),) +ifneq ($(DYNNAME),) + HB_LINKING_RTL := yes +else + HB_LINKING_RTL := +endif + -include $(TOP)$(ROOT)config/$(HB_PLATFORM)/libs.mk include $(TOP)$(ROOT)config/$(HB_PLATFORM)/$(HB_COMPILER).mk include $(TOP)$(ROOT)config/c.mk diff --git a/harbour/config/global.mk b/harbour/config/global.mk index 0f889dac73..2ec4a208ce 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -268,11 +268,7 @@ ifeq ($(HB_INIT_DONE),) # HB_GT_CRS_BCEHACK -> HB_USER_CFLAGS=-DHB_GT_CRS_BCEHACK # HB_NCURSES_194 -> HB_USER_CFLAGS=-DHB_NCURSES_194 # HB_DLLIBS -> (only used in place location, so it's a local matter) - # # HB_CRS_LIB -> HB_LIB_CURSES - # HB_GPM_MOUSE -> HB_WITH_GPM - # HB_WITHOUT_* -> HB_WITH_*=no - # HB_INC_* -> HB_WITH_*= # HB_DIR_* -> ? (only used for implib # HB_HAS_* -> ? # @@ -1079,6 +1075,17 @@ HB_GT_LIBS := \ gtpca \ gtstd \ +# Add GTs if dependency is available +ifneq ($(HB_HAS_CURSES),) + HB_GT_LIBS += gtcrs +endif +ifneq ($(HB_HAS_SLANG),) + HB_GT_LIBS += gtsln +endif +ifneq ($(HB_HAS_X11),) + HB_GT_LIBS += gtxwc +endif + # Names of valid RDD libraries HB_RDD_LIBS := \ rddntx \ diff --git a/harbour/config/hpux/libs.mk b/harbour/config/hpux/libs.mk index 60dd556f71..b77aa65bc6 100644 --- a/harbour/config/hpux/libs.mk +++ b/harbour/config/hpux/libs.mk @@ -5,17 +5,17 @@ SYSLIBS := SYSLIBPATHS := -ifneq ($(filter hbrtl, $(LIBS)),) +ifneq ($(HB_LINKING_RTL),) ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := ncurses endif - ifneq ($(filter gtcrs, $(LIBS)),) + ifneq ($(HB_HAS_CURSES),) SYSLIBS += $(HB_CRS_LIB) endif - ifneq ($(filter gtsln, $(LIBS)),) + ifneq ($(HB_HAS_SLANG),) SYSLIBS += slang endif - ifneq ($(filter gtxwc, $(LIBS)),) + ifneq ($(HB_HAS_X11),) SYSLIBS += X11 # SYSLIBPATHS += /usr/X11R6/lib64 SYSLIBPATHS += /usr/X11R6/lib diff --git a/harbour/config/linux/libs.mk b/harbour/config/linux/libs.mk index 0641200bc1..9b44d06feb 100644 --- a/harbour/config/linux/libs.mk +++ b/harbour/config/linux/libs.mk @@ -28,22 +28,22 @@ endif SYSLIBS := SYSLIBPATHS := -ifneq ($(filter hbrtl, $(LIBS)),) +ifneq ($(HB_LINKING_RTL),) ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := ncurses endif - ifneq ($(filter gtcrs, $(LIBS)),) + ifneq ($(HB_HAS_CURSES),) SYSLIBS += $(HB_CRS_LIB) endif - ifneq ($(filter gtsln, $(LIBS)),) + ifneq ($(HB_HAS_SLANG),) SYSLIBS += slang endif - ifneq ($(filter gtxwc, $(LIBS)),) + ifneq ($(HB_HAS_X11),) SYSLIBS += X11 # SYSLIBPATHS += /usr/X11R6/lib64 SYSLIBPATHS += /usr/X11R6/lib endif - ifeq ($(HB_GPM_MOUSE),yes) + ifneq ($(HB_HAS_GPM),) SYSLIBS += gpm endif ifneq ($(filter -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) diff --git a/harbour/config/os2/gcc.mk b/harbour/config/os2/gcc.mk index 86318bb3f9..7996c78dfd 100644 --- a/harbour/config/os2/gcc.mk +++ b/harbour/config/os2/gcc.mk @@ -47,8 +47,7 @@ SYSLIBS := socket LIBPATHS := -L$(LIB_DIR) LDLIBS := $(foreach lib,$(LIBS),-l$(lib)) -# Add the specified GT driver library -ifneq ($(filter hbrtl, $(LIBS)),) +ifneq ($(HB_LINKING_RTL),) ifeq ($(C_MAIN),) ifeq ($(filter os2pm,$(HB_GT_LIB)),os2pm) # Special handling for PM mode diff --git a/harbour/config/sunos/libs.mk b/harbour/config/sunos/libs.mk index 59d7dfc01b..53556f3195 100644 --- a/harbour/config/sunos/libs.mk +++ b/harbour/config/sunos/libs.mk @@ -5,17 +5,17 @@ SYSLIBS := SYSLIBPATHS := -ifneq ($(filter hbrtl, $(LIBS)),) +ifneq ($(HB_LINKING_RTL),) ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := curses endif - ifneq ($(filter gtcrs, $(LIBS)),) + ifneq ($(HB_HAS_CURSES),) SYSLIBS += $(HB_CRS_LIB) endif - ifneq ($(filter gtsln, $(LIBS)),) + ifneq ($(HB_HAS_SLANG),) SYSLIBS += slang endif - ifneq ($(filter gtxwc, $(LIBS)),) + ifneq ($(HB_HAS_X11),) SYSLIBS += X11 # SYSLIBPATHS += /usr/X11R6/lib64 SYSLIBPATHS += /usr/X11R6/lib diff --git a/harbour/config/win/mingw.mk b/harbour/config/win/mingw.mk index 745ac34436..48fbaa5cc1 100644 --- a/harbour/config/win/mingw.mk +++ b/harbour/config/win/mingw.mk @@ -44,7 +44,7 @@ LDLIBS := $(foreach lib,$(LIBS) $(SYSLIBS),-l$(lib)) # Add the standard C main() entry ifeq ($(HB_MAIN),std) - ifeq ($(filter hbrtl,$(LIBS)),hbrtl) + ifneq ($(HB_LINKING_RTL),) LDLIBS += -lhbmainstd endif endif diff --git a/harbour/source/rtl/gtcrs/Makefile b/harbour/source/rtl/gtcrs/Makefile index 88c69ca850..d2eb07d7cf 100644 --- a/harbour/source/rtl/gtcrs/Makefile +++ b/harbour/source/rtl/gtcrs/Makefile @@ -41,7 +41,7 @@ ifneq ($(HB_INC_CURSES_OK),) ifeq ($(HB_GT_CRS_BCEHACK),yes) HB_CFLAGS += -DHB_GT_CRS_BCEHACK endif -ifeq ($(HB_GPM_MOUSE),yes) +ifneq ($(HB_HAS_GPM),) HB_CFLAGS += -DHB_HAS_GPM ifeq ($(HB_GPM_NOICE_DISABLE),yes) HB_CFLAGS += -DHB_GPM_NOICE_DISABLE diff --git a/harbour/source/rtl/gtsln/Makefile b/harbour/source/rtl/gtsln/Makefile index 635df30f2b..0d65544041 100644 --- a/harbour/source/rtl/gtsln/Makefile +++ b/harbour/source/rtl/gtsln/Makefile @@ -36,7 +36,7 @@ HB_INC_SLANG_OK := $(foreach d, $(HB_INC_SLANG), $(if $(wildcard $(d)/slang.h),$ ifneq ($(strip $(HB_INC_SLANG_OK)),) -ifeq ($(HB_GPM_MOUSE),yes) +ifneq ($(HB_HAS_GPM),) HB_CFLAGS += -DHB_HAS_GPM ifeq ($(HB_GPM_NOICE_DISABLE),yes) HB_CFLAGS += -DHB_GPM_NOICE_DISABLE diff --git a/harbour/source/rtl/gttrm/Makefile b/harbour/source/rtl/gttrm/Makefile index e44827e382..c43c794f0a 100644 --- a/harbour/source/rtl/gttrm/Makefile +++ b/harbour/source/rtl/gttrm/Makefile @@ -33,7 +33,7 @@ endif ifeq ($(HB_WITH_GTTRM),yes) -ifeq ($(HB_GPM_MOUSE),yes) +ifneq ($(HB_HAS_GPM),) HB_CFLAGS += -DHB_HAS_GPM ifeq ($(HB_GPM_NOICE_DISABLE),yes) HB_CFLAGS += -DHB_GPM_NOICE_DISABLE