Files
harbour-core/harbour/config/linux/watcom.mk
Viktor Szakats 7f66faac51 2009-08-23 09:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.pt_BR.po
  * utils/hbmk2/hbmk2.hu_HU.po
  * utils/hbmk2/hbmk2.prg
    + Added -implib option. Implemented it for all compilers.
      (some of these don't support -hbdyn option yet though, once we
      got it matured in GNU Make, these can be added to hbmk2)
    + Added linux/watcom dynlib generation. Quite experimental, it doesn't
      work due to missing symbols.
    + Added linux/watcom support for -shared mode. Experimental, it doesn't
      work due to 'invalid library file attribute'. Either the GNU Make
      generate .so is wrong, or it's wrongly specified, or else.
      I hope something can continue watcom dynamic lib support.

  * config/dos/watcom.mk
    * Formatting.

  * config/linux/watcom.mk
    - Deleted 'RUNTIME linux' and 'OP norelocs' options from dynlib gerenation.
2009-08-23 08:00:35 +00:00

83 lines
1.5 KiB
Makefile

#
# $Id$
#
# GNU Make file for Open Watcom C/C++ compiler
OBJ_EXT := .o
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=linux
CFLAGS :=
LDFLAGS := OP quiet
ifneq ($(HB_BUILD_WARN),no)
CPPFLAGS += -w3
endif
ifneq ($(HB_BUILD_OPTIM),no)
# architecture flags
CPPFLAGS += -6r -fp6
# 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
else
CPPFLAGS += -3r
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
LDFLAGS += SYS linux
LDLIBS := $(foreach lib,$(LIBS),$(LIB_DIR)/$(lib))
DY := $(LD)
DFLAGS := OP quiet FORM elf dll LIBPATH $(WATCOM)/lib386 LIBPATH $(WATCOM)/lib386/linux OP exportall
DY_OUT :=
DLIBS :=
# 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)/$@)' @__dyn__.tmp
endef
DY_RULE = $(create_dynlib)
include $(TOP)$(ROOT)config/common/watcom.mk