Files
harbour-core/harbour/config/dos/watcom.mk
Viktor Szakats 803c52d710 2009-09-19 16:47 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/bin.mk
    + Added HB_BUILD_SHARED support for os2/watcom.

  * source/Makefile
    * Deleted env space saving optimization for dos platform
      and added support for gtdos when building dos .dlls.
    % Deleted line after prev changes.

  * config/global.mk
    + Added special .dll names when building dos based ones.
      (harbour / harbourm)

  * config/dos/watcom.mk
    + Enabled absolutely experimental dos .dll support.
    ; Current result:
      ---
      wlink OP quiet SYS cwdllr  NAME '..\..\..\..\..\bin\dos\watcom\harbour' OP implib='../../.
      ./../../lib/dos/watcom/harbour.lib' @__dyn__.tmp
      Warning! W1027: file clib3r.lib(cstart): redefinition of ___begtext ignored
      Warning! W1027: file clib3r.lib(cstart): redefinition of __nullarea ignored
      Warning! W1027: file clib3r.lib(cstart): redefinition of __D16Infoseg ignored
      Warning! W1027: file clib3r.lib(cstart): redefinition of __x386_zero_base_selector ignored
      
      Warning! W1027: file clib3r.lib(cstart): redefinition of __exit_ ignored
      Warning! W1027: file clib3r.lib(cstart): redefinition of __do_exit_with_msg__ ignored
      Warning! W1027: file clib3r.lib(cstart): redefinition of __GETDS ignored
      Warning! W1027: file clib3r.lib(cstart): redefinition of ___GETDSStart_ ignored
      Warning! W1027: file clib3r.lib(cstart): redefinition of ___GETDSEnd_ ignored
      Error! E2030: file clib3r.lib(cstart): multiple starting addresses found
      mingw32-make.exe[2]: *** [harbour] Error 1
      ---
    ; TOFIX: hbpp object will be (or is) again a showstopper.

  * config/win/watcom.mk
    * Synced with dos/watcom.mk after above change.
2009-09-19 14:56:55 +00:00

102 lines
2.1 KiB
Makefile

#
# $Id$
#
# GNU Make file for Open Watcom C/C++ compiler
OBJ_EXT := .obj
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
CFLAGS :=
LDFLAGS := OP quiet
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
# -oxaht
CPPFLAGS += -onaehtr -s -ei -zp4 -zt0
#CPPFLAGS += -obl+m
ifeq ($(CC),wpp386)
CPPFLAGS += -oi+
else
CPPFLAGS += -oi
endif
endif
CPPFLAGS += -i. -i$(HB_INC_COMPILE)
ifeq ($(HB_BUILD_DEBUG),yes)
CPPFLAGS += -d2
endif
LD := wlink
ifeq ($(HB_BUILD_DEBUG),yes)
LDFLAGS += DEBUG ALL
endif
# 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
LDLIBS := $(foreach lib,$(LIBS),$(LIB_DIR)/$(lib))
ifneq ($(HB_LINKING_RTL),)
ifneq ($(HB_HAS_WATT),)
LDLIBS += $(HB_LIB_WATT)/wattcpwf
endif
endif
DY := $(LD)
DFLAGS := OP quiet SYS cwdllr
DY_OUT :=
DLIBS := $(foreach lib,$(LIBS),$(LIB_DIR)/$(lib))
DLIBS += $(foreach lib,$(SYSLIBS),$(lib))
DLIBS := $(strip $(DLIBS))
ifneq ($(DLIBS),)
comma := ,
DLIBS_COMMA := LIB $(subst $(subst x,x, ),$(comma) ,$(DLIBS))
else
DLIBS_COMMA :=
endif
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dyn_object
@$(ECHO) $(ECHOQUOTE)FILE '$(file)'$(ECHOQUOTE) >> __dyn__.tmp
endef
define create_dynlib
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
$(foreach file,$^,$(dyn_object))
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) NAME '$(subst /,$(DIRSEP),$(DYN_DIR)/$@)' OP implib='$(IMP_FILE)' @__dyn__.tmp $(DLIBS_COMMA)
endef
DY_RULE = $(create_dynlib)
include $(TOP)$(ROOT)config/common/watcom.mk