Files
harbour-core/harbour/config/win/bcc.cf
Viktor Szakats 582ba2db28 2009-06-22 15:03 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/hpux/gcc.cf
  * config/sunos/gcc.cf
  * config/bsd/gcc.cf
  * config/darwin/gcc.cf
  * config/dos/djgpp.cf
  * config/win/cygwin.cf
  * config/win/mingw.cf
  * config/win/bcc.cf
  * config/linux/gcc.cf
  * config/linux/icc.cf
  * config/os2/gcc.cf
  * config/wce/mingwarm.cf
  * config/win/icc.cf
    + Added support for HB_BUILD_MODE=cpp for all platforms
      where it's available.
      Now it's about in sync with hbmk2.

  * config/linux/gpp.cf
    * Changed to set HB_BUILD_MODE=cpp and redirect to gcc.
      (retained for compatibility, pls use HB_BUILD_MODE=cpp instead
      of HB_COMPILER=gpp)

  * config/win/gcc.cf
    * Now redirected to mingw (was cygwin).
2009-06-22 13:20:40 +00:00

119 lines
2.5 KiB
CFEngine3

#
# $Id$
#
# The Harbour Project
# GNU MAKE file for Borland/CodeGear C/C++ 32-bit (4.x-)
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
CC = bcc32.exe
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
CFLAGS = -q -tWM
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -w -w-sig- -Q
endif
ifneq ($(HB_BUILD_OPTIM),no)
# for some reason -6 generates the exact same code as -4
# with both 5.5 and 5.8. -5 seems to be significantly slower
# than both.
CFLAGS += -d -6 -O2 -OS -Ov -Oi -Oc
endif
ifeq ($(HB_BUILD_MODE),cpp)
CFLAGS += -P
endif
ifeq ($(HB_BUILD_DEBUG),yes)
CFLAGS += -y -v
endif
LD = bcc32.exe
LDFLAGS = -O2
LD_OUT = -e
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
LIBLIST = $(foreach lib, $(CONTRIBS), $(lib)$(LIB_EXT))
LIBLIST += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LIBLIST += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT))
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LIBLIST += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT))
endif
# It's probably not necessary in native Windows but I need it
# for my Linux box because -L<path> seems to not work with WINE
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS += $(foreach lib, $(LIBLIST), $(LIB_DIR)/$(lib))
else
LINKLIBS += $(foreach lib, $(LIBLIST), $(HB_LIB_COMPILE)/$(lib))
endif
# HB_SCREEN_LIB: empty, or one of ncurses, slang
# HB_SCREEN_LIB=ncurses
# HB_SCREEN_LIB=slang
ifneq ($(HB_SCREEN_LIB),)
LINKLIBS += $(HB_SCREEN_LIB)
endif
# Add the optional user path(s)
ifneq ($(LNK_USR_PATH),)
LINKPATHS += $(foreach path, $(LNK_USR_PATH), -L$(path))
endif
# Add the optional user libarary (or libraries)
ifneq ($(LNK_USR_LIB),)
LINKLIBS += $(foreach lib, $(LNK_USR_LIB), $(lib)$(LIB_EXT))
endif
LDFLAGS = $(LINKPATHS)
# create library rules
AR = tlib.exe
ARFLAGS = /P64 $(HB_USER_AFLAGS)
ifneq ($(SHLVL),) # shell
AROBJS = $(foreach file, $(^F), -+$(file))
AR_RULE = $(AR) $(ARFLAGS) "$(subst /,\,$(LIB_DIR)/$@)" $(AROBJS)
else
#Note: The empty line below HAVE TO exist!
define lib_object
@echo -+$(subst /,\,$(file)) ^& >> __lib__.tmp
endef
define create_library
@if exist __lib__.tmp del __lib__.tmp
$(foreach file, $(^F), $(lib_object))
@echo -+>> __lib__.tmp
$(AR) $(subst /,\,$(LIB_DIR)/$@) $(ARFLAGS) @__lib__.tmp
endef
AR_RULE = $(create_library)
endif
include $(TOP)$(ROOT)config/rules.cf