diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d5f6d9ba6d..15c330b14c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,10 +17,68 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-21 10:54 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * source/pp/Makefile + * bin/hb-mkdyn.bat + + Deleting hbpp dynamic built object to not interfere with + harbour dll creation when picking up the objects with wildcard. + * Changed .dll creation script to not filter out above object + explicitly, it's not needed anymore. + + * source/vm/mainwin.c + * source/vm/mainstd.c + * bin/hb-mkdyn.bat + + Added hack to exclude any content when creating dynamic build + objects for win/watcom. Any content here breaks .dll creation + on this target. + * Changed .dll creation script to not filter out above objects + explicitly, it's not needed anymore. + + * config/global.mk + % Changed CPU detection to use $(filter) + + Added CPU detection based on wce compilers. + + Showing detected host and target CPU architecture in log + (if it could be detected - this is currently only implemented + for non-*nix targets) + - Deleted host binary extension display in verbose mode. + - Deleted now unused HB_BUILD_VERBOSE option. + + * config/global.mk + + Added HB_DYN_VER variable to hold the version number used in Harbour + dynamic libary name. + + * config/bsd/global.mk + * config/darwin/global.mk + * config/hpux/global.mk + * config/linux/global.mk + * config/os2/global.mk + * config/sunos/global.mk + * config/wce/global.mk + * config/win/global.mk + + Added DYN_EXT variables for each platform. + + * source/Makefile + * config/rules.mk + + config/dyn.mk + + source/dynlib + + source/dynlib/mt + + source/dynlib/mt/Makefile + + source/dynlib/Makefile + * config/win/msvc.mk + + Added experimental .dll building feature to the GNU Make system. + It's only implemented for MSVC yet. + The goal is to replace shell specific (postinst) solutions. + + * utils/hbmk2/hbmk2.prg + + Added darwin/icc support. Untested yet. + + * source/vm/maindllp.c + ! Fixed typo in prev commit. + 2009-08-20 21:21 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbxbp/xbpbrowse.prg ! More synchronized horizontal navigation with respect to frozen columns - mouse clicks. - ! Focus maintained on main grid view if mouse is clicked on other parts + ! Focus maintained on main grid view if mouse is clicked on other parts of the browser and scrollbars. /* Your input about artifacts is appreciated */ diff --git a/harbour/bin/hb-mkdyn.bat b/harbour/bin/hb-mkdyn.bat index d8d6dc048e..f4cb1082a1 100644 --- a/harbour/bin/hb-mkdyn.bat +++ b/harbour/bin/hb-mkdyn.bat @@ -209,10 +209,8 @@ for %%f in (%HB_DLL_LIBS% %HB_DLL_LIBS_WIN% %HB_DLL_LIBS_WATCOM%) do ( rem echo ! Processing directory: %%f\%HB_OBJ_DIR% dir /b "%%f\%HB_OBJ_DIR%\*%HB_OBJ_EXT%" > "%HB_BIN_INSTALL%\_hboraw.txt" for /F %%p in (%HB_BIN_INSTALL%\_hboraw.txt) do ( - if not "%%p" == "hbpp%HB_OBJ_EXT%" ( echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_ST%" echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_MT%" - ) ) del "%HB_BIN_INSTALL%\_hboraw.txt" ) else ( echo ! Directory not found: %%f\%HB_OBJ_DIR% ) @@ -223,12 +221,7 @@ for %%f in (%HB_DLL_LIBS_ST%) do ( if exist "%%f\%HB_OBJ_DIR%" ( rem echo ! Processing directory: %%f\%HB_OBJ_DIR% dir /b "%%f\%HB_OBJ_DIR%\*%HB_OBJ_EXT%" > "%HB_BIN_INSTALL%\_hboraw.txt" - for /F %%p in (%HB_BIN_INSTALL%\_hboraw.txt) do ( - if not "%HB_COMPILER%_%%p" == "watcom_mainstd%HB_OBJ_EXT%" ( - if not "%HB_COMPILER%_%%p" == "watcom_mainwin%HB_OBJ_EXT%" ( - echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_ST%" - ) - ) + for /F %%p in (%HB_BIN_INSTALL%\_hboraw.txt) do echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_ST%" ) del "%HB_BIN_INSTALL%\_hboraw.txt" ) else ( echo ! Directory not found: %%f\%HB_OBJ_DIR% ) @@ -239,13 +232,7 @@ for %%f in (%HB_DLL_LIBS_MT%) do ( if exist "%%f\%HB_OBJ_DIR%" ( rem echo ! Processing directory: %%f\%HB_OBJ_DIR% dir /b "%%f\%HB_OBJ_DIR%\*%HB_OBJ_EXT%" > "%HB_BIN_INSTALL%\_hboraw.txt" - for /F %%p in (%HB_BIN_INSTALL%\_hboraw.txt) do ( - if not "%HB_COMPILER%_%%p" == "watcom_mainstd%HB_OBJ_EXT%" ( - if not "%HB_COMPILER%_%%p" == "watcom_mainwin%HB_OBJ_EXT%" ( - echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_MT%" - ) - ) - ) + for /F %%p in (%HB_BIN_INSTALL%\_hboraw.txt) do echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_MT%" del "%HB_BIN_INSTALL%\_hboraw.txt" ) else ( echo ! Directory not found: %%f\%HB_OBJ_DIR% ) ) diff --git a/harbour/config/bsd/global.mk b/harbour/config/bsd/global.mk index 52c2891488..6015399615 100644 --- a/harbour/config/bsd/global.mk +++ b/harbour/config/bsd/global.mk @@ -5,6 +5,7 @@ all : first BIN_EXT := +DYN_EXT := .so HB_GT_LIBS += gttrm diff --git a/harbour/config/darwin/global.mk b/harbour/config/darwin/global.mk index 89c2250574..0b93e45dbd 100644 --- a/harbour/config/darwin/global.mk +++ b/harbour/config/darwin/global.mk @@ -5,5 +5,6 @@ all : first BIN_EXT := +DYN_EXT := .dylib HB_GT_LIBS += gttrm diff --git a/harbour/config/dyn.mk b/harbour/config/dyn.mk new file mode 100644 index 0000000000..a2fa51ef8d --- /dev/null +++ b/harbour/config/dyn.mk @@ -0,0 +1,35 @@ +# +# $Id$ +# + +include $(TOP)$(ROOT)config/global.mk + +ifneq ($(HB_ARCHITECTURE),) +ifneq ($(HB_COMPILER),) + +include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/$(HB_COMPILER).mk +include $(TOP)$(ROOT)config/c.mk +include $(TOP)$(ROOT)config/prg.mk + +DYN_NAME := $(DYN_PREF)$(DYNNAME)$(DYN_EXT) + +DYN_FILE := $(BIN_DIR)/$(DYN_NAME) + +ALL_OBJS := $(subst /,$(DIRSEP),$(foreach dir,$(DYNDIRLIST),$(wildcard $(TOP)$(ROOT)$(dir)/$(OBJ_DIR)/*_dyn$(OBJ_EXT)))) + +first:: dirbase descend + +descend:: dirbase + +@$(MK) $(MKFLAGS) -C $(OBJ_DIR) -f $(GRANDP)Makefile TOP=$(GRANDP) $(DYN_NAME) + +vpath $(DYN_NAME) $(BIN_DIR) +$(DYN_NAME) : $(ALL_OBJS) + $(DY_RULE) + +INSTALL_FILES := $(DYN_FILE) +INSTALL_DIR := $(HB_DYN_INSTALL) + +include $(TOP)$(ROOT)config/install.mk + +endif +endif diff --git a/harbour/config/global.mk b/harbour/config/global.mk index 0c993e5ed8..dda4da1db2 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -230,7 +230,6 @@ ifeq ($(HB_INIT_DONE),) # HB_DB_DRVEXT -> - # HB_COMMERCE -> ? # HB_CRS_LIB -> HB_LIB_CURSES - # HB_BUILD_VERBOSE [ OK ] # HB_BIN_COMPILE -> HB_BUILD_BIN_DIR # HB_INC_COMPILE -> - (HB_BUILD_INC_DIR) # HB_GPM_MOUSE -> HB_HAS_GPM @@ -408,24 +407,12 @@ ifeq ($(HB_HOST_ARCH),) endif endif -ifeq ($(HB_INIT_DONE),) - ifneq ($(MAKE_381),) - $(info ! HB_HOST_ARCH: $(HB_HOST_ARCH) HB_SHELL: $(HB_SHELL) $(if $(HB_SHELL_XP),,(pre-xp))) - endif -endif - ifneq ($(filter $(HB_HOST_ARCH),win wce dos os2),) HB_HOST_BIN_EXT := .exe else HB_HOST_BIN_EXT := endif -ifeq ($(HB_BUILD_VERBOSE),yes) - ifneq ($(MAKE_381),) - $(info ! Detected host executable extension: $(HB_HOST_BIN_EXT)) - endif -endif - # Couldn't find a builds of these tools which would fit Harbour respository, # so these will have to installed by user. #ifeq ($(HB_SHELL),os2) @@ -453,9 +440,9 @@ else # TODO: CPU detection for rest of systems. endif -ifeq ($(HB_BUILD_VERBOSE),yes) +ifeq ($(HB_INIT_DONE),) ifneq ($(MAKE_381),) - $(info ! Detected host CPU: $(HB_HOST_CPU)) + $(info ! HB_HOST_ARCH: $(HB_HOST_ARCH)$(if $(HB_HOST_CPU), ($(HB_HOST_CPU)),) HB_SHELL: $(HB_SHELL) $(if $(HB_SHELL_XP),,(pre-xp))) endif endif @@ -715,13 +702,6 @@ ifeq ($(HB_COMPILER),) $(error ! HB_COMPILER not set, couldn't autodetect) endif -ifeq ($(HB_INIT_DONE),) - ifneq ($(MAKE_381),) - $(info ! HB_ARCHITECTURE: $(HB_ARCHITECTURE) $(HB_ARCH_AUTO)) - $(info ! HB_COMPILER: $(HB_COMPILER) $(HB_COMP_AUTO)) - endif -endif - export HB_ARCHITECTURE export HB_COMPILER @@ -743,32 +723,41 @@ GRANDP := $(subst $(subst x,x, ),,$(foreach item, $(subst /, ,$(OBJ_DIR)), ../)) # TODO: Set this in /.mk HB_CPU := ifeq ($(HB_ARCHITECTURE),win) - ifeq ($(HB_COMPILER),msvc64) + ifneq ($(filter $(HB_COMPILER),msvc64 mingw64 pocc64),) HB_CPU := x86_64 else - ifeq ($(HB_COMPILER),mingw64) - HB_CPU := x86_64 + ifneq ($(filter $(HB_COMPILER),msvcia64 iccia64),) + HB_CPU := ia64 else - ifeq ($(HB_COMPILER),pocc64) - HB_CPU := x86_64 + HB_CPU := x86 + endif + endif +else + ifeq ($(HB_ARCHITECTURE),wce) + ifneq ($(filter $(HB_COMPILER),msvcarm mingwarm poccarm),) + HB_CPU := arm + else + ifneq ($(filter $(HB_COMPILER),msvcmips),) + HB_CPU := mips else - ifeq ($(HB_COMPILER),msvcia64) - HB_CPU := ia64 + ifneq ($(filter $(HB_COMPILER),msvcsh),) + HB_CPU := sh else - ifeq ($(HB_COMPILER),iccia64) - HB_CPU := ia64 - else - HB_CPU := x86 - endif + HB_CPU := x86 endif endif endif + else + ifneq ($(filter $(HB_ARCHITECTURE),dos os2),) + HB_CPU := x86 + endif endif endif -ifeq ($(HB_BUILD_VERBOSE),yes) +ifeq ($(HB_INIT_DONE),) ifneq ($(MAKE_381),) - $(info ! Detected target CPU: $(HB_CPU)) + $(info ! HB_ARCHITECTURE: $(HB_ARCHITECTURE)$(if $(HB_CPU), ($(HB_CPU)),) $(HB_ARCH_AUTO)) + $(info ! HB_COMPILER: $(HB_COMPILER) $(HB_COMP_AUTO)) endif endif @@ -936,6 +925,12 @@ ifneq ($(HB_DB_DRVEXT),) HB_RDD_DIRS += $(HB_DB_DRVEXT) endif +ifeq ($(HB_OS_UNIX),yes) + HB_DYN_VER := 2.0.0 +else + HB_DYN_VER := 20 +endif + ifneq ($(HB_HOST_ARCH),dos) HB_VERSION := 2.0.0beta2 HB_PKGNAME := harbour-$(HB_VERSION)-$(HB_ARCHITECTURE)-$(HB_COMPILER) diff --git a/harbour/config/hpux/global.mk b/harbour/config/hpux/global.mk index 89c2250574..b328d445e1 100644 --- a/harbour/config/hpux/global.mk +++ b/harbour/config/hpux/global.mk @@ -5,5 +5,6 @@ all : first BIN_EXT := +DYN_EXT := .sl HB_GT_LIBS += gttrm diff --git a/harbour/config/linux/global.mk b/harbour/config/linux/global.mk index b6c12216be..1bf4dd5eb3 100644 --- a/harbour/config/linux/global.mk +++ b/harbour/config/linux/global.mk @@ -5,6 +5,7 @@ all : first BIN_EXT := +DYN_EXT := .so HB_GT_LIBS += gttrm diff --git a/harbour/config/os2/global.mk b/harbour/config/os2/global.mk index e9f824b57a..3ec8a3aac4 100644 --- a/harbour/config/os2/global.mk +++ b/harbour/config/os2/global.mk @@ -5,5 +5,6 @@ all : first BIN_EXT := .exe +DYN_EXT := .dll HB_GT_LIBS += gtos2 diff --git a/harbour/config/rules.mk b/harbour/config/rules.mk index cb25a9d5fa..f445448d87 100644 --- a/harbour/config/rules.mk +++ b/harbour/config/rules.mk @@ -57,6 +57,11 @@ ifeq ($(LD_RULE),) LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$(subst /,$(DIRSEP),$(BIN_DIR)/$@) $(^F) $(LDFLAGS) $(HB_USER_LDFLAGS) $(LDLIBS) endif +# The rule to link a dynamic library. +ifeq ($(DY_RULE),) + DY_RULE = $(DY) $(DY_OUT)$(subst /,$(DIRSEP),$(BIN_DIR)/$@) $^ $(DFLAGS) $(HB_USER_DFLAGS) $(DLIBS) +endif + # Eliminate these rules. %.c : %.y @@ -84,3 +89,7 @@ endif # Rule to generate a C file from a PRG file. %.c : $(GRANDP)%.prg $(HB_RULE) + +# Rule to generate an dynamic library from an object file. +%$(DYN_EXT) : %_dyn$(OBJ_EXT) + $(DY_RULE) diff --git a/harbour/config/sunos/global.mk b/harbour/config/sunos/global.mk index 89c2250574..8ae707b9d1 100644 --- a/harbour/config/sunos/global.mk +++ b/harbour/config/sunos/global.mk @@ -5,5 +5,6 @@ all : first BIN_EXT := +DYN_EXT := .so HB_GT_LIBS += gttrm diff --git a/harbour/config/wce/global.mk b/harbour/config/wce/global.mk index da08a6919c..781c9b8ad3 100644 --- a/harbour/config/wce/global.mk +++ b/harbour/config/wce/global.mk @@ -5,6 +5,7 @@ all : first BIN_EXT := .exe +DYN_EXT := .dll HB_GT_LIBS += gtwvt gtgui diff --git a/harbour/config/win/global.mk b/harbour/config/win/global.mk index d2105bb893..444dc2b412 100644 --- a/harbour/config/win/global.mk +++ b/harbour/config/win/global.mk @@ -5,6 +5,7 @@ all : first BIN_EXT := .exe +DYN_EXT := .dll HB_GT_LIBS += gtwvt gtgui gtwin diff --git a/harbour/config/win/msvc.mk b/harbour/config/win/msvc.mk index c8d80ad162..f9a5656cc4 100644 --- a/harbour/config/win/msvc.mk +++ b/harbour/config/win/msvc.mk @@ -63,4 +63,22 @@ AR := lib.exe ARFLAGS := AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) /nologo /out:$(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@ +DY := $(LD) +DFLAGS := /nologo /dll /subsystem:console +DY_OUT := $(LD_OUT) +DLIBS := $(foreach lib,$(SYSLIBS),$(lib)$(LIB_EXT)) + +# NOTE: The empty line directly before 'endef' HAVE TO exist! +define dyn_object + @$(ECHO) $(ECHOQUOTE)$(file)$(ECHOQUOTE) >> __dyn__.tmp + +endef +define create_dynlib + @$(ECHO) $(ECHOQUOTE) $(DFLAGS) > __dyn__.tmp + $(foreach file,$^,$(dyn_object)) + $(DY) $(DY_OUT)"$(subst /,$(DIRSEP),$(BIN_DIR)/$@)"$(ECHOQUOTE) @__dyn__.tmp $(HB_USER_DFLAGS) $(DLIBS) +endef + +DY_RULE = $(create_dynlib) + include $(TOP)$(ROOT)config/rules.mk diff --git a/harbour/source/Makefile b/harbour/source/Makefile index 7f20fda508..d37d65f52d 100644 --- a/harbour/source/Makefile +++ b/harbour/source/Makefile @@ -39,6 +39,7 @@ DIRS := \ hbpcre \ hbzlib \ debug$(HB_COMP_REF) \ + dynlib{codepage,common,hbextern,hbpcre,hbzlib,lang,macro,pp,rdd,rtl,vm} \ endif diff --git a/harbour/source/dynlib/Makefile b/harbour/source/dynlib/Makefile new file mode 100644 index 0000000000..dc08b83f3f --- /dev/null +++ b/harbour/source/dynlib/Makefile @@ -0,0 +1,64 @@ +# +# $Id$ +# + +ROOT := ../../ + +include $(TOP)$(ROOT)config/global.mk + +ifneq ($(HB_ARCHITECTURE),dos) + + DYNNAME_POST := -$(HB_DYN_VER) + + ifeq ($(HB_ARCHITECTURE),win) + ifeq ($(HB_COMPILER),bcc) + DYNNAME_POST := $(DYNNAME_POST)-bcc + else + ifeq ($(HB_CPU),x86_64) + DYNNAME_POST := $(DYNNAME_POST)-x64 + else + ifeq ($(HB_CPU),ia64) + DYNNAME_POST := $(DYNNAME_POST)-ia64 + endif + endif + endif + else + ifeq ($(HB_ARCHITECTURE),wce) + DYNNAME_POST := $(DYNNAME_POST)-wce + ifeq ($(HB_CPU),arm) + DYNNAME_POST := $(DYNNAME_POST)-arm + else + ifeq ($(HB_CPU),mips) + DYNNAME_POST := $(DYNNAME_POST)-mips + else + ifeq ($(HB_CPU),sh) + DYNNAME_POST := $(DYNNAME_POST)-sh + endif + endif + endif + endif + endif + + DYNDIRLIST_BASE := source/common source/pp source/rtl source/macro source/lang source/codepage source/hbpcre source/hbzlib source/hbextern source/rdd source/rdd/dbfntx source/rdd/dbfnsx source/rdd/dbfcdx source/rdd/dbffpt source/rdd/hbsix source/rdd/hsx source/rdd/usrrdd source/rtl/gtcgi source/rtl/gtpca source/rtl/gtstd source/rtl/gtwvt source/rtl/gtgui + ifneq ($(HB_ARCHITECTURE),wce) + DYNDIRLIST_BASE += source/rtl/gtwin + endif + ifeq ($(HB_ARCHITECTURE)-$(HB_COMPILER),win-watcom) + DYNDIRLIST_BASE += source/vm/maindllh + endif + + export DYNDIRLIST_BASE + export DYNNAME_POST + + DYNDIRLIST := $(DYNDIRLIST_BASE) source/vm + DYNNAME := harbour$(DYNNAME_POST) + + DIRS := mt + + include $(TOP)$(ROOT)config/dyn.mk + ifneq ($(DIRS),) + include $(TOP)$(ROOT)config/dir.mk + endif +else + include $(TOP)$(ROOT)config/none.mk +endif diff --git a/harbour/source/dynlib/mt/Makefile b/harbour/source/dynlib/mt/Makefile new file mode 100644 index 0000000000..9365e0e1b4 --- /dev/null +++ b/harbour/source/dynlib/mt/Makefile @@ -0,0 +1,22 @@ +# +# $Id$ +# + +ROOT := ../../../ + +include $(TOP)$(ROOT)config/global.mk + +ifneq ($(DYNDIRLIST_BASE),) + ifneq ($(HB_ARCHITECTURE),dos) + + DYNDIRLIST := $(DYNDIRLIST_BASE) source/vm/vmmt + DYNNAME := harbourmt$(DYNNAME_POST) + + include $(TOP)$(ROOT)config/dyn.mk + else + include $(TOP)$(ROOT)config/none.mk + endif +else + $(warning ! Warning: Please run make from one level up) + include $(TOP)$(ROOT)config/none.mk +endif diff --git a/harbour/source/pp/Makefile b/harbour/source/pp/Makefile index 80fe84aa73..56eae05f48 100644 --- a/harbour/source/pp/Makefile +++ b/harbour/source/pp/Makefile @@ -32,7 +32,7 @@ vpath hbpp$(BIN_EXT) $(BIN_DIR) pptable.c : hbpp$(BIN_EXT) $(HB_HOST_BIN_DIR)/hbpp$(HB_HOST_BIN_EXT) $(TOP)$(ROOT)include/hbstdgen.ch -opptable.c -q -c$(TOP)$(ROOT) -v$(HB_VERHEADER) -@$(RM) hbpp$(OBJ_EXT) - + $(if $(wildcard hbpp_dyn$(OBJ_EXT)), -@$(RM) hbpp_dyn$(OBJ_EXT),) ifneq ($(HB_HOST_BUILD),lib) ifneq ($(HB_BIN_INSTALL),) diff --git a/harbour/source/vm/maindllp.c b/harbour/source/vm/maindllp.c index 35dbc513e2..00ef6f93ed 100644 --- a/harbour/source/vm/maindllp.c +++ b/harbour/source/vm/maindllp.c @@ -73,10 +73,10 @@ #if defined( HB_OS_WIN_CE ) && defined( HB_CPU_ARM ) #define HB_DLL_NAME2 TEXT( HB_DLL_PREF HB_DLL_VER "-wce-arm" HB_DLL_EXT ) #define HB_DLL_NAMEMT2 TEXT( HB_DLL_PREF_MT HB_DLL_VER "-wce-arm" HB_DLL_EXT ) -#if defined( HB_OS_WIN_CE ) && defined( HB_CPU_MIPS ) +#elif defined( HB_OS_WIN_CE ) && defined( HB_CPU_MIPS ) #define HB_DLL_NAME2 TEXT( HB_DLL_PREF HB_DLL_VER "-wce-mips" HB_DLL_EXT ) #define HB_DLL_NAMEMT2 TEXT( HB_DLL_PREF_MT HB_DLL_VER "-wce-mips" HB_DLL_EXT ) -#if defined( HB_OS_WIN_CE ) && defined( HB_CPU_SH ) +#elif defined( HB_OS_WIN_CE ) && defined( HB_CPU_SH ) #define HB_DLL_NAME2 TEXT( HB_DLL_PREF HB_DLL_VER "-wce-sh" HB_DLL_EXT ) #define HB_DLL_NAMEMT2 TEXT( HB_DLL_PREF_MT HB_DLL_VER "-wce-sh" HB_DLL_EXT ) #elif defined( HB_OS_WIN_CE ) diff --git a/harbour/source/vm/mainstd.c b/harbour/source/vm/mainstd.c index 5fa7ae2409..12d67faf42 100644 --- a/harbour/source/vm/mainstd.c +++ b/harbour/source/vm/mainstd.c @@ -53,6 +53,8 @@ #include "hbapi.h" #include "hbvm.h" +#if !( defined( HB_DYNLIB ) && defined( __WATCOM__ ) ) + HB_EXTERN_BEGIN #if defined( __MINGW32__ ) int _CRT_glob = 0; @@ -94,3 +96,5 @@ void hb_forceLinkMainStd( void ) {} #endif HB_EXTERN_END + +#endif diff --git a/harbour/source/vm/mainwin.c b/harbour/source/vm/mainwin.c index d7174a9811..a0586b173f 100644 --- a/harbour/source/vm/mainwin.c +++ b/harbour/source/vm/mainwin.c @@ -55,6 +55,8 @@ #include "hbapi.h" #include "hbvm.h" +#if !( defined( HB_DYNLIB ) && defined( __WATCOM__ ) ) + #if defined( HB_OS_WIN ) #define HB_VM_STARTUP @@ -67,3 +69,5 @@ HB_EXTERN_END #endif #endif + +#endif diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 20d3f17e06..a8b63fab32 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -856,6 +856,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) DO CASE CASE hbmk[ _HBMK_cARCH ] == "linux" aCOMPSUP := { "gcc", "watcom", "icc", "sunpro" } + CASE hbmk[ _HBMK_cARCH ] == "darwin" + aCOMPSUP := { "gcc", "icc" } CASE hbmk[ _HBMK_cARCH ] == "sunos" aCOMPSUP := { "gcc", "sunpro" } OTHERWISE @@ -1992,7 +1994,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) ( hbmk[ _HBMK_cARCH ] == "hpux" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ; ( hbmk[ _HBMK_cARCH ] == "sunos" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ; ( hbmk[ _HBMK_cARCH ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ; - ( hbmk[ _HBMK_cARCH ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "icc" ) + ( hbmk[ _HBMK_cARCH ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "icc" ) .OR. ; + ( hbmk[ _HBMK_cARCH ] == "darwin" .AND. hbmk[ _HBMK_cCOMP ] == "icc" ) nCmd_Esc := _ESC_NIX IF hbmk[ _HBMK_lDEBUG ] @@ -2002,7 +2005,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) cLibPrefix := "-l" cLibExt := "" cObjExt := ".o" - IF hbmk[ _HBMK_cARCH ] == "darwin" + IF hbmk[ _HBMK_cARCH ] == "darwin" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" /* TODO: Check what to use for icc */ cBin_Lib := "libtool" cOpt_Lib := "-static {FA} -o {OL} {LO}" ELSE @@ -2053,7 +2056,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) IF hbmk[ _HBMK_lSTATICFULL ] AAdd( hbmk[ _HBMK_aOPTL ], "-static" ) ENDIF - IF hbmk[ _HBMK_cARCH ] == "darwin" + IF hbmk[ _HBMK_cARCH ] == "darwin" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" AAdd( hbmk[ _HBMK_aOPTC ], "-no-cpp-precomp" ) AAdd( hbmk[ _HBMK_aOPTC ], "-Wno-long-double" ) IF hbmk[ _HBMK_lSHARED ] @@ -6597,7 +6600,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong ) "",; I_( "Supported values for each supported value:" ),; " - linux : gcc, watcom, icc, sunpro",; - " - darwin : gcc",; + " - darwin : gcc, icc",; " - win : mingw, msvc, bcc, watcom, icc, pocc, cygwin, xcc,",; " - mingw64, msvc64, msvcia64, iccia64, pocc64",; " - wce : mingwarm, msvcarm, poccarm",;