Files
harbour-core/harbour/config/dos/watcom.cf
Viktor Szakats 25ab839bd0 2009-07-15 22:28 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/rules.cf
  * config/dos/watcom.cf
  * config/dos/dir.cf
  * config/dos/global.cf
  * config/dos/install.cf
  * config/win/watcom.cf
  * config/win/global.cf
  * config/win/install.cf
  * config/win/dir.cf
  * config/win/bcc.cf
  * config/linux/watcom.cf
  * config/linux/dir.cf
  * config/linux/global.cf
  * config/linux/install.cf
  * config/os2/watcom.cf
  * config/os2/dir.cf
  * config/os2/global.cf
  * config/os2/install.cf
  * config/wce/dir.cf
  * config/wce/global.cf
  * config/wce/install.cf
    % Using HB_SHELL variable for shell detection.
    % Using HB_HOST_ARCH variable for host detection.

  * config/os2/install.cf
  * config/linux/install.cf
    * Indentation of bash install rules in win/wce/linux.

  * config/darwin/install.cf
  * config/hpux/install.cf
  * config/sunos/install.cf
  * config/bsd/install.cf
    * Minor sync with other copies. Still not fully the same (the first line).
2009-07-15 20:29:33 +00:00

144 lines
3.2 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
# ---------------------------------------------------------------
OBJ_EXT = .obj
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=
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
ifeq ($(HB_BUILD_DEBUG),yes)
CPPFLAGS += -d2
endif
ifeq ($(CC),wcc386)
ifneq ($(HB_HOST_ARCH),linux)
CPPFLAGS := $(subst /,\,$(CPPFLAGS))
CC_RULE = $(CC) $(CPPFLAGS) $(subst /,\,$(CFLAGS)) $(HB_CDBG) $(subst /,\,$(HB_USER_CFLAGS)) $(HB_CDYNLIB) $(CC_IN)$(subst /,\,$<) $(CC_OUT)$(<F:.c=$(OBJ_EXT))
endif
endif
# work arround to DOS command line size limit
ifeq ($(CC),wcc386)
export WCC386 := $(strip $(CPPFLAGS))
else
export WPP386 := $(strip $(CPPFLAGS))
endif
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 $(EXE_DIR)/$@ > __link__.tmp
$(foreach file, $(^F), $(link_file))
$(foreach lib, $(LINKLIBS), $(link_lib))
$(foreach lib, $(RDDLIBS), $(link_lib))
$(foreach lib, $(GTLIBS), $(link_lib))
-$(LD) @__link__.tmp
endef
LD = wlink
# different SYS values: dos4g (default), pmodew (commercial), causeway
ifeq ($(LIBNAME),hbpp)
# we force causeway here as workaround for reduced command line size in dos4g
LDFLAGS = SYS causeway
else
LDFLAGS = SYS dos4g op stub=wstubq.exe
endif
ifeq ($(HB_BUILD_DEBUG),yes)
LDFLAGS := debug all $(LDFLAGS)
endif
LINKLIBS = $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib))
# If LIBS specifies the RDD library, add all DB drivers.
ifeq ($(findstring hbrdd,$(LIBS)),hbrdd)
RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv))
endif
ifeq ($(findstring hbrtl,$(LIBS)),hbrtl)
GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt))
endif
LD_RULE = $(link_exe_file) $(HB_USER_LDFLAGS)
#Note: The empty line below HAVE TO exist!
define lib_object
@echo -+$(file) >> __lib__.tmp
endef
define create_library
@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)
# disable DOS/4GW Banner
export DOS4G=quiet
include $(TOP)$(ROOT)config/rules.cf
# work arround to DOS command line size limit
export HARBOURCMD := $(HB_FLAGS)
HB_FLAGS =