Files
harbour-core/harbour/config/dos/bcc16.cf
Przemyslaw Czerpak fbc91bbb33 2007-08-23 02:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/darwin/gcc.cf
  * harbour/config/darwin/global.cf
  * harbour/config/hpux/gcc.cf
  * harbour/config/hpux/global.cf
  * harbour/config/dos/owatcom.cf
  * harbour/config/dos/watcom.cf
  * harbour/config/dos/bcc16.cf
  * harbour/config/dos/global.cf
  * harbour/config/dos/rsx32.cf
  * harbour/config/dos/djgpp.cf
  * harbour/config/linux/owatcom.cf
  * harbour/config/linux/gcc.cf
  * harbour/config/linux/global.cf
  * harbour/config/os2/gcc.cf
  * harbour/config/os2/icc.cf
  * harbour/config/os2/global.cf
  * harbour/config/sunos/global.cf
  * harbour/config/bsd/gcc.cf
  * harbour/config/bsd/global.cf
  * harbour/config/w32/msvc.cf
  * harbour/config/w32/owatcom.cf
  * harbour/config/w32/watcom.cf
  * harbour/config/w32/bcc32.cf
  * harbour/config/w32/gcc.cf
  * harbour/config/w32/xcc.cf
  * harbour/config/w32/rsxnt.cf
  * harbour/config/w32/global.cf
  * harbour/config/w32/mingw32.cf
    + added support for linking with all GT libraries - please test

  * harbour/makefile.gc
    * removed system screen libraries - they are set by make_gcc.sh

  * harbour/bin/pack_src.sh
    + added HBDOT

  * harbour/harbour.spec
  * harbour/make_tgz.sh
    * replaced PP with HBDOT
2007-08-23 00:56:18 +00:00

93 lines
2.4 KiB
CFEngine3

#
# $Id$
#
# The Harbour Project
# GNU MAKE file for Borland C/C++ 3.x, 4.x, 5.0x
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
$(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP = $(subst /,\\,$(GRANDP))
_HB_INC_COMPILE = $(subst /,\\,$(HB_INC_COMPILE))
_HL = $(notdir $(HB_LIB_COMPILE))
ifeq ($(_HL),)
#there is an ending slash
_HB_LIB_COMPILE = $(subst /,\\,$(HB_LIB_COMPILE))
else
_HB_LIB_COMPILE = $(subst /,\\,$(HB_LIB_COMPILE)/)
endif
CC = bcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I$($(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP) -I$(_HB_INC_COMPILE)
CFLAGS = -i48 -O2 -mh -d -DHB_LONG_LONG_OFF
# BCC (at least version 3.1) requires that the output file be listed ahead of the input file
CC_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_OUT)$(?F:.c=$(OBJ_EXT)) $(CC_IN) $?
#Note: The empty line below HAVE TO exist!
define link_file
echo. $(file) >> __link__.tmp
endef
define link_exe_file
echo. $(LDFLAGS) -e$@ > __link__.tmp
$(foreach file, $(^F), $(link_file))
$(foreach file, $(LINKLIBS), $(link_file))
-$(LD) @__link__.tmp
endef
LD = bcc
LDFLAGS = -i48 -O2 -mh $(L_USR)
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS += $(foreach lib, $(CONTRIBS), $(TOP)$(ROOT)contrib/$(lib)/$(HB_ARCH)/$(subst lib,,$(lib))$(LIB_EXT))
LINKLIBS += $(foreach lib, $(LIBS), $(TOP)$(ROOT)source/$(lib)/$(HB_ARCH)/$(lib)$(LIB_EXT))
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach lib, $(HB_DB_DRIVERS), $(TOP)$(ROOT)source/rdd/$(lib)/$(HB_ARCH)/$(lib)$(LIB_EXT))
endif
else
LINKLIBS += $(foreach lib, $(CONTRIBS), $(subst lib,,$(lib))$(LIB_EXT))
LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT))
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach lib, $(HB_DB_DRIVERS), $(lib)$(LIB_EXT))
endif
endif
LD_RULE = $(link_exe_file)
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(TOP)$(ROOT)source/rtl/$(gt)/$(HB_ARCH)/$(gt)$(LIB_EXT))
else
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT))
endif
endif
#Note: The empty line below HAVE TO exist!
define lib_object
echo. -+$(file) &>> __lib__.tmp
endef
define create_library
echo. $@ &> __lib__.tmp
$(foreach file, $(^F), $(lib_object))
echo. ,, >> __lib__.tmp
$(AR) $(ARFLAGS) @__lib__.tmp
del __lib__.tmp
endef
AR = tlib
ARFLAGS = /C $(A_USR)
AR_RULE = $(create_library)
include $(TOP)$(ROOT)config/rules.cf