Files
harbour-core/harbour/config/w32/mingw32.cf
Przemyslaw Czerpak 33b161641c 2005-11-01 23:28 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/make_gnu.sh
  + harbour/make_xmingw.sh
  * harbour/bin/hb-mkslib.sh
  * harbour/bin/postinst.sh
  * harbour/config/w32/mingw32.cf
    * added support for cross compilation (Windows binaries at Linux) with
      MinGW - borrowed from xHarbour Phil Krylov solution

  * harbour/contrib/btree/hb_btree.c
    * casting

  * harbour/contrib/libct/files.c
    ! fixed iAttr initialization in SETFATTR()

  * harbour/contrib/ole/ole2.c
    ! fixed names of included files

  * harbour/contrib/rdd_ads/ace.h
    * cover #pragma warning( error : 4706 ) by !defined( __GNUC__ )

  * harbour/include/hbapi.h
  * harbour/include/hbdefs.h
  + harbour/source/common/hbarch.c
  * harbour/source/common/Makefile
    * added functions for machine independent double and long long conversions
      (my code borrowed from xHarbour)

  * harbour/include/hbapifs.h
    * synced file IO with xHarbour - it fixes some problems, adds some
      missing functionality and long (64bit) file support for Windows.
      For Linux I added it some time ago.

  * harbour/include/hbcomp.h
    * changed 'char cScope' to 'HB_SYMBOLSCOPE cScope'

  * harbour/source/common/hbfsapi.c
    ! fixed some possible buffer overflow

  * harbour/source/common/hbstr.c
    * synced with xHarbour

  * harbour/source/common/hbver.c
    + added hb_iswinnt() (borrowed from xHarbour)

  * harbour/source/compiler/cmdcheck.c
    + added -undef: compiler switch (borrowed from xHarbour)

  * harbour/source/compiler/gencobj.c
    * cleanup

  * harbour/source/pp/ppcore.c
    ! fixed path delimiters in included file names

  * harbour/source/rtl/Makefile
  + harbour/source/rtl/fserror.c
    + added C -> OS file error trnalsations - not perfect but better then
      the used hacks (borrowed from xHarbour)

  * harbour/source/rtl/file.c
    * use hb_fileNameConv() instead of hb_filecase() - hb_fileNameConv()
      is the only one function to make file name conversions dependent on
      some SETs.

  * harbour/source/rtl/filesys.c
    * synced file IO with xHarbour - it fixes some problems, adds some
      missing functionality and long (64bit) file support for Windows.
      For Linux I added it some time ago.

  * harbour/source/rtl/fstemp.c
    * synced with xHarbour

  * harbour/source/rtl/strings.c
    * use ULONG instead of size_t in hb_strnicmp declaration - we have to
      decide what we should use. Using size_t or its Harbour version f.e.
      HB_SIZE_T seems to be reasonable but it has to be global - redefining
      single functions does not make sense and will create troubles only.
2005-11-01 22:31:05 +00:00

125 lines
3.1 KiB
CFEngine3

#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT = .exe
LIB_PREF = lib
LIB_EXT = .a
CC = $(CCPREFIX)gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE) -mno-cygwin
CFLAGS = -Wall -W
ifeq ($(HB_LEX),SIMPLEX)
CFLAGS += -DSIMPLEX
endif
LD = $(CCPREFIX)gcc
LD_OUT = -o
# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += $(foreach lib, $(CONTRIBS), -L$(TOP)$(ROOT)contrib/$(lib)/$(HB_ARCH))
LINKPATHS += $(foreach lib, $(LIBS), -L$(TOP)$(ROOT)source/$(lib)/$(HB_ARCH))
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif
# our libs have a lot of cross referenced now and we have to group them
# untill we don't clean them
LINKLIBS += -Wl,--start-group
LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKPATHS += $(foreach drv, $(HB_DB_DRIVERS), -L$(TOP)$(ROOT)source/rdd/$(drv)/$(HB_ARCH))
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library
ifeq ($(findstring rtl,$(LIBS)),rtl)
LINKPATHS += -L$(TOP)$(ROOT)source/rtl/$(HB_GT_LIB)/$(HB_ARCH)
LINKLIBS += -l$(HB_GT_LIB)
endif
# HB_SCREEN_LIB: empty, or one of ncurses, slang
# HB_SCREEN_LIB=ncurses
# HB_SCREEN_LIB=slang
ifneq ($(HB_SCREEN_LIB),)
LINKLIBS += -l$(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), -l$(lib))
endif
# The -) option could be appropriate to link against libraries with
# cyclic dependencies, but I think it is not really necessary if the
# libraries are kept in proper order.
# LINKLIBS += -Wl,-)
LINKLIBS += -Wl,--end-group
# This library is needed for CharToOemBuff() and OemToCharBuff() support.
LINKLIBS += -luser32 -lwinspool
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every echo command will be separated by LF
define lib_object
echo. ADDMOD $(file) >> __lib__.tmp
endef
# We have to use script to overcome the DOS limit of max 128 characters
# in commmand line
define create_library
echo. CREATE $@ > __lib__.tmp
$(foreach file, $^, $(lib_object))
echo. SAVE >> __lib__.tmp
echo. END >> __lib__.tmp
$(AR) $(ARFLAGS) -M < __lib__.tmp
endef
# NOTE: The empty line below HAVE TO exist!
define link_file
echo. $(file) >> __link__.tmp
endef
define link_exe_file
echo. $(LDFLAGS) $(L_USR) $(LD_OUT)$@ > __link__.tmp
$(foreach file, $^, $(link_file))
$(foreach file, $(LINKPATHS), $(link_file))
$(foreach file, $(LINKLIBS), $(link_file))
-$(LD) @__link__.tmp
endef
LDFLAGS = $(LINKPATHS) -mno-cygwin
RANLIB = $(CCPREFIX)ranlib
AR = $(CCPREFIX)ar
ARFLAGS = $(A_USR)
ifeq ($(SHLVL),) # COMMAND.COM - length of command line is limited
AR_RULE = $(create_library)
LD_RULE = $(link_exe_file)
else
AR_RULE = $(AR) $(ARFLAGS) cr $@ $^ && $(RANLIB) $@ || $(RM) $@
endif
include $(TOP)$(ROOT)config/rules.cf