Files
harbour-core/harbour/config/linux/watcom.mk
Przemyslaw Czerpak 7d8dad6605 2009-09-24 11:23 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
  * harbour/include/hbcompdf.h
  * harbour/source/pp/pplib.c
  * harbour/source/pp/ppcore.c
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/ppcomp.c
    + added support for disabling all automatically set platform dependent
      macros by '-undef:.ARCH.' switch.
      .ARCH. is meta flag to select all architecture dependent macros:
      __PLATFORM__*, __ARCH??BIT__, __*_ENDIAN__
      It should simplify cross build harbour compiler settings in
      core make system and hbmk2 or hb* scripts.

  * harbour/config/dos/watcom.mk
  * harbour/config/os2/watcom.mk
  * harbour/config/win/pocc.mk
  * harbour/config/win/bcc.mk
  * harbour/config/win/watcom.mk
  * harbour/config/linux/watcom.mk
    * disable C compiler warnings when HB_BUILD_WARN=no. Some compilers
      enable warnings by default.
      It pacifies warnings when external libraries are compiled.
2009-09-24 09:23:34 +00:00

85 lines
1.6 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
else
CPPFLAGS += -w0
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