Files
harbour-core/harbour/config/win32/bcc32.cf
1999-08-04 07:55:10 +00:00

72 lines
1.5 KiB
CFEngine3

#
# $Id$
#
# The Harbour Project
# GNU MAKE file for Borland C/C++ Builder
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 = bcc32
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I$($(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP) -I$(_HB_INC_COMPILE)
CFLAGS = -O2
#Note: The empty line below HAVE TO exist!
define link_file
$(COMSPEC) /E:2048 /Cecho $(file) >> __link__.tmp
endef
define link_exe_file
$(COMSPEC) /E:2048 /Cecho $(LDFLAGS) -e$@ > __link__.tmp
$(foreach file, $^, $(link_file))
$(COMSPEC) /E:2048 /Cecho $(LINKLIBS) >> __link__.tmp
-$(LD) @__link__.tmp
endef
LD = bcc32
LDFLAGS = -O2
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS = $(foreach lib, $(LIBS), $(TOP)$(ROOT)source/$(lib)/$(ARCH)/$(lib)$(LIB_EXT))
else
LINKLIBS = $(foreach lib, $(LIBS), $(lib)$(LIB_EXT))
endif
LD_RULE = $(link_exe_file)
#Note: The empty line below HAVE TO exist!
define lib_object
echo -+$(file) &>> __lib__.tmp
endef
define create_library
echo $@ &> __lib__.tmp
$(foreach file, $^, $(lib_object))
echo ,, >> __lib__.tmp
$(AR) @__lib__.tmp
del __lib__.tmp
endef
AR = tlib
ARFLAGS =
AR_RULE = $(create_library)
include $(TOP)$(ROOT)config/rules.cf