2009-08-25 02:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* doc/bintools.txt
  * config/dosecho.exe
    ! Restored previous version. (new one gave error on some watcom lines f.e.)
    + Added binary+source links.

  * INSTALL
    + Some minor clarifications.
    * 'NT system required' changed 'XP system recommended' for win hosts.
    + Added shell requirement for HB_BUILD_PKG.
    % Simplified os2/watcom on linux example.

  * bin/postinst.cmd
    + Some cleanup/sync with postinst.bat.

  * source/Makefile
    ! Possible fix: Emptying DYNDIRLIST_BASE on dos targets
      to save envvar space.

  * source/Makefile
  * config/lib.mk
    + Added gtcrs and gtsln to dynlib obj list for *nix targets.

  * config/global.mk
    + Added Harbour version number to log header.
    ! Fixed to use short pkg name based on target platform
      no host platform (=dos).

  * config/bsd/gcc.mk
  * config/hpux/gcc.mk
  * config/darwin/icc.mk
  * config/linux/icc.mk
  * config/linux/sunpro.mk
  * config/sunos/gcc.mk
  * config/sunos/sunpro.mk
    + Added dynamic library generation to rest of targets.
    ; Please review, especially sunos/sunpro as it had some
      .sh tricks which I couldn't replicate.

  * config/bsd/global.mk
  * config/hpux/global.mk
  * config/darwin/global.mk
  * config/linux/global.mk
  * config/sunos/global.mk
    ! Setting DYN_PREF to 'lib'.

  * config/wce/mingwarm.mk
  * config/win/mingw.mk
    - Disabled import libs. [They aren't necessary with mingw.]

  * config/darwin/icc.mk
    * Changed to use libtool instead of xiar.
      (blind sync with darwin/gcc)

  * config/dos/djgpp.mk
  * config/common/watcom.mk
  * config/win/bcc.mk
  * config/os2/gcc.mk
    ! Fixed to use $(ECHOQUOTE) in all $(ECHO) calls.

  * config/win/bcc.mk
    ! Fixed use fixed backslashes regardless of shell in scripts.

  * config/dyn.mk
    ! Fixed to use $(LIB_PREF) as implib name prefix.
    % Minor opt in IMP_NAME forming.

  * config/rules.mk
    % Readded $(HB_INC_COMPILE) to be always on cmdline, to
      better balance between cmdline and envvar space. (dos)

  * config/instsh.mk
    % Don't display useless '! Nothing to install' message
      when there was no file to install. (could happen with
      mingw dynamic lib install where implib is empty because
      we don't generate one).
This commit is contained in:
Viktor Szakats
2009-08-25 00:04:06 +00:00
parent abd6eb6d59
commit fb0c197484
29 changed files with 267 additions and 57 deletions

View File

@@ -17,6 +17,83 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-08-25 02:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* doc/bintools.txt
* config/dosecho.exe
! Restored previous version. (new one gave error on some watcom lines f.e.)
+ Added binary+source links.
* INSTALL
+ Some minor clarifications.
* 'NT system required' changed 'XP system recommended' for win hosts.
+ Added shell requirement for HB_BUILD_PKG.
% Simplified os2/watcom on linux example.
* bin/postinst.cmd
+ Some cleanup/sync with postinst.bat.
* source/Makefile
! Possible fix: Emptying DYNDIRLIST_BASE on dos targets
to save envvar space.
* source/Makefile
* config/lib.mk
+ Added gtcrs and gtsln to dynlib obj list for *nix targets.
* config/global.mk
+ Added Harbour version number to log header.
! Fixed to use short pkg name based on target platform
no host platform (=dos).
* config/bsd/gcc.mk
* config/hpux/gcc.mk
* config/darwin/icc.mk
* config/linux/icc.mk
* config/linux/sunpro.mk
* config/sunos/gcc.mk
* config/sunos/sunpro.mk
+ Added dynamic library generation to rest of targets.
; Please review, especially sunos/sunpro as it had some
.sh tricks which I couldn't replicate.
* config/bsd/global.mk
* config/hpux/global.mk
* config/darwin/global.mk
* config/linux/global.mk
* config/sunos/global.mk
! Setting DYN_PREF to 'lib'.
* config/wce/mingwarm.mk
* config/win/mingw.mk
- Disabled import libs. [They aren't necessary with mingw.]
* config/darwin/icc.mk
* Changed to use libtool instead of xiar.
(blind sync with darwin/gcc)
* config/dos/djgpp.mk
* config/common/watcom.mk
* config/win/bcc.mk
* config/os2/gcc.mk
! Fixed to use $(ECHOQUOTE) in all $(ECHO) calls.
* config/win/bcc.mk
! Fixed use fixed backslashes regardless of shell in scripts.
* config/dyn.mk
! Fixed to use $(LIB_PREF) as implib name prefix.
% Minor opt in IMP_NAME forming.
* config/rules.mk
% Readded $(HB_INC_COMPILE) to be always on cmdline, to
better balance between cmdline and envvar space. (dos)
* config/instsh.mk
% Don't display useless '! Nothing to install' message
when there was no file to install. (could happen with
mingw dynamic lib install where implib is empty because
we don't generate one).
2009-08-25 01:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbzlib.h
* harbour/include/hbregex.h

View File

@@ -31,7 +31,7 @@ HOW TO BUILD AND INSTALL HARBOUR FROM SOURCE
Platform specific prerequisites:
1.) Windows NT or compatible system is required to build Harbour.
1.) Windows XP or upper system is recommended to build Harbour.
2.) Make sure to have your C compiler of choice properly installed
(in PATH). Refer to your C compiler installation and setup
instructions for details. It's recommended to make sure no tools
@@ -419,6 +419,7 @@ OPTIONS AVAILABLE WHEN BUILDING HARBOUR
- HB_BUILD_PKG=yes Create release package. Default: no
Requires 'clean install' in root source dir.
(currently on Windows/Windows CE/MS-DOS)
(only when using Windows NT shells)
- HB_BUILD_DLL=no Create Harbour dynamic libraries. Default: yes
- HB_BUILD_IMPLIB=yes Create import libraries for external .dll
dependencies (including contribs). Default: no
@@ -430,7 +431,7 @@ OPTIONS AVAILABLE WHEN BUILDING HARBOUR
Default: no
- HB_BUILD_MODE=[cpp|c] Changes default build mode to C++ or C.
Default: c, except for msvc* and watcom
compilers where it's cpp.
compilers, where it's cpp.
- HB_CONTRIBLIBS=no Don't build any contrib libraries. Default: yes
- HB_CONTRIBLIBS=[<list>] Build space separated <list> of contrib
libraries. Build all if left empty.
@@ -726,12 +727,9 @@ EXAMPLES
---------------
--- Open Watcom C++ for OS/2 (requires preceding build for Linux target)
#!/bin/sh
if [ -z "${WATCOM}" ]; then
export WATCOM="/opt/lng/watcom"
export INCLUDE="${WATCOM}/h:${WATCOM}/h/os2"
export PATH="${WATCOM}/binl:$PATH"
fi
export WATCOM="/opt/lng/watcom"
export INCLUDE="${WATCOM}/h:${WATCOM}/h/os2"
export PATH="${WATCOM}/binl:$PATH"
# ; eliminate libraries which scans for local host header files
export HB_XBUILD=yes
# ;
@@ -741,7 +739,6 @@ EXAMPLES
for *nix hosts in general
-------------------------
(possible cross-build targets: Windows, Windows CE)
--- GCC
gmake OR make

View File

@@ -6,13 +6,13 @@
rem ---------------------------------------------------------------
rem Copyright 2009 Viktor Szakats (harbour.01 syenar.hu)
rem Copyright 2003 Przemyslaw Czerpak (druzus / at / priv.onet.pl)
rem simple script run after Harbour make install to finish install
rem process
rem
rem See COPYING for licensing terms.
rem
rem Script run after Harbour make install to finish install process
rem (for OS/2)
rem ---------------------------------------------------------------
if "%HB_BIN_INSTALL%" == "" echo HB_BIN_INSTALL needs to be set.
if "%HB_BIN_INSTALL%" == "" goto END
echo ! Making %HB_BIN_INSTALL%\hbmk.cfg...
@@ -31,12 +31,4 @@ if not "%HB_INSTALL_PREFIX%" == "" xcopy /y ERRATA %HB_INSTALL_PREFIX%\ > nu
if not "%HB_INSTALL_PREFIX%" == "" xcopy /y INSTALL %HB_INSTALL_PREFIX%\ > nul
if not "%HB_INSTALL_PREFIX%" == "" xcopy /y TODO %HB_INSTALL_PREFIX%\ > nul
goto INST_%HB_PLATFORM%
:INST_OS2
rem OS/2 post install part
goto END
:INST_
:END

View File

@@ -78,4 +78,22 @@ AR := $(HB_CCPREFIX)ar
ARFLAGS :=
AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) r $(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@
DY := $(CC)
DFLAGS := -shared -fPIC
DY_OUT := -o$(subst x,x, )
DLIBS :=
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dyn_object
@$(ECHO) $(ECHOQUOTE)$(subst \,/,$(file))$(ECHOQUOTE) >> __dyn__.tmp
endef
define create_dynlib
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
$(foreach file,$^,$(dyn_object))
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ @__dyn__.tmp
endef
DY_RULE = $(create_dynlib)
include $(TOP)$(ROOT)config/rules.mk

View File

@@ -6,6 +6,7 @@ all : first
BIN_EXT :=
DYN_EXT := .so
DYN_PREF := lib
HB_GT_LIBS += gttrm

View File

@@ -32,16 +32,16 @@ AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) $(LIB_DIR)/$@ $(foreach file,$(^F),
ifeq ($(HB_SHELL),os2)
# maximum size of command line in OS2 is limited to 1024 characters
# the trick with divided 'wordlist' is workaround for it:
# -$(if $(wordlist 1,100,$(^F)), $(ECHO) $(wordlist 1,100,$(addprefix -+,$(^F))) >> __lib__.tmp,)
# -$(if $(wordlist 101,200,$(^F)), $(ECHO) $(wordlist 101,200,$(addprefix -+,$(^F))) >> __lib__.tmp,)
# -$(if $(wordlist 201,300,$(^F)), $(ECHO) $(wordlist 301,300,$(addprefix -+,$(^F))) >> __lib__.tmp,)
# -$(if $(wordlist 1,100,$(^F)), @$(ECHO) $(ECHOQUOTE)$(wordlist 1,100,$(addprefix -+,$(^F)))$(ECHOQUOTE) >> __lib__.tmp,)
# -$(if $(wordlist 101,200,$(^F)), @$(ECHO) $(ECHOQUOTE)$(wordlist 101,200,$(addprefix -+,$(^F)))$(ECHOQUOTE) >> __lib__.tmp,)
# -$(if $(wordlist 201,300,$(^F)), @$(ECHO) $(ECHOQUOTE)$(wordlist 301,300,$(addprefix -+,$(^F)))$(ECHOQUOTE) >> __lib__.tmp,)
# anyhow OS/2 port# of GNU make 3.81 seems to have bug and GPFs when total
# commands length is too big so for %i in ( *$(OBJ_EXT) ) do ... below is
# ugly workaround for both problems
define create_library
@$(ECHO) $(LIB_DIR)/$@ > __lib__.tmp
for %f in ( *$(OBJ_EXT) ) do @$(ECHO) -+%f >> __lib__.tmp
@$(ECHO) $(ECHOQUOTE)$(LIB_DIR)/$@$(ECHOQUOTE) > __lib__.tmp
for %f in ( *$(OBJ_EXT) ) do @$(ECHO) $(ECHOQUOTE)-+%f$(ECHOQUOTE) >> __lib__.tmp
$(AR) $(ARFLAGS) $(HB_USER_AFLAGS) @__lib__.tmp
endef
@@ -53,18 +53,18 @@ ifeq ($(HB_SHELL),dos)
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every command will be separated by LF
define link_file
@$(ECHO) FILE $(file) >> __link__.tmp
@$(ECHO) $(ECHOQUOTE)FILE $(file)$(ECHOQUOTE) >> __link__.tmp
endef
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define link_lib
@$(ECHO) LIB $(lib) >> __link__.tmp
@$(ECHO) $(ECHOQUOTE)LIB $(lib)$(ECHOQUOTE) >> __link__.tmp
endef
define link_exe_file
@$(ECHO) $(LDFLAGS) NAME $(BIN_DIR)/$@ > __link__.tmp
@$(ECHO) $(ECHOQUOTE)$(LDFLAGS) NAME $(BIN_DIR)/$@$(ECHOQUOTE) > __link__.tmp
$(foreach file,$(^F),$(link_file))
$(foreach lib,$(LDLIBS),$(link_lib))
-$(LD) @__link__.tmp
@@ -74,12 +74,12 @@ ifeq ($(HB_SHELL),dos)
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define lib_object
@$(ECHO) -+$(file) >> __lib__.tmp
@$(ECHO) $(ECHOQUOTE)-+$(file)$(ECHOQUOTE) >> __lib__.tmp
endef
define create_library
@$(ECHO) $(LIB_DIR)/$@ > __lib__.tmp
@$(ECHO) $(ECHOQUOTE)$(LIB_DIR)/$@$(ECHOQUOTE) > __lib__.tmp
$(foreach file,$(^F),$(lib_object))
$(AR) $(ARFLAGS) $(HB_USER_AFLAGS) @__lib__.tmp
endef

View File

@@ -6,5 +6,6 @@ all : first
BIN_EXT :=
DYN_EXT := .dylib
DYN_PREF := lib
HB_GT_LIBS += gttrm

View File

@@ -78,8 +78,26 @@ LDLIBS += -lm
LDFLAGS += $(LIBPATHS)
AR := xiar
AR := libtool
ARFLAGS :=
AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) crs $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
AR_RULE = $(AR) -static $(ARFLAGS) $(HB_USER_AFLAGS) -o $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
DY := $(AR)
DFLAGS := -dynamic -flat_namespace -undefined warning -multiply_defined suppress -single_module
DY_OUT := -o$(subst x,x, )
DLIBS :=
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dyn_object
@$(ECHO) $(ECHOQUOTE)$(subst \,/,$(file))$(ECHOQUOTE) >> __dyn__.tmp
endef
define create_dynlib
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
$(foreach file,$^,$(dyn_object))
$(DY) $(DFLAGS) -install_name "harbour$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ -filelist __dyn__.tmp
endef
DY_RULE = $(create_dynlib)
include $(TOP)$(ROOT)config/rules.mk

View File

@@ -54,28 +54,28 @@ LDLIBS += -lm
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every command will be separated by LF
define lib_object
@$(ECHO) ADDMOD $(file) >> __lib__.tmp
@$(ECHO) $(ECHOQUOTE)ADDMOD $(file)$(ECHOQUOTE) >> __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_DIR)/$@ > __lib__.tmp
@$(ECHO) $(ECHOQUOTE)CREATE $(LIB_DIR)/$@$(ECHOQUOTE) > __lib__.tmp
$(foreach file,$(^F),$(lib_object))
@$(ECHO) SAVE >> __lib__.tmp
@$(ECHO) END >> __lib__.tmp
@$(ECHO) $(ECHOQUOTE)SAVE$(ECHOQUOTE) >> __lib__.tmp
@$(ECHO) $(ECHOQUOTE)END$(ECHOQUOTE) >> __lib__.tmp
$(AR) $(ARFLAGS) $(HB_USER_AFLAGS) -M < __lib__.tmp
endef
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define link_file
@$(ECHO) $(file) >> __link__.tmp
@$(ECHO) $(ECHOQUOTE)$(file)$(ECHOQUOTE) >> __link__.tmp
endef
define link_exe_file
@$(ECHO) $(LDFLAGS) $(HB_USER_LDFLAGS) $(LD_OUT)$(BIN_DIR)/$@ > __link__.tmp
@$(ECHO) $(ECHOQUOTE)$(LDFLAGS) $(HB_USER_LDFLAGS) $(LD_OUT)$(BIN_DIR)/$@$(ECHOQUOTE) > __link__.tmp
$(foreach file,$(^F),$(link_file))
$(foreach file,$(LIBPATHS),$(link_file))
$(foreach file,$(LDLIBS),$(link_file))

Binary file not shown.

View File

@@ -21,7 +21,7 @@ DYN_NAME := $(DYN_PREF)$(DYNNAME)$(DYN_EXT)
DYN_FILE := $(DYN_DIR)/$(DYN_NAME)
ifneq ($(IMP_DIR),)
IMP_NAME := $(basename $(DYN_NAME))$(LIB_EXT)
IMP_NAME := $(LIB_PREF)$(DYNNAME)$(LIB_EXT)
IMP_FILE := $(IMP_DIR)/$(IMP_NAME)
endif

View File

@@ -266,7 +266,7 @@ ifeq ($(HB_INIT_DONE),)
# Macros:
# -DHB_PCRE_REGEX, -DHB_POSIX_REGEX, -DHB_EXT_ZLIB, -DHB_HAS_GPM, -DHB_GT_LIB=
$(info ! Harbour-Project - Building from source - http://www.harbour-project.org)
$(info ! Building Harbour $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE)$(HB_VER_STATUS) from source - http://www.harbour-project.org)
$(info ! MAKE: $(MAKE) $(MAKE_VERSION) $(HB_MAKECMDGOALS) $(MAKEFLAGS) $(SHELL) $(if $(MAKESHELL), MAKESHELL: $(MAKESHELL),))
ifneq ($(HB_USER_PRGFLAGS),)
$(info ! HB_USER_PRGFLAGS: $(HB_USER_PRGFLAGS))
@@ -1095,7 +1095,7 @@ else
HB_DYN_VER := $(HB_VER_MAJOR)$(HB_VER_MINOR)
endif
ifneq ($(HB_HOST_PLAT),dos)
ifneq ($(HB_PLATFORM),dos)
HB_VERSION := $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE)$(HB_VER_STATUS)
HB_PKGNAME := harbour-$(HB_VERSION)-$(HB_PLATFORM)-$(HB_COMPILER)
HB_PKGNAMI := $(HB_PKGNAME)

View File

@@ -80,4 +80,22 @@ AR := $(HB_CCPREFIX)ar
ARFLAGS :=
AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) cr $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
DY := $(CC)
DFLAGS := -shared -fPIC
DY_OUT := -o$(subst x,x, )
DLIBS :=
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dyn_object
@$(ECHO) $(ECHOQUOTE)$(subst \,/,$(file))$(ECHOQUOTE) >> __dyn__.tmp
endef
define create_dynlib
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
$(foreach file,$^,$(dyn_object))
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ @__dyn__.tmp
endef
DY_RULE = $(create_dynlib)
include $(TOP)$(ROOT)config/rules.mk

View File

@@ -6,5 +6,6 @@ all : first
BIN_EXT :=
DYN_EXT := .sl
DYN_PREF := lib
HB_GT_LIBS += gttrm

View File

@@ -2,9 +2,8 @@
# $Id$
#
ifeq ($(INSTALL_FILES),) # Empty install list
INSTALL_RULE := @$(ECHO) $(ECHOQUOTE)! Nothing to install$(ECHOQUOTE)
else
ifneq ($(INSTALL_FILES),) # Empty install list
ifeq ($(INSTALL_DIR),) # Empty install dir
INSTALL_RULE := @$(ECHO) $(ECHOQUOTE)! Can't install, install dir isn't set$(ECHOQUOTE)
else

View File

@@ -33,6 +33,8 @@ HB_DYN_LIBS := \
gtwin \
gtos2 \
gttrm \
gtcrs \
gtsln \
hbvm \
hbvmmt \
hbmaindllh

View File

@@ -6,6 +6,7 @@ all : first
BIN_EXT :=
DYN_EXT := .so
DYN_PREF := lib
HB_GT_LIBS += gttrm

View File

@@ -88,4 +88,22 @@ AR := xiar
ARFLAGS :=
AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) crs $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
DY := $(CC)
DFLAGS := -shared -fPIC
DY_OUT := -o$(subst x,x, )
DLIBS :=
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dyn_object
@$(ECHO) $(ECHOQUOTE)$(subst \,/,$(file))$(ECHOQUOTE) >> __dyn__.tmp
endef
define create_dynlib
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
$(foreach file,$^,$(dyn_object))
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ @__dyn__.tmp
endef
DY_RULE = $(create_dynlib)
include $(TOP)$(ROOT)config/rules.mk

View File

@@ -105,4 +105,25 @@ AR := $(HB_CCPREFIX)ar
ARFLAGS :=
AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) crs $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
DY := $(CC)
DFLAGS := -G -KPIC $(HB_ISAOPT)
ifneq ($(HB_BUILD_OPTIM),no)
DFLAGS += -fast -xnolibmopt
endif
DY_OUT := -o$(subst x,x, )
DLIBS :=
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dyn_object
@$(ECHO) $(ECHOQUOTE)$(subst \,/,$(file))$(ECHOQUOTE) >> __dyn__.tmp
endef
define create_dynlib
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
$(foreach file,$^,$(dyn_object))
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ @__dyn__.tmp
endef
DY_RULE = $(create_dynlib)
include $(TOP)$(ROOT)config/rules.mk

View File

@@ -73,7 +73,7 @@ endif
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every command will be separated by LF
#define lib_object
# @$(ECHO) ADDMOD $(file) >> __lib__.tmp
# @$(ECHO) $(ECHOQUOTE)ADDMOD $(file)$(ECHOQUOTE) >> __lib__.tmp
#
#endef
@@ -81,10 +81,10 @@ endif
# in commmand line
define create_library
$(if $(wildcard $(subst /,$(DIRSEP),$(LIB_FILE))),@$(RM) $(subst /,$(DIRSEP),$(LIB_FILE)),)
@$(ECHO) CREATE $(LIB_DIR)/$@ > __lib__.tmp
for %i in ( *$(OBJ_EXT) ) do @$(ECHO) ADDMOD %i >> __lib__.tmp
@$(ECHO) SAVE >> __lib__.tmp
@$(ECHO) END >> __lib__.tmp
@$(ECHO) $(ECHOQUOTE)CREATE $(LIB_DIR)/$@$(ECHOQUOTE) > __lib__.tmp
for %i in ( *$(OBJ_EXT) ) do @$(ECHO) $(ECHOQUOTE)ADDMOD %i$(ECHOQUOTE) >> __lib__.tmp
@$(ECHO) $(ECHOQUOTE)SAVE$(ECHOQUOTE) >> __lib__.tmp
@$(ECHO) $(ECHOQUOTE)END$(ECHOQUOTE) >> __lib__.tmp
$(AR) $(ARFLAGS) $(HB_USER_AFLAGS) -M < __lib__.tmp
endef

View File

@@ -28,8 +28,8 @@ endif
# How to run Harbour
HB := $(HB_HOST_BIN_DIR)/harbour$(HB_HOST_BIN_EXT)
HB_FLAGS := -n1 $(HB_INC_DEPEND) -i$(HB_INC_COMPILE) -q0 -w3 -es2 -kmo $(HB_PRGFLAGS)
HB_RULE = $(HB) $? $(HB_FLAGS) $(HB_USER_PRGFLAGS)
HB_FLAGS := -n1 -q0 -w3 -es2 -kmo $(HB_PRGFLAGS)
HB_RULE = $(HB) $? $(HB_INC_DEPEND) -i$(HB_INC_COMPILE) $(HB_FLAGS) $(HB_USER_PRGFLAGS)
# Use default rules if platform/compiler specific rule is not defined

View File

@@ -78,4 +78,22 @@ AR := $(HB_CCPREFIX)ar
ARFLAGS :=
AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) cr $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
DY := $(CC)
DFLAGS := -shared -fPIC
DY_OUT := -o$(subst x,x, )
DLIBS :=
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dyn_object
@$(ECHO) $(ECHOQUOTE)$(subst \,/,$(file))$(ECHOQUOTE) >> __dyn__.tmp
endef
define create_dynlib
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
$(foreach file,$^,$(dyn_object))
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ @__dyn__.tmp
endef
DY_RULE = $(create_dynlib)
include $(TOP)$(ROOT)config/rules.mk

View File

@@ -6,5 +6,6 @@ all : first
BIN_EXT :=
DYN_EXT := .so
DYN_PREF := lib
HB_GT_LIBS += gttrm

View File

@@ -106,4 +106,23 @@ AR := ar
ARFLAGS :=
AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) cr $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
DY := $(CC)
DFLAGS := -G $(HB_ISAOPT)
ifneq ($(HB_BUILD_OPTIM),no)
DFLAGS += -fast -xnolibmopt
endif
DY_OUT := -o$(subst x,x, )
DLIBS :=
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dyn_object
@$(ECHO) $(ECHOQUOTE)$(subst \,/,$(file))$(ECHOQUOTE) >> __dyn__.tmp
endef
define create_dynlib
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
$(foreach file,$^,$(dyn_object))
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ @__dyn__.tmp
endef
include $(TOP)$(ROOT)config/rules.mk

View File

@@ -50,16 +50,18 @@ DY := $(CC)
DFLAGS := -shared
DY_OUT := $(LD_OUT)
DLIBS := $(foreach lib,$(SYSLIBS),-l$(lib))
IMP_DIR :=
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dyn_object
@$(ECHO) $(ECHOQUOTE)INPUT($(subst \,/,$(file)))$(ECHOQUOTE) >> __dyn__.tmp
endef
# ,--out-implib,$(IMP_FILE)
define create_dynlib
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
$(foreach file,$^,$(dyn_object))
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ __dyn__.tmp $(DLIBS) -Wl,--output-def,$(DYN_DIR)/$(basename $@).def,--out-implib,$(IMP_FILE)
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ __dyn__.tmp $(DLIBS) -Wl,--output-def,$(DYN_DIR)/$(basename $@).def
endef
DY_RULE = $(create_dynlib)

View File

@@ -73,7 +73,7 @@ ifneq ($(HB_SHELL),sh)
define create_library
$(if $(wildcard __lib__.tmp),@$(RM) __lib__.tmp,)
$(foreach file,$(?F),$(lib_object))
@$(ECHO) -+>> __lib__.tmp
@$(ECHO) $(ECHOQUOTE)-+$(ECHOQUOTE)>> __lib__.tmp
$(AR) $(ARFLAGS) $(HB_USER_AFLAGS) "$(subst /,\,$(LIB_DIR)/$@)" @__lib__.tmp
endef

View File

@@ -59,16 +59,18 @@ DY := $(CC)
DFLAGS := -shared
DY_OUT := $(LD_OUT)
DLIBS := $(foreach lib,$(SYSLIBS),-l$(lib))
IMP_DIR :=
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dyn_object
@$(ECHO) $(ECHOQUOTE)INPUT($(subst \,/,$(file)))$(ECHOQUOTE) >> __dyn__.tmp
endef
# ,--out-implib,$(IMP_FILE)
define create_dynlib
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
$(foreach file,$^,$(dyn_object))
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ __dyn__.tmp $(DLIBS) -Wl,--output-def,$(DYN_DIR)/$(basename $@).def,--out-implib,$(IMP_FILE)
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ __dyn__.tmp $(DLIBS) -Wl,--output-def,$(DYN_DIR)/$(basename $@).def
endef
DY_RULE = $(create_dynlib)

View File

@@ -35,6 +35,8 @@ Included utilities are:
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/fil41b.zip
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/fil41s.zip
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/shl2011b.zip
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/shtl208s.zip
ftp://ftp.delorie.com/pub/djgpp/current/v2/djdev203.zip
ftp://ftp.delorie.com/pub/djgpp/current/v2/djlsr203.zip
- OS/2 (os2mkdir.exe, os2rm.exe, os2cp.exe)

View File

@@ -81,8 +81,8 @@ else
source/rtl/gtstd
ifeq ($(HB_PLATFORM),dos)
# for testing only. dos doesn't have .dlls.
DYNDIRLIST_BASE += source/rtl/gtdos
# Don't consume environment space
DYNDIRLIST_BASE = x
endif
ifeq ($(HB_PLATFORM),os2)
DYNDIRLIST_BASE += source/rtl/gtos2
@@ -95,6 +95,8 @@ else
endif
ifeq ($(HB_OS_UNIX),yes)
DYNDIRLIST_BASE += source/rtl/gttrm
DYNDIRLIST_BASE += source/rtl/gtcrs
DYNDIRLIST_BASE += source/rtl/gtsln
endif
ifeq ($(HB_COMPILER),watcom)
DYNDIRLIST_BASE += source/vm/maindllh