diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c21f7e82f1..62b5de5c11 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,19 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-03-28 18:09 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * config/dos/owatcom.cf + * config/win/owatcom.cf + * config/linux/owatcom.cf + * config/os2/owatcom.cf + + Added HB_BUILD_MODE=c/cpp support for Watcom compilers. + + Tweaked optimization options to work with wcc386 (C mode compiler). + + Tweaked C make rule for wcc386 (only accepts backslashes). + ; So now sqlite3 will be forced to C mode and will compile. + ; TOFIX: .cpp file compilation will be broken in forced C mode, + so more cleanup will be needed here if we want to allow + all combinations. + 2009-03-28 00:20 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/gtwvg/gtwvg.h * harbour/contrib/gtwvg/wvggui.h @@ -53,7 +66,7 @@ * harbour/contrib/gtwvg/wvgtreev.prg * harbour/contrib/gtwvg/wvgwnd.prg ! Comments converted to ANSI standards. - ! Formatting whereever needed. + ! Formatting whereever needed. ; Perhaps no comment is left which do not confirm to ANSI standards. diff --git a/harbour/config/dos/owatcom.cf b/harbour/config/dos/owatcom.cf index 4298e9306e..9e1d58ee3e 100644 --- a/harbour/config/dos/owatcom.cf +++ b/harbour/config/dos/owatcom.cf @@ -21,7 +21,16 @@ endif $(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP = $(subst /,\,$(GRANDP)) +ifeq ($(HB_BUILD_MODE),c) +CC = wcc386 +endif +ifeq ($(HB_BUILD_MODE),cpp) CC = wpp386 +endif +# Build in C++ mode by default +ifeq ($(HB_BUILD_MODE),) +CC = wpp386 +endif CC_IN = CC_OUT = -fo= @@ -38,7 +47,12 @@ CPPFLAGS += -5 -fp5 # optimization flags # don't enable -ol optimization in OpenWatcom 1.1 - gives buggy code -CPPFLAGS += -onaehtzr -oi+ -ei -zp8 -s -zt0 +CPPFLAGS += -onaehtzr -ei -zp8 -s -zt0 +ifeq ($(CC),wpp386) +CPPFLAGS += -oi+ +else +CPPFLAGS += -oi +endif endif CPPFLAGS += -i. -i$(TOP)$(ROOT)include diff --git a/harbour/config/linux/owatcom.cf b/harbour/config/linux/owatcom.cf index 4fd9fa85d5..81d8c5bc5c 100644 --- a/harbour/config/linux/owatcom.cf +++ b/harbour/config/linux/owatcom.cf @@ -11,7 +11,16 @@ EXE_EXT = LIB_PREF = LIB_EXT = .lib +ifeq ($(HB_BUILD_MODE),c) +CC = wcc386 +endif +ifeq ($(HB_BUILD_MODE),cpp) CC = wpp386 +endif +# Build in C++ mode by default +ifeq ($(HB_BUILD_MODE),) +CC = wpp386 +endif CC_IN = CC_OUT = -fo= @@ -28,7 +37,12 @@ CPPFLAGS += -5 -fp5 # optimization flags # don't enable -ol optimization in OpenWatcom 1.1 - gives buggy code -CPPFLAGS += -onaehtzr -oi+ -ei -zp8 -s -zt0 +CPPFLAGS += -onaehtzr -ei -zp8 -s -zt0 +ifeq ($(CC),wpp386) +CPPFLAGS += -oi+ +else +CPPFLAGS += -oi +endif endif diff --git a/harbour/config/os2/owatcom.cf b/harbour/config/os2/owatcom.cf index f32a0ad68d..0a74e220b7 100644 --- a/harbour/config/os2/owatcom.cf +++ b/harbour/config/os2/owatcom.cf @@ -11,7 +11,16 @@ EXE_EXT = .exe LIB_PREF = LIB_EXT = .lib +ifeq ($(HB_BUILD_MODE),c) +CC = wcc386 +endif +ifeq ($(HB_BUILD_MODE),cpp) CC = wpp386 +endif +# Build in C++ mode by default +ifeq ($(HB_BUILD_MODE),) +CC = wpp386 +endif CC_IN = CC_OUT = -fo= @@ -28,7 +37,12 @@ CPPFLAGS += -5 -fp5 # optimization flags # don't enable -ol optimization in OpenWatcom 1.1 - gives buggy code -CPPFLAGS += -onaehtzr -oi+ -ei -zp8 -s -zt0 +CPPFLAGS += -onaehtzr -ei -zp8 -s -zt0 +ifeq ($(CC),wpp386) +CPPFLAGS += -oi+ +else +CPPFLAGS += -oi +endif endif CPPFLAGS += -i. -i$(TOP)$(ROOT)include diff --git a/harbour/config/win/owatcom.cf b/harbour/config/win/owatcom.cf index 47e4a62984..6ce17fe9c5 100644 --- a/harbour/config/win/owatcom.cf +++ b/harbour/config/win/owatcom.cf @@ -11,7 +11,16 @@ EXE_EXT = .exe LIB_PREF = LIB_EXT = .lib +ifeq ($(HB_BUILD_MODE),c) +CC = wcc386 +endif +ifeq ($(HB_BUILD_MODE),cpp) CC = wpp386 +endif +# Build in C++ mode by default +ifeq ($(HB_BUILD_MODE),) +CC = wpp386 +endif CC_IN = CC_OUT = -fo= @@ -27,7 +36,12 @@ ifneq ($(HB_BUILD_OPTIM),no) CPPFLAGS += -5s -fp5 # optimization flags # don't enable -ol optimization in OpenWatcom 1.1 - gives buggy code -CPPFLAGS += -onaehtzr -oi+ -ei -zp8 -s -zt0 +CPPFLAGS += -onaehtzr -ei -zp8 -s -zt0 +ifeq ($(CC),wpp386) +CPPFLAGS += -oi+ +else +CPPFLAGS += -oi +endif else CPPFLAGS += -3s endif @@ -41,6 +55,10 @@ ifeq ($(HB_BUILD_DEBUG),yes) CPPFLAGS += -d2 endif +ifeq ($(CC),wcc386) +CC_RULE = $(CC) $(subst /,\,$(CPPFLAGS)) $(subst /,\,$(CFLAGS)) $(HB_CDBG) $(HB_USER_CFLAGS) $(HB_CDYNLIB) $(subst /,\,$(CC_IN)) $(subst /,\,$<) $(CC_OUT)$(