diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a50700460b..2606f7f9b9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,68 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-11 00:31 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/bin.cf + + Harbour binary core liblists are now formed centrally. + Four variations are generated: + HB_LIBS_ST_RDD + HB_LIBS_MT_RDD + HB_LIBS_ST_NORDD + HB_LIBS_MT_NORDD + Binaries can choose by using: 'LIBS = $(HB_LIBS_*)'. + Important to use '='. + This step also fixes potential problems with former liblists, + where it was easy to make a local mistakes and some libs which + needed more complicated logic, or which were just rarely used + simply weren't added. Now all liblists are guaranteed to have + proper order and content. + HB_GT_LIBS and HB_DB_DRIVERS are automatically added centrally, + so no need to add them manually in each compiler specific .cf. + + * tests/Makefile + * tests/hbpptest/Makefile + * tests/multifnc/Makefile + * utils/hbformat/Makefile + * utils/hbmk2/Makefile + * utils/hbtest/Makefile + * utils/hbi18n/Makefile + * utils/hbrun/Makefile + % Using above HB_LIBS_* macros. + ; The only few places which I didn't thouch is non-Harbour + executables (harbour exe and hbpp exe). + + * config/bsd/gcc.cf + * config/wce/msvcarm.cf + * config/wce/mingwarm.cf + * config/wce/poccarm.cf + * config/hpux/gcc.cf + * config/darwin/gcc.cf + * config/dos/watcom.cf + * config/dos/djgpp.cf + * config/win/watcom.cf + * config/win/icc.cf + * config/win/cygwin.cf + * config/win/msvc.cf + * config/win/xcc.cf + * config/win/mingw.cf + * config/win/pocc.cf + * config/win/bcc.cf + * config/linux/watcom.cf + * config/linux/gcc.cf + * config/linux/icc.cf + * config/linux/sunpro.cf + * config/os2/watcom.cf + * config/os2/gcc.cf + * config/sunos/gcc.cf + * config/sunos/sunpro.cf + % Deleted local logic to merge HB_GT_LIBS and HB_DB_DRIVERS + into LIBS. + + * utils/hbmk2/hbmk2.hbp + * utils/hbrun/hbrun.hbp + ! Extra libspecs are still needed for some compilers. + I've readded them until better solution is found. + 2009-08-10 23:16 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/pp/Makefile * harbour/config/os2/watcom.cf diff --git a/harbour/config/bin.cf b/harbour/config/bin.cf index 690ea7f465..e50afdcf66 100644 --- a/harbour/config/bin.cf +++ b/harbour/config/bin.cf @@ -7,6 +7,34 @@ include $(TOP)$(ROOT)config/global.cf ifneq ($(HB_ARCHITECTURE),) ifneq ($(HB_COMPILER),) +# Assemble template lib list to help create a few common variations +HB_LIBS_TPL = hbextern hbdebug $(_HB_VM) hbrtl hblang hbcpage $(HB_GT_LIBS) $(_HB_RDD) hbrtl $(_HB_VM) hbmacro hbcplr hbpp hbcommon +ifeq ($(findstring -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) + ifeq ($(findstring -DHB_POSIX_REGEX, $(HB_USER_CFLAGS)),) + HB_LIBS_TPL += hbpcre + endif +endif +ifeq ($(findstring -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) + HB_LIBS_TPL += hbzlib +endif + +# Create a few common core lib lists +_HB_RDD := hbrdd $(HB_DB_DRIVERS) +_HB_VM := hbvm +HB_LIBS_ST_RDD := $(HB_LIBS_TPL) +_HB_VM := hbvmmt +HB_LIBS_MT_RDD := $(HB_LIBS_TPL) +_HB_RDD := hbnulrdd +_HB_VM := hbvm +HB_LIBS_ST_NORDD := $(HB_LIBS_TPL) +_HB_VM := hbvmmt +HB_LIBS_MT_NORDD := $(HB_LIBS_TPL) + +# Cleanup temp vars +HB_LIBS_TPL := +_HB_RDD := +_HB_VM := + include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/$(HB_COMPILER).cf include $(TOP)$(ROOT)config/c.cf include $(TOP)$(ROOT)config/prg.cf @@ -40,7 +68,6 @@ vpath $(BIN_NAME) $(BIN_DIR) $(BIN_NAME) : $(ALL_OBJS) $(LD_RULE) - INSTALL_FILES = $(BIN_FILE) INSTALL_DIR = $(HB_BIN_INSTALL) diff --git a/harbour/config/bsd/gcc.cf b/harbour/config/bsd/gcc.cf index 31f89b8151..17403aefb4 100644 --- a/harbour/config/bsd/gcc.cf +++ b/harbour/config/bsd/gcc.cf @@ -39,16 +39,9 @@ LINKLIBS += -Wl,--start-group LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif - # Add the specified GT driver library and other RTLs ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) - # screen driver libraries ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := ncurses diff --git a/harbour/config/darwin/gcc.cf b/harbour/config/darwin/gcc.cf index 83aa82f46e..3d1359a0a0 100644 --- a/harbour/config/darwin/gcc.cf +++ b/harbour/config/darwin/gcc.cf @@ -51,16 +51,9 @@ LINKPATHS += -L$(LIB_DIR) LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif - # Add the specified GT driver library and other RTLs ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl - # screen driver libraries ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := ncurses diff --git a/harbour/config/dos/djgpp.cf b/harbour/config/dos/djgpp.cf index 0cac3c5c31..a1ba558216 100644 --- a/harbour/config/dos/djgpp.cf +++ b/harbour/config/dos/djgpp.cf @@ -38,16 +38,6 @@ LINKPATHS += -L$(LIB_DIR) LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif - -# Add the specified GT driver library and other RTLs -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -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 diff --git a/harbour/config/dos/watcom.cf b/harbour/config/dos/watcom.cf index 82023c273a..d0d0067ed9 100644 --- a/harbour/config/dos/watcom.cf +++ b/harbour/config/dos/watcom.cf @@ -87,8 +87,6 @@ define link_exe_file @echo $(LDFLAGS) NAME $(BIN_DIR)/$@ > __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 @@ -106,15 +104,6 @@ endif LINKLIBS = $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) - RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv)) -endif - -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) - GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)) -endif - LD_RULE = $(link_exe_file) $(HB_USER_LDFLAGS) #Note: The empty line below HAVE TO exist! diff --git a/harbour/config/hpux/gcc.cf b/harbour/config/hpux/gcc.cf index 281116b3ab..90e42d7214 100644 --- a/harbour/config/hpux/gcc.cf +++ b/harbour/config/hpux/gcc.cf @@ -45,16 +45,9 @@ LD_OUT := -o LINKPATHS += -L$(LIB_DIR) LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif - # Add the specified GT driver library ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl - # screen driver libraries ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := ncurses diff --git a/harbour/config/linux/gcc.cf b/harbour/config/linux/gcc.cf index 3ee346ff26..03db94dbcc 100644 --- a/harbour/config/linux/gcc.cf +++ b/harbour/config/linux/gcc.cf @@ -57,16 +57,9 @@ LINKLIBS += -Wl,--start-group LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif - # Add the specified GT driver library and other RTLs ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) - # screen driver libraries ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := ncurses diff --git a/harbour/config/linux/icc.cf b/harbour/config/linux/icc.cf index 45fd974302..7d54651e4c 100644 --- a/harbour/config/linux/icc.cf +++ b/harbour/config/linux/icc.cf @@ -51,16 +51,9 @@ LINKLIBS += -Wl,--start-group LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif - # Add the specified GT driver library and other RTLs ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) - # screen driver libraries ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := ncurses diff --git a/harbour/config/linux/sunpro.cf b/harbour/config/linux/sunpro.cf index e778119165..8eecf0104d 100644 --- a/harbour/config/linux/sunpro.cf +++ b/harbour/config/linux/sunpro.cf @@ -57,16 +57,9 @@ LD_OUT := -o$(subst x,x, ) LINKPATHS += -L$(LIB_DIR) LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif - # Add the specified GT driver library ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl - # screen driver libraries ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := ncurses diff --git a/harbour/config/linux/watcom.cf b/harbour/config/linux/watcom.cf index 0dfc348d9c..2434fd42a1 100644 --- a/harbour/config/linux/watcom.cf +++ b/harbour/config/linux/watcom.cf @@ -71,17 +71,8 @@ endif LINKLIBS = $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) - RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv)) -endif - -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) - GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)) -endif - LDFILES = $(subst $(space),$(comma) ,$(^F)) -LDLIBS = $(subst $(space),$(comma) ,$(strip $(LINKLIBS) $(RDDLIBS) $(GTLIBS))) +LDLIBS = $(subst $(space),$(comma) ,$(strip $(LINKLIBS))) ifneq ($(HB_SHELL),sh) LD_RULE = $(LD) $(LDFLAGS) $(HB_USER_LDFLAGS) NAME $(BIN_DIR)/$@. FILE $(LDFILES) else diff --git a/harbour/config/os2/gcc.cf b/harbour/config/os2/gcc.cf index 76c81dc5c1..bc1f31f793 100644 --- a/harbour/config/os2/gcc.cf +++ b/harbour/config/os2/gcc.cf @@ -48,11 +48,6 @@ LINKPATHS += -L$(LIB_DIR) #LINKLIBS += -Wl,-( LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif - # Add the specified GT driver library ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) ifeq ($(C_MAIN),) @@ -60,10 +55,6 @@ 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 diff --git a/harbour/config/os2/watcom.cf b/harbour/config/os2/watcom.cf index 48b55473b2..8a52364d6f 100644 --- a/harbour/config/os2/watcom.cf +++ b/harbour/config/os2/watcom.cf @@ -74,17 +74,8 @@ endif LINKLIBS = $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) - RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv)) -endif - -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) - GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)) -endif - LDFILES = $(subst $(space),$(comma) ,$(^F)) -LDLIBS = $(subst $(space),$(comma) ,$(strip $(LINKLIBS) $(RDDLIBS) $(GTLIBS))) +LDLIBS = $(subst $(space),$(comma) ,$(strip $(LINKLIBS))) LD_RULE = $(LD) $(LDFLAGS) $(HB_USER_LDFLAGS) NAME $(BIN_DIR)/$@ FILE $(LDFILES) $(if $(LDLIBS), LIB $(LDLIBS),) ifeq ($(HB_SHELL),sh) diff --git a/harbour/config/sunos/gcc.cf b/harbour/config/sunos/gcc.cf index aa878f621e..75f01ce67a 100644 --- a/harbour/config/sunos/gcc.cf +++ b/harbour/config/sunos/gcc.cf @@ -44,16 +44,9 @@ LD_OUT := -o LINKPATHS += -L$(LIB_DIR) LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif - # Add the specified GT driver library ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl - # screen driver libraries ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := curses diff --git a/harbour/config/sunos/sunpro.cf b/harbour/config/sunos/sunpro.cf index 1cb2caaf52..06a784af0f 100644 --- a/harbour/config/sunos/sunpro.cf +++ b/harbour/config/sunos/sunpro.cf @@ -67,16 +67,9 @@ LD_OUT := -o$(subst x,x, ) LINKPATHS += -L$(LIB_DIR) LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif - # Add the specified GT driver library ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl - # screen driver libraries ifeq ($(HB_CRS_LIB),) HB_CRS_LIB := curses diff --git a/harbour/config/wce/mingwarm.cf b/harbour/config/wce/mingwarm.cf index e2e36d1fb1..fd02e43deb 100644 --- a/harbour/config/wce/mingwarm.cf +++ b/harbour/config/wce/mingwarm.cf @@ -42,16 +42,6 @@ LINKPATHS += -L$(LIB_DIR) LIBLIST += $(foreach lib, $(LIBS), -l$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LIBLIST += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif - -# Add the specified GT driver library -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LIBLIST += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -endif - SYSLIBS := -lwininet -lws2 LDFLAGS = diff --git a/harbour/config/wce/msvcarm.cf b/harbour/config/wce/msvcarm.cf index bfc1c9d05d..4bcf4c12f5 100644 --- a/harbour/config/wce/msvcarm.cf +++ b/harbour/config/wce/msvcarm.cf @@ -58,16 +58,6 @@ LINKPATHS += /libpath:$(LIB_DIR) # Add all libraries specified in LIBS. LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT)) -endif - -# Add the specified GT driver library -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT)) -endif - LDFLAGS = /nologo $(LINKPATHS) AR := lib.exe diff --git a/harbour/config/wce/poccarm.cf b/harbour/config/wce/poccarm.cf index ccc3e40556..8e6710e4f9 100644 --- a/harbour/config/wce/poccarm.cf +++ b/harbour/config/wce/poccarm.cf @@ -44,16 +44,6 @@ LD_OUT := -OUT: LINKPATHS += -LIBPATH:$(LIB_DIR) LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT)) -endif - -# Add the specified GT driver library -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT)) -endif - LDFLAGS = $(LINKPATHS) coredll.lib corelibc.lib winsock.lib ws2.lib LDFLAGS += /SUBSYSTEM:WINDOWS diff --git a/harbour/config/win/bcc.cf b/harbour/config/win/bcc.cf index e22e6b6467..3ff5f04329 100644 --- a/harbour/config/win/bcc.cf +++ b/harbour/config/win/bcc.cf @@ -19,9 +19,8 @@ CFLAGS += -w -w-sig- -Q endif ifneq ($(HB_BUILD_OPTIM),no) -# for some reason -6 generates the exact same code as -4 -# with both 5.5 and 5.8. -5 seems to be significantly slower -# than both. +# for some reason -6 generates the exact same code as -4 with both 5.5 and 5.8. +# -5 seems to be significantly slower than both. [vszakats] CFLAGS += -d -6 -O2 -OS -Ov -Oi -Oc endif @@ -39,21 +38,11 @@ LD_OUT := -e # Add all libraries specified in LIBS. LINKPATHS += -L$(LIB_DIR) -LIBLIST += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) - -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LIBLIST += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT)) -endif - -# Add the specified GT driver library -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LIBLIST += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT)) -endif +LIBLIST += $(foreach lib, $(LIBS),$(lib)$(LIB_EXT)) # It's probably not necessary in native Windows but I need it # for my Linux box because -L seems to not work with WINE -LINKLIBS = $(foreach lib, $(LIBLIST), $(LIB_DIR)/$(lib)) +LINKLIBS = $(foreach lib, $(LIBLIST),$(LIB_DIR)/$(lib)) LDFLAGS = $(LINKPATHS) diff --git a/harbour/config/win/cygwin.cf b/harbour/config/win/cygwin.cf index a6beb7fc58..b4cd3d0016 100644 --- a/harbour/config/win/cygwin.cf +++ b/harbour/config/win/cygwin.cf @@ -46,16 +46,6 @@ LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) # This library is needed for CharToOemBuff() and OemToCharBuff() support. LINKLIBS += -luser32 -lgdi32 -lws2_32 -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif - -# Add the specified GT driver library -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -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. diff --git a/harbour/config/win/icc.cf b/harbour/config/win/icc.cf index 37bdc63a24..0e46615181 100644 --- a/harbour/config/win/icc.cf +++ b/harbour/config/win/icc.cf @@ -43,16 +43,6 @@ LD_OUT := -Fe LINKPATHS += /link /libpath:$(LIB_DIR) LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT)) -endif - -# Add the specified GT driver library -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT)) -endif - LDFLAGS = $(LINKPATHS) user32.lib ws2_32.lib advapi32.lib gdi32.lib AR := xilib.exe diff --git a/harbour/config/win/mingw.cf b/harbour/config/win/mingw.cf index 458b84fd7f..c012eaee39 100644 --- a/harbour/config/win/mingw.cf +++ b/harbour/config/win/mingw.cf @@ -42,25 +42,15 @@ LIBLIST = # Add all libraries specified in LIBS. LINKPATHS += -L$(LIB_DIR) -LIBLIST += $(foreach lib, $(LIBS), -l$(lib)) - -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LIBLIST += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -endif +LIBLIST += $(foreach lib, $(LIBS),-l$(lib)) # Add the standard C main() entry ifeq ($(HB_MAIN),std) -ifeq ($(findstring vm,$(LIBS)),vm) +ifeq ($(findstring hbvm,$(LIBS)),hbvm) LIBLIST += -lhbmainstd endif endif -# Add the specified GT driver library -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LIBLIST += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -endif - # This library is needed for CharToOemBuff() and OemToCharBuff() support. SYSLIBS := -luser32 -lgdi32 -lws2_32 @@ -71,9 +61,7 @@ RANLIB := $(HB_CCPREFIX)ranlib ifeq ($(AR_RULE),) AR_RULE = $(AR) $(ARFLAGS) cr $(LIB_DIR)/$@ $(^F) && $(RANLIB) $(LIB_DIR)/$@ || $(RM) $(subst /,$(DIRSEP),$(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 $(LIBLIST) -Wl,--end-group $(SYSLIBS) +LINKLIBS = $(LINKPATHS) $(LIBLIST) $(SYSLIBS) endif include $(TOP)$(ROOT)config/rules.cf diff --git a/harbour/config/win/msvc.cf b/harbour/config/win/msvc.cf index 24ce9d8e89..889a5f9949 100644 --- a/harbour/config/win/msvc.cf +++ b/harbour/config/win/msvc.cf @@ -53,16 +53,6 @@ LD_OUT := /out: LINKPATHS += /libpath:$(LIB_DIR) LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT)) -endif - -# Add the specified GT driver library -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT)) -endif - LDFLAGS = /nologo $(LINKPATHS) user32.lib ws2_32.lib advapi32.lib gdi32.lib AR := lib.exe diff --git a/harbour/config/win/pocc.cf b/harbour/config/win/pocc.cf index 4a7ab8d1e4..b8f55fb519 100644 --- a/harbour/config/win/pocc.cf +++ b/harbour/config/win/pocc.cf @@ -41,16 +41,6 @@ LD_OUT := -OUT: LINKPATHS += -LIBPATH:$(LIB_DIR) LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT)) -endif - -# Add the specified GT driver library -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT)) -endif - LDFLAGS = $(LINKPATHS) kernel32.lib user32.lib ws2_32.lib advapi32.lib gdi32.lib LDFLAGS += /SUBSYSTEM:CONSOLE diff --git a/harbour/config/win/watcom.cf b/harbour/config/win/watcom.cf index a6e53fe8e4..bc860da5e0 100644 --- a/harbour/config/win/watcom.cf +++ b/harbour/config/win/watcom.cf @@ -81,8 +81,6 @@ define link_exe_file @echo $(LDFLAGS) NAME $(BIN_DIR)/$@ > __link__.tmp $(foreach file, $(^F), $(link_file)) $(foreach lib, $(LINKLIBS), $(link_lib)) -$(foreach lib, $(RDDLIBS), $(link_lib)) -$(foreach lib, $(GTLIBS), $(link_lib)) @echo LIB ws2_32.lib >> __link__.tmp -$(LD) @__link__.tmp endef @@ -95,18 +93,9 @@ endif LINKLIBS = $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) - RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv)) -endif - -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) - GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)) -endif - LD_RULE = $(link_exe_file) $(HB_USER_LDFLAGS) -#Note: The empty line below HAVE TO exist! +# NOTE: The empty line below HAVE TO exist! define lib_object @echo -+$(file) >> __lib__.tmp diff --git a/harbour/config/win/xcc.cf b/harbour/config/win/xcc.cf index f74c96c2af..32643e0582 100644 --- a/harbour/config/win/xcc.cf +++ b/harbour/config/win/xcc.cf @@ -35,16 +35,6 @@ LD_OUT := -OUT: LINKPATHS += -LIBPATH:$(LIB_DIR) LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) -# If LIBS specifies the RDD library, add all DB drivers. -ifeq ($(findstring hbrdd,$(LIBS)),hbrdd) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT)) -endif - -# Add the specified GT driver library -ifeq ($(findstring hbrtl,$(LIBS)),hbrtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT)) -endif - LDFLAGS = $(LINKPATHS) kernel32.lib user32.lib ws2_32.lib advapi32.lib gdi32.lib AR := xlib.exe diff --git a/harbour/tests/Makefile b/harbour/tests/Makefile index 8bb19f94d8..cbe50caadd 100644 --- a/harbour/tests/Makefile +++ b/harbour/tests/Makefile @@ -8,19 +8,7 @@ endif ROOT := ../ -LIBS := \ - hbdebug \ - hbvm \ - hbrtl \ - hblang \ - hbcpage \ - hbrdd \ - hbrtl \ - hbvm \ - hbmacro \ - hbpp \ - hbcommon \ - hbpcre \ +LIBS = $(HB_LIBS_ST_RDD) ifeq ($(PM),) PM := $(pm) diff --git a/harbour/tests/hbpptest/Makefile b/harbour/tests/hbpptest/Makefile index 11dbd7f224..beb5fefc6f 100644 --- a/harbour/tests/hbpptest/Makefile +++ b/harbour/tests/hbpptest/Makefile @@ -13,17 +13,6 @@ PRG_SOURCES := \ PRG_MAIN := hbpptest.prg -LIBS := \ - hbdebug \ - hbvm \ - hbrtl \ - hblang \ - hbcpage \ - hbrdd \ - hbrtl \ - hbvm \ - hbmacro \ - hbpp \ - hbcommon \ +LIBS = $(HB_LIBS_ST_NORDD) include $(TOP)$(ROOT)config/bin.cf diff --git a/harbour/tests/multifnc/Makefile b/harbour/tests/multifnc/Makefile index 30c226b177..e558e64088 100644 --- a/harbour/tests/multifnc/Makefile +++ b/harbour/tests/multifnc/Makefile @@ -25,17 +25,6 @@ PRG_SOURCES := \ PRG_MAIN := t0.prg -LIBS := \ - hbdebug \ - hbvm \ - hbrtl \ - hblang \ - hbcpage \ - hbrdd \ - hbrtl \ - hbvm \ - hbmacro \ - hbpp \ - hbcommon \ +LIBS = $(HB_LIBS_ST_NORDD) include $(TOP)$(ROOT)config/bin.cf diff --git a/harbour/utils/hbformat/Makefile b/harbour/utils/hbformat/Makefile index 7723659eb8..0b72f57132 100644 --- a/harbour/utils/hbformat/Makefile +++ b/harbour/utils/hbformat/Makefile @@ -16,16 +16,6 @@ C_SOURCES := \ PRG_MAIN := hbformat.prg -LIBS := \ - hbdebug \ - hbvm \ - hbrtl \ - hblang \ - hbcpage \ - hbnulrdd \ - hbrtl \ - hbvm \ - hbmacro \ - hbcommon \ +LIBS = $(HB_LIBS_ST_NORDD) include $(TOP)$(ROOT)config/bin.cf diff --git a/harbour/utils/hbi18n/Makefile b/harbour/utils/hbi18n/Makefile index 567fab8e99..b1a567adf2 100644 --- a/harbour/utils/hbi18n/Makefile +++ b/harbour/utils/hbi18n/Makefile @@ -13,16 +13,6 @@ PRG_SOURCES := \ PRG_MAIN := hbi18n.prg -LIBS := \ - hbdebug \ - hbvm \ - hbrtl \ - hblang \ - hbcpage \ - hbnulrdd \ - hbrtl \ - hbvm \ - hbmacro \ - hbcommon \ +LIBS = $(HB_LIBS_ST_NORDD) include $(TOP)$(ROOT)config/bin.cf diff --git a/harbour/utils/hbmk2/Makefile b/harbour/utils/hbmk2/Makefile index 1a8ea308c8..bf03e092f1 100644 --- a/harbour/utils/hbmk2/Makefile +++ b/harbour/utils/hbmk2/Makefile @@ -13,18 +13,6 @@ PRG_SOURCES := \ PRG_MAIN := hbmk2.prg -LIBS := \ - hbdebug \ - hbvmmt \ - hbrtl \ - hblang \ - hbcpage \ - hbnulrdd \ - hbrtl \ - hbvmmt \ - hbmacro \ - hbcplr \ - hbpp \ - hbcommon \ +LIBS = $(HB_LIBS_MT_NORDD) include $(TOP)$(ROOT)config/bin.cf diff --git a/harbour/utils/hbmk2/hbmk2.hbp b/harbour/utils/hbmk2/hbmk2.hbp index cb1cb05d14..e7926987a0 100644 --- a/harbour/utils/hbmk2/hbmk2.hbp +++ b/harbour/utils/hbmk2/hbmk2.hbp @@ -8,6 +8,10 @@ -mt hbmk2.prg +-lhbcplr +-lhbpp +-lhbcommon + hbmk2.%{hb_lng}.po -hbl=hbmk2.%{hb_lng}.hbl -lng=hu_HU,pt_BR diff --git a/harbour/utils/hbrun/Makefile b/harbour/utils/hbrun/Makefile index 984dbebda7..6ed281345b 100644 --- a/harbour/utils/hbrun/Makefile +++ b/harbour/utils/hbrun/Makefile @@ -13,29 +13,6 @@ PRG_SOURCES := \ PRG_MAIN := hbrun.prg -LIBS := \ - hbextern \ - hbdebug \ - hbvm \ - hbrtl \ - hblang \ - hbcpage \ - hbrdd \ - hbrtl \ - hbvm \ - hbmacro \ - hbcplr \ - hbpp \ - hbcommon \ - -ifeq ($(findstring -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) -ifeq ($(findstring -DHB_POSIX_REGEX, $(HB_USER_CFLAGS)),) -LIBS += hbpcre -endif -endif - -ifeq ($(findstring -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) -LIBS += hbzlib -endif +LIBS = $(HB_LIBS_ST_RDD) include $(TOP)$(ROOT)config/bin.cf diff --git a/harbour/utils/hbrun/hbrun.hbp b/harbour/utils/hbrun/hbrun.hbp index 78945e715a..cce244f23b 100644 --- a/harbour/utils/hbrun/hbrun.hbp +++ b/harbour/utils/hbrun/hbrun.hbp @@ -6,4 +6,8 @@ hbrun.prg +-lhbcplr +-lhbpp +-lhbcommon + -icon={allwin|os2}../../package/harbour.ico diff --git a/harbour/utils/hbtest/Makefile b/harbour/utils/hbtest/Makefile index 54ae39c366..53679bfaca 100644 --- a/harbour/utils/hbtest/Makefile +++ b/harbour/utils/hbtest/Makefile @@ -28,20 +28,8 @@ C_SOURCES := \ PRG_MAIN := hbtest.prg -LIBS := \ - hbdebug \ - hbvm \ - hbrtl \ - hblang \ - hbcpage \ - hbrdd \ - hbrtl \ - hbvm \ - hbmacro \ - hbpp \ - hbcommon \ +LIBS = $(HB_LIBS_ST_RDD) HB_USER_PRGFLAGS += -l- include $(TOP)$(ROOT)config/bin.cf -