Files
harbour-core/harbour/config/dos/watcom.cf
Viktor Szakats a12807edfe 2009-06-12 09:26 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* doc/man/hbmk.1
  * doc/whatsnew.txt
  * INSTALL
  * bin/hb-mkdyn.bat
  * external/libhpdf/Makefile
  * make_gnu.bat
  * utils/hbmk2/hbmk2.pt_BR.po
  * utils/hbmk2/hbmk2.hu_HU.po
  * utils/hbmk2/hbmk2.prg
  * utils/hbmk2/examples/contribf.hbc
  * source/vm/Makefile
  * contrib/gtalleg/Makefile
  * contrib/hbqt/Makefile
  * contrib/hbxbp/Makefile
  * contrib/gtqtc/Makefile
  * contrib/gtwvg/Makefile
  * contrib/hbssl/Makefile
  * config/dos/global.cf
  - config/dos/owatcom.cf
  + config/dos/watcom.cf
  - config/win/owatcom.cf
  + config/win/watcom.cf
  - config/linux/owatcom.cf
  + config/linux/watcom.cf
  - config/os2/owatcom.cf
  + config/os2/watcom.cf
    * Renamed 'owatcom' to 'watcom'.
      Please adjust your make files, or just let them autodetect.

  * utils/hbmk2/examples/contribf.hbc
    ! Adjusted hbsqlit3 filter after enabling for dos.

  * external/sqlite3/Makefile
    + Added comment for DJGPP hack.
2009-06-12 07:28:53 +00:00

159 lines
3.7 KiB
CFEngine3

#
# $Id$
#
# GNU MAKE file for Open Watcom C/C++ compiler
# ---------------------------------------------------------------
# See option docs here:
# http://www.users.pjwstk.edu.pl/~jms/qnx/help/watcom/compiler-tools/cpopts.html
# http://www.users.pjwstk.edu.pl/~jms/qnx/help/watcom/compiler-tools/wlink.html
# ---------------------------------------------------------------
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
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
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=
CPPFLAGS = -zq -bt=DOS
ifneq ($(HB_BUILD_WARN),no)
CPPFLAGS += -w3
endif
ifneq ($(HB_BUILD_OPTIM),no)
# architecture flags
CPPFLAGS += -5r -fp5
# optimization flags
# don't enable -ol optimization in OpenWatcom 1.1 - gives buggy code
CPPFLAGS += -onaehtr -s -ei -zp4 -zt0
#CPPFLAGS += -obl+m
ifeq ($(CC),wpp386)
CPPFLAGS += -oi+
else
CPPFLAGS += -oi
endif
endif
CPPFLAGS += -i. -i$(TOP)$(ROOT)include
ifneq ($(HB_LIB_COMPILE),)
CPPFLAGS += -i$(HB_INC_COMPILE)
endif
ifeq ($(HB_BUILD_DEBUG),yes)
CPPFLAGS += -d2
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 $(subst /,$(DSEP),$(subst \,/,$(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
endef
define link_exe_file
$(ECHO) $(subst /,$(DSEP),$(subst \,/,$(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
# other SYS values: dos4g (default), pmodew (commercial)
LDFLAGS = SYS causeway
ifeq ($(HB_BUILD_DEBUG),yes)
LDFLAGS := debug all $(LDFLAGS)
endif
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS = $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib))
LINKLIBS += $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib))
else
LINKLIBS = $(foreach lib, $(CONTRIBS), $(HB_LIB_COMPILE)/$(lib))
LINKLIBS += $(foreach lib, $(LIBS), $(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), $(LIB_DIR)/$(drv))
else
RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv))
endif
endif
ifeq ($(findstring rtl,$(LIBS)),rtl)
ifeq ($(HB_LIB_COMPILE),)
GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt))
else
GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(HB_LIB_COMPILE)/$(gt))
endif
endif
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
endef
define create_library
$(ECHO) $(subst /,$(DSEP),$(subst \,/,$(LIB_DIR)))$(DSEP)$@ > __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)
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 =