From e537249bdc77a476c79820f94fe6f8628da133a8 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sat, 11 Jul 2009 14:55:34 +0000 Subject: [PATCH] 2009-07-11 16:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/external/sqlite3/Makefile * set SQLITE_OS_OTHER for all DOS builds * harbour/config/dos/watcom.cf * harbour/config/win/watcom.cf * modified to work with *nix like shells so it can be used in cross build environment Now in my Linux box I can create Windows, DOS and OS2 harbour builds using OpenWatcom 1.8 and native Linux binaries. Final Windows executables works correctly. DOS one doesn't and it's probably problem with OpenWatcom Linux linker and DOS DPMI stubs - I'll check it yet. I cannot tested generated OS2 executable files. If someone has OS2 and can try to run it then I can send them to him for test. --- harbour/ChangeLog | 16 ++++++++++++++++ harbour/config/dos/watcom.cf | 24 +++++------------------- harbour/config/win/watcom.cf | 2 ++ harbour/external/sqlite3/Makefile | 6 +++--- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4137ec1c77..5dd6d5aa56 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,22 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-11 16:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/external/sqlite3/Makefile + * set SQLITE_OS_OTHER for all DOS builds + + * harbour/config/dos/watcom.cf + * harbour/config/win/watcom.cf + * modified to work with *nix like shells so it can be used in cross build + environment + + Now in my Linux box I can create Windows, DOS and OS2 harbour builds + using OpenWatcom 1.8 and native Linux binaries. Final Windows executables + works correctly. DOS one doesn't and it's probably problem with + OpenWatcom Linux linker and DOS DPMI stubs - I'll check it yet. + I cannot tested generated OS2 executable files. If someone has + OS2 and can try to run it then I can send them to him for test. + 2009-07-11 16:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * make_gnu.bat + Minor adjustment to support OS/2 cross-builds. diff --git a/harbour/config/dos/watcom.cf b/harbour/config/dos/watcom.cf index 5f8ebb274d..d908850839 100644 --- a/harbour/config/dos/watcom.cf +++ b/harbour/config/dos/watcom.cf @@ -17,16 +17,6 @@ EXE_EXT = .exe LIB_PREF = LIB_EXT = .lib -ifeq ($(SHLVL),) - ECHO=@echo. - DSEP=$(subst /,\,\) -else - ECHO=echo - DSEP=$(subst /,\,\\) -endif - -$(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP = $(subst /,\,$(GRANDP)) - ifeq ($(HB_BUILD_MODE),c) CC = wcc386 endif @@ -77,18 +67,18 @@ CPPFLAGS = # Note: The empty line directly before 'endef' HAVE TO exist! # It causes that the 'echo' command is separated by LF define link_file -$(ECHO) FILE $(subst /,$(DSEP),$(subst \,/,$(file))) >> __link__.tmp +@echo FILE $(file) >> __link__.tmp endef #Note: The empty line directly before 'endef' HAVE TO exist! define link_lib -$(ECHO) LIB $(subst /,$(DSEP),$(subst \,/,$(lib))) >> __link__.tmp +@echo LIB $(lib) >> __link__.tmp endef define link_exe_file -$(ECHO) $(subst /,$(DSEP),$(subst \,/,$(LDFLAGS))) NAME $@ > __link__.tmp +@echo $(LDFLAGS) NAME $@ > __link__.tmp $(foreach file, $(^F), $(link_file)) $(foreach lib, $(HB_USER_LIBS), $(link_lib)) $(foreach lib, $(LINKLIBS), $(link_lib)) @@ -138,17 +128,16 @@ LD_RULE = $(link_exe_file) $(HB_USER_LDFLAGS) #Note: The empty line below HAVE TO exist! define lib_object -$(ECHO) -+$(subst /,$(DSEP),$(subst \,/,$(file))) >> __lib__.tmp +@echo -+$(file) >> __lib__.tmp endef define create_library -$(ECHO) $(subst /,$(DSEP),$(subst \,/,$(LIB_DIR)))$(DSEP)$@ > __lib__.tmp +@echo $(LIB_DIR)/$@ > __lib__.tmp $(foreach file, $(^F), $(lib_object)) $(AR) $(ARFLAGS) @__lib__.tmp endef - AR = wlib ARFLAGS = -p=64 -c -n $(HB_USER_AFLAGS) AR_RULE = $(create_library) @@ -158,9 +147,6 @@ export DOS4G=quiet include $(TOP)$(ROOT)config/rules.cf -HB := $(subst /,$(DSEP),$(subst \,/,$(HB))) -HB_FLAGS := $(subst /,$(DSEP),$(subst \,/,$(HB_FLAGS))) - # work arround to DOS command line size limit export HARBOURCMD := $(HB_FLAGS) HB_FLAGS = diff --git a/harbour/config/win/watcom.cf b/harbour/config/win/watcom.cf index 022ea445d4..cafc71c4c3 100644 --- a/harbour/config/win/watcom.cf +++ b/harbour/config/win/watcom.cf @@ -62,9 +62,11 @@ ifeq ($(HB_BUILD_DEBUG),yes) CPPFLAGS += -d2 endif +ifeq ($(SHLVL),) # NT Shell ifeq ($(CC),wcc386) CC_RULE = $(CC) $(subst /,\,$(CPPFLAGS)) $(subst /,\,$(CFLAGS)) $(HB_CDBG) $(subst /,\,$(HB_USER_CFLAGS)) $(HB_CDYNLIB) $(subst /,\,$(CC_IN)) $(subst /,\,$<) $(CC_OUT)$(