* harbour/config/bsd/gcc.cf
* harbour/config/darwin/gcc.cf
* harbour/config/dos/bcc16.cf
* harbour/config/dos/djgpp.cf
* harbour/config/dos/owatcom.cf
* harbour/config/dos/rsx32.cf
* harbour/config/hpux/gcc.cf
* harbour/config/linux/gcc.cf
* harbour/config/linux/owatcom.cf
* harbour/config/os2/gcc.cf
* harbour/config/os2/icc.cf
* harbour/config/sunos/gcc.cf
* harbour/config/w32/bcc32.cf
* harbour/config/w32/gcc.cf
* harbour/config/w32/mingw32.cf
* harbour/config/w32/msvc.cf
* harbour/config/w32/rsxnt.cf
* harbour/config/w32/watcom.cf
* added respecting HB_GT_DEFAULT, though it's quite possible that I'll
remove it at all soon.
* some other cleanup
* harbour/source/compiler/complex.c
! fixed wrongly replicated from FLEX lexer condition used to DECLARE.
Now they should be the same as in FLEX lexer but IMHO they are not
Clipper compatible.
* harbour/source/compiler/gencli.c
* harbour/source/compiler/gencobj.c
* harbour/source/compiler/genhrb.c
* harbour/source/compiler/genjava.c
* harbour/source/compiler/genobj32.c
* harbour/source/compiler/harbour.c
* harbour/source/rtl/hbffind.c
* harbour/source/pp/ppcore.c
* harbour/source/rdd/workarea.c
! fixed sizes of some C stack buffers and strncpy() parameters
* use hb_strn*() instead of strn*() in few places to be sure that 0
is always stored in destination buffer
* harbour/source/rtl/gtcgi/gtcgi.c
* change reported GT name from "Standard stream console" to
"Raw stream console" to make it differ then GTSTD one.
127 lines
3.2 KiB
CFEngine3
127 lines
3.2 KiB
CFEngine3
#
|
|
# $Id$
|
|
#
|
|
# The Harbour project
|
|
# GNU MAKE file for OpenWatcom
|
|
|
|
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
|
|
|
|
OBJ_EXT = .obj
|
|
EXE_EXT = .exe
|
|
LIB_PREF =
|
|
LIB_EXT = .lib
|
|
|
|
$(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP = $(subst /,\,$(GRANDP))
|
|
|
|
CC = wpp386
|
|
CC_IN =
|
|
CC_OUT = -fo=
|
|
|
|
#CPPFLAGS = -j -w3 -d1 -5s -5r -fp5 -oehtz -s -zq -zt0 -bt=DOS
|
|
CPPFLAGS = -w2 -d1 -zq -bt=DOS
|
|
|
|
#architecture flags
|
|
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 += -i. -i$(TOP)include -i$(TOP)$(ROOT)include -iinclude
|
|
ifneq ($(HB_LIB_COMPILE),)
|
|
CPPFLAGS += -i$(HB_INC_COMPILE)
|
|
endif
|
|
|
|
# work arround to DOS command line size limit
|
|
export WPP386 := $(strip $(CPPFLAGS))
|
|
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 $(file) >> __link__.tmp
|
|
|
|
endef
|
|
|
|
#Note: The empty line directly before 'endef' HAVE TO exist!
|
|
define link_lib
|
|
echo. LIB $(lib) >> __link__.tmp
|
|
|
|
endef
|
|
|
|
define link_exe_file
|
|
echo. $(LDFLAGS) NAME $@ > __link__.tmp
|
|
$(foreach file, $(^F), $(link_file))
|
|
$(foreach lib, $(HB_USER_LIBS), $(link_lib))
|
|
$(foreach lib, $(LINKLIBS), $(link_lib))
|
|
$(foreach lib, $(RDDLIBS), $(link_lib))
|
|
$(foreach lib, $(GTLIBS), $(link_lib))
|
|
-$(LD) @__link__.tmp
|
|
endef
|
|
|
|
LD = wlink
|
|
LDFLAGS = debug all OP osn=DOS OP stack=65536 OP CASEEXACT OP stub=cwstub.exe
|
|
|
|
ifeq ($(HB_LIB_COMPILE),)
|
|
LINKLIBS := $(foreach lib, $(CONTRIBS), $(subst /,\,$(TOP)$(ROOT)contrib/$(lib)/$(HB_ARCH)/$(subst lib,,$(lib))))
|
|
LINKLIBS += $(foreach lib, $(LIBS), $(subst /,\,$(TOP)$(ROOT)source/$(lib)/$(HB_ARCH)/$(lib)))
|
|
else
|
|
LINKLIBS := $(foreach lib, $(CONTRIBS), $(subst /,\,$(HB_LIB_COMPILE)/$(lib)))
|
|
LINKLIBS += $(foreach lib, $(LIBS), $(subst /,\,$(HB_LIB_COMPILE)/$(lib)))
|
|
endif
|
|
|
|
# If LIBS specifies the rdd library, add all DB drivers.
|
|
ifeq ($(findstring rdd,$(LIBS)),rdd)
|
|
ifeq ($(HB_LIB_COMPILE),)
|
|
RDDLIBS := $(foreach drv, $(HB_DB_DRIVERS), $(TOP)$(ROOT)source/rdd/$(drv)/$(HB_ARCH)/$(drv))
|
|
else
|
|
RDDLIBS := $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv))
|
|
endif
|
|
RDDLIBS := $(subst /,\,$(RDDLIBS))
|
|
endif
|
|
|
|
ifeq ($(findstring rtl,$(LIBS)),rtl)
|
|
ifeq ($(HB_LIB_COMPILE),)
|
|
GTLIBS := $(TOP)$(ROOT)source/rtl/$(HB_GT_LIB)/$(HB_ARCH)/$(HB_GT_LIB)
|
|
else
|
|
GTLIBS := $(HB_LIB_COMPILE)/$(HB_GT_LIB)
|
|
endif
|
|
ifneq ($(HB_GT_DEFAULT),)
|
|
ifneq ($(HB_GT_DEFAULT),$(HB_GT_LIB))
|
|
ifeq ($(HB_LIB_COMPILE),)
|
|
GTLIBS += $(TOP)$(ROOT)source/rtl/$(HB_GT_DEFAULT)/$(HB_ARCH)/$(HB_GT_DEFAULT)
|
|
else
|
|
GTLIBS += $(HB_LIB_COMPILE)/$(HB_GT_DEFAULT)
|
|
endif
|
|
endif
|
|
endif
|
|
GTLIBS := $(subst /,\,$(GTLIBS))
|
|
endif
|
|
|
|
LD_RULE = $(link_exe_file)
|
|
|
|
#Note: The empty line below HAVE TO exist!
|
|
define lib_object
|
|
echo. -+$(file) >> __lib__.tmp
|
|
|
|
endef
|
|
|
|
define create_library
|
|
echo. $@ > __lib__.tmp
|
|
$(foreach file, $(^F), $(lib_object))
|
|
$(AR) $(ARFLAGS) @__lib__.tmp
|
|
endef
|
|
|
|
AR = wlib
|
|
ARFLAGS = -p=32 -c -n $(A_USR)
|
|
AR_RULE = $(create_library)
|
|
|
|
include $(TOP)$(ROOT)config/rules.cf
|
|
|
|
HB := $(subst /,\,$(HB))
|
|
HB_FLAGS := $(subst /,\,$(HB_FLAGS))
|
|
|
|
# work arround to DOS command line size limit
|
|
export HARBOURCMD := $(HB_FLAGS)
|
|
HB_FLAGS =
|