Files
harbour-core/harbour/config/win/icc.mk
Viktor Szakats 7f657c2bb4 2012-04-01 16:30 UTC+0200 Viktor Szakats (harbour syenar.net)
* config/win/mingw.mk
    + solved mingw harbour dll and unicows problem, so now 
      -shared Harbour executables built using mingw will be able 
      to run on Win9x, "out of the box".
      (has a downside that now separate compile pass is needed 
      to build objects with -DHB_DYNLIB (like with all the other 
      C compilers), but I left it enabled anyways to give uniform 
      support for unicows by default, including the nightly and 
      official builds. Look into the diff for an undocumented 
      way to disable this)

  * config/win/watcom.mk
  * config/win/xcc.mk
  * config/win/icc.mk
  * config/win/pocc.mk
  * config/win/bcc.mk
  * config/win/msvc.mk
    * restored to link 3rd libs (currently unicows, if available) 
      to harbour-*.dll with above compilers. These are currently 
      noops (except for bcc, where it just doesn't work), 
      they are fundemantally correct, but may require further 
      C compiler specific mods.

  ; TODO: problem with bcc harbour-*.dll remains. unicows is present, 
          specified, but ignored when linking, even though it's not ignored 
          when contrib dlls are built using similar method. I leave 
          resolving this problem to bcc users.
2012-04-01 14:31:16 +00:00

74 lines
1.5 KiB
Makefile

#
# $Id$
#
# Intel(R) C/C++ Compiler (usage is largely compatible with msvc)
OBJ_EXT := .obj
LIB_PREF :=
LIB_EXT := .lib
HB_DYN_COPT := -DHB_DYNLIB
CC := icl.exe
CC_IN := -c
CC_OUT := -Fo
CFLAGS += -I. -I$(HB_HOST_INC)
CFLAGS += -nologo -Gs
ifeq ($(HB_BUILD_MODE),c)
CFLAGS += -TC
endif
ifeq ($(HB_BUILD_MODE),cpp)
CFLAGS += -TP
endif
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W3
else
CFLAGS += -W2
endif
ifneq ($(HB_BUILD_OPTIM),no)
# maximum optimizations
# CFLAGS += -Ox
CFLAGS += -O3
endif
ifeq ($(HB_BUILD_DEBUG),yes)
CFLAGS += -Zi
endif
LD := xilink.exe
LD_OUT := -out:
LIBPATHS := $(foreach dir,$(LIB_DIR) $(3RDLIB_DIR),-libpath:$(dir))
LDLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(3RDLIBS) $(SYSLIBS),$(lib)$(LIB_EXT))
LDFLAGS += -nologo $(LIBPATHS)
AR := xilib.exe
AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) -nologo -out:$(LIB_DIR)/$@ $(^F)
DY := $(LD)
DFLAGS += -nologo -dll -subsystem:console $(LIBPATHS)
DY_OUT := $(LD_OUT)
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(3RDLIBS) $(SYSLIBS),$(lib)$(LIB_EXT))
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dynlib_object
@$(ECHO) $(ECHOQUOTE)$(file)$(ECHOQUOTE) >> __dyn__.tmp
endef
define create_dynlib
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
$(foreach file,$^,$(dynlib_object))
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)"$(subst /,$(DIRSEP),$(DYN_DIR)/$@)" -implib:"$(IMP_FILE)" @__dyn__.tmp $(DLIBS)
endef
DY_RULE = $(create_dynlib)
include $(TOP)$(ROOT)config/rules.mk