2009-02-22 17:49 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* config/lib.cf
* config/bin.cf
+ Added -n to Harbour flags to bin.cf.
+ Added -n1 to Harbour flags to lib.cf.
; TOFIX: The former works, the latter doesn't.
Could someone please help why is this
happening?
* utils/hbmk2/hbmk2.prg
- Removed -n from default Harbour switches.
; TODO: Add prgflags=-n to all .hbp files.
; TODO: Add -n to all .hbm files.
; TODO: Add .hbp file to dirs where there are .prgs
needing -n flag.
+ bin/hb-mkdll.bat
+ Added .dll creation for GNU-make. Not yet enabled,
only MSVC supported, and by the nature of the
wonderful world of Microsoft, whole Harbour needs
to be compiled with HB_USER_CFLAGS=-DHB_DYNLIB to
make this work. -DHB_DYNLIB has some drawbacks
though: export table will be generated for all
executables made from these .libs, .exp/.lib will
also be generated for all executables.
; TODO: Solve to compile Harbour lib .prgs using
-n1 switch. (needed for .dll, and this
one has only befenefits for other scenarios)
; TODO: Add hb-mkdll.bat to postinst.bat.
; TODO: Add BCC support, if possible.
; TODO: Rename hb-mkslib.sh to 8.3 name and sync
name with the .bat version (not necessarily
mkdll, but something short.)
* bin/hb-func.sh
! Added system libs for optional components included
in the harbour dynlib. I plan to make some more
changes here, but this should fix missing system
libs with shared option enabled in hbmk2.
* contrib/examples/dbu/dbu.hbm
* contrib/examples/rl/rl.hbm
+ Added -n.
* utils/hbdoc/Makefile
* utils/hbmk2/Makefile
* utils/hbtest/Makefile
* utils/hbi18n/Makefile
* utils/hbrun/Makefile
- Removed explicit -gc0 -n override.
Should now be set automatically for all binaries.
This commit is contained in:
@@ -8,6 +8,58 @@
|
||||
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
|
||||
*/
|
||||
|
||||
2009-02-22 17:49 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
|
||||
* config/lib.cf
|
||||
* config/bin.cf
|
||||
+ Added -n to Harbour flags to bin.cf.
|
||||
+ Added -n1 to Harbour flags to lib.cf.
|
||||
; TOFIX: The former works, the latter doesn't.
|
||||
Could someone please help why is this
|
||||
happening?
|
||||
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
- Removed -n from default Harbour switches.
|
||||
; TODO: Add prgflags=-n to all .hbp files.
|
||||
; TODO: Add -n to all .hbm files.
|
||||
; TODO: Add .hbp file to dirs where there are .prgs
|
||||
needing -n flag.
|
||||
|
||||
+ bin/hb-mkdll.bat
|
||||
+ Added .dll creation for GNU-make. Not yet enabled,
|
||||
only MSVC supported, and by the nature of the
|
||||
wonderful world of Microsoft, whole Harbour needs
|
||||
to be compiled with HB_USER_CFLAGS=-DHB_DYNLIB to
|
||||
make this work. -DHB_DYNLIB has some drawbacks
|
||||
though: export table will be generated for all
|
||||
executables made from these .libs, .exp/.lib will
|
||||
also be generated for all executables.
|
||||
; TODO: Solve to compile Harbour lib .prgs using
|
||||
-n1 switch. (needed for .dll, and this
|
||||
one has only befenefits for other scenarios)
|
||||
; TODO: Add hb-mkdll.bat to postinst.bat.
|
||||
; TODO: Add BCC support, if possible.
|
||||
; TODO: Rename hb-mkslib.sh to 8.3 name and sync
|
||||
name with the .bat version (not necessarily
|
||||
mkdll, but something short.)
|
||||
|
||||
* bin/hb-func.sh
|
||||
! Added system libs for optional components included
|
||||
in the harbour dynlib. I plan to make some more
|
||||
changes here, but this should fix missing system
|
||||
libs with shared option enabled in hbmk2.
|
||||
|
||||
* contrib/examples/dbu/dbu.hbm
|
||||
* contrib/examples/rl/rl.hbm
|
||||
+ Added -n.
|
||||
|
||||
* utils/hbdoc/Makefile
|
||||
* utils/hbmk2/Makefile
|
||||
* utils/hbtest/Makefile
|
||||
* utils/hbi18n/Makefile
|
||||
* utils/hbrun/Makefile
|
||||
- Removed explicit -gc0 -n override.
|
||||
Should now be set automatically for all binaries.
|
||||
|
||||
2009-02-22 14:59 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/rtl/gtxwc/gtxwc.c
|
||||
+ added support for HB_GTI_CLOSABLE and HB_GTI_RESIZABLE.
|
||||
|
||||
@@ -237,12 +237,20 @@ mk_hbtools()
|
||||
if [ "${HB_GPM_MOUSE}" = "yes" ]; then
|
||||
echo "libs=gpm">> ${hb_hbmkcfg}
|
||||
fi
|
||||
# if [ -n "${HB_CRS_LIB}" ]; then
|
||||
# echo "libs=${HB_CRS_LIB}">> ${hb_hbmkcfg}
|
||||
# fi
|
||||
# if [ -n "${HB_SLN_LIB}" ]; then
|
||||
# echo "libs=${HB_SLN_LIB}">> ${hb_hbmkcfg}
|
||||
# fi
|
||||
if [ "${HB_WITHOUT_X11}" != "yes" ]; then
|
||||
[ -d "/usr/X11R6/lib64" ] && echo "libpaths=/usr/X11R6/lib64>> ${hb_hbmkcfg}
|
||||
echo "libpaths=/usr/X11R6/lib>> ${hb_hbmkcfg}
|
||||
echo "libs=X11>> ${hb_hbmkcfg}
|
||||
echo "inlibshared=gtxvc>> ${hb_hbmkcfg}
|
||||
fi
|
||||
if [ "${HB_WITHOUT_GTCRS}" != "yes" ]; then
|
||||
echo "libs=${HB_CRS_LIB}>> ${hb_hbmkcfg}
|
||||
echo "inlibshared=gtcrs>> ${hb_hbmkcfg}
|
||||
fi
|
||||
if [ "${HB_WITHOUT_GTSLN}" != "yes" ]; then
|
||||
echo "libs=${HB_SLN_LIB}>> ${hb_hbmkcfg}
|
||||
echo "inlibshared=gtsln>> ${hb_hbmkcfg}
|
||||
fi
|
||||
|
||||
echo "Generating ${hb_tool}... "
|
||||
cat > ${hb_tool} <<EOF
|
||||
|
||||
118
harbour/bin/hb-mkdll.bat
Normal file
118
harbour/bin/hb-mkdll.bat
Normal file
@@ -0,0 +1,118 @@
|
||||
@rem
|
||||
@rem $Id$
|
||||
@rem
|
||||
|
||||
@echo off
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
rem Copyright 2009 Viktor Szakats (harbour.01 syenar.hu)
|
||||
rem See doc/license.txt for licensing terms.
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
rem NOTE: .prg files have to be built with -n1
|
||||
rem NOTE: .c files have to be built with -DHB_DYNLIB
|
||||
|
||||
if not "%OS%" == "Windows_NT" ( echo This script needs Windows NT or newer. && goto END )
|
||||
if "%HB_ARCHITECTURE%" == "" ( echo HB_ARCHITECTURE needs to be set. && goto END )
|
||||
if "%HB_COMPILER%" == "" ( echo HB_COMPILER needs to be set. && goto END )
|
||||
if not "%HB_ARCHITECTURE%" == "win" goto END
|
||||
|
||||
set HB_DLL_VERSION=11
|
||||
|
||||
if not "%HB_COMPILER%" == "msvc" goto NOT_MSVC
|
||||
|
||||
rem Generating Harbour .dll
|
||||
|
||||
md _dll
|
||||
cd _dll
|
||||
|
||||
set HB_DLL_LIBS=hbcommon,hbpp,hbrtl,hbmacro,hblang,hbcpage,hbpcre,hbzlib,hbextern,hbrdd,rddntx,rddnsx,rddcdx,rddfpt,hbsix,hbhsx,hbusrrdd,gtcgi,gtpca,gtstd,gtwin,gtwvt,gtgui
|
||||
rem ; Extract core objects
|
||||
echo.> _hbocore.txt
|
||||
for %%f in (%HB_DLL_LIBS%) do (
|
||||
echo %%f
|
||||
lib %HB_LIB_INSTALL%\%%f.lib /nologo /list > _hboraw.txt
|
||||
for /F %%p in (_hboraw.txt) do (
|
||||
lib %HB_LIB_INSTALL%\%%f.lib /nologo /extract:%%p
|
||||
echo %%p>> _hbocore.txt
|
||||
)
|
||||
del _hboraw.txt
|
||||
)
|
||||
|
||||
md vm
|
||||
cd vm
|
||||
set HB_DLL_LIBS=hbvm
|
||||
rem ; Extract VM objects
|
||||
echo.> ..\_hbovm.txt
|
||||
for %%f in (%HB_DLL_LIBS%) do (
|
||||
echo %%f
|
||||
lib %HB_LIB_INSTALL%\%%f.lib /nologo /list > _hboraw.txt
|
||||
for /F %%p in (_hboraw.txt) do (
|
||||
if not "%%p" == "maindll.obj" (
|
||||
if not "%%p" == "maindllp.obj" (
|
||||
lib %HB_LIB_INSTALL%\%%f.lib /nologo /extract:%%p
|
||||
echo vm\%%p>> ..\_hbovm.txt
|
||||
)
|
||||
)
|
||||
)
|
||||
del _hboraw.txt
|
||||
)
|
||||
cd ..
|
||||
|
||||
md vmmt
|
||||
cd vmmt
|
||||
set HB_DLL_LIBS=hbvmmt
|
||||
rem ; Extract VM objects
|
||||
echo.> ..\_hbovmmt.txt
|
||||
for %%f in (%HB_DLL_LIBS%) do (
|
||||
echo %%f
|
||||
lib %HB_LIB_INSTALL%\%%f.lib /nologo /list > _hboraw.txt
|
||||
for /F %%p in (_hboraw.txt) do (
|
||||
if not "%%p" == "maindll.obj" (
|
||||
if not "%%p" == "maindllp.obj" (
|
||||
lib %HB_LIB_INSTALL%\%%f.lib /nologo /extract:%%p
|
||||
echo vmmt\%%p>> ..\_hbovmmt.txt
|
||||
)
|
||||
)
|
||||
)
|
||||
del _hboraw.txt
|
||||
)
|
||||
cd ..
|
||||
|
||||
link /dll /out:%HB_BIN_INSTALL%\harbour-%HB_DLL_VERSION%-vc.dll @_hbocore.txt @_hbovm.txt user32.lib wsock32.lib advapi32.lib gdi32.lib
|
||||
link /dll /out:%HB_BIN_INSTALL%\harbourmt-%HB_DLL_VERSION%-vc.dll @_hbocore.txt @_hbovmmt.txt user32.lib wsock32.lib advapi32.lib gdi32.lib
|
||||
|
||||
for /F %%o in (_hbovm.txt) do (
|
||||
del %%o
|
||||
)
|
||||
del _hbovm.txt
|
||||
rmdir vm
|
||||
|
||||
rem ; Cleanup
|
||||
for /F %%o in (_hbovmmt.txt) do (
|
||||
del %%o
|
||||
)
|
||||
del _hbovmmt.txt
|
||||
rmdir vmmt
|
||||
|
||||
for /F %%o in (_hbocore.txt) do (
|
||||
del %%o
|
||||
)
|
||||
del _hbocore.txt
|
||||
cd ..
|
||||
rmdir _dll
|
||||
|
||||
goto END
|
||||
|
||||
:NOT_MSVC
|
||||
|
||||
if not "%HB_COMPILER%" == "bcc32" goto NOT_BCC32
|
||||
|
||||
echo bcc32 not yet supported
|
||||
rem ilink32 -Gn -C -aa -Tpd -Gi -L$(LIB_DIR) $(HB_USER_LDFLAGS) @&&! c0d32.obj $**, $@,, cw32mt$(RTLIBSUFFIX).lib import32.lib
|
||||
|
||||
goto END
|
||||
|
||||
:NOT_BCC32
|
||||
|
||||
:END
|
||||
@@ -9,6 +9,8 @@ include $(TOP)$(ROOT)config/global.cf
|
||||
include $(TOP)$(ROOT)config/c.cf
|
||||
include $(TOP)$(ROOT)config/prg.cf
|
||||
|
||||
HB_FLAGS := $(HB_FLAGS) -n -gc0
|
||||
|
||||
EXE_NAME=
|
||||
|
||||
ifneq ($(C_MAIN),)
|
||||
|
||||
@@ -14,6 +14,8 @@ include $(TOP)$(ROOT)config/global.cf
|
||||
include $(TOP)$(ROOT)config/c.cf
|
||||
include $(TOP)$(ROOT)config/prg.cf
|
||||
|
||||
HB_FLAGS := $(HB_FLAGS) -n1
|
||||
|
||||
LIB_NAME := $(LIB_PREF)$(LIBNAME)$(LIB_EXT)
|
||||
|
||||
LIB_ARCH := $(LIB_DIR)/$(LIB_NAME)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-n
|
||||
DBU.PRG
|
||||
DBUCOPY.PRG
|
||||
DBUEDIT.PRG
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-n
|
||||
RLBACK.PRG
|
||||
RLDIALG.PRG
|
||||
RLFRONT.PRG
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
ifeq ($(HB_MAIN),)
|
||||
HB_MAIN = std
|
||||
HB_MAIN = std
|
||||
endif
|
||||
|
||||
ROOT = ../../
|
||||
@@ -36,6 +36,4 @@ LIBS=\
|
||||
hbmacro \
|
||||
hbcommon \
|
||||
|
||||
HB_USER_PRGFLAGS += -gc0
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
ifeq ($(HB_MAIN),)
|
||||
HB_MAIN = std
|
||||
HB_MAIN = std
|
||||
endif
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
@@ -25,7 +25,4 @@ LIBS=\
|
||||
hbmacro \
|
||||
hbcommon \
|
||||
|
||||
|
||||
HB_USER_PRGFLAGS += -gc0
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
|
||||
@@ -25,7 +25,4 @@ LIBS=\
|
||||
hbmacro \
|
||||
hbcommon \
|
||||
|
||||
|
||||
HB_USER_PRGFLAGS += -gc0
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
|
||||
@@ -92,8 +92,6 @@
|
||||
/* TODO: Support for more compilers/platforms. */
|
||||
/* TODO: Cross compilation support. */
|
||||
/* TODO: Cleanup on variable names and compiler configuration. */
|
||||
/* TODO: remove -n from default harbour switches? (can be disabled with -n-)
|
||||
Disable it when using -hbcc, -hbcmp ? */
|
||||
|
||||
ANNOUNCE HB_GTSYS
|
||||
REQUEST HB_GT_CGI_DEFAULT
|
||||
@@ -811,7 +809,6 @@ FUNCTION Main( ... )
|
||||
cCommand := DirAddPathSep( s_cHB_BIN_INSTALL ) +;
|
||||
cBin_CompPRG +;
|
||||
" " + ArrayToList( s_aPRG ) +;
|
||||
" -n" +;
|
||||
" -i" + s_cHB_INC_INSTALL +;
|
||||
iif( s_lBLDFLGP, " " + cSelfFlagPRG, "" ) +;
|
||||
iif( ! Empty( GetEnv( "HB_USER_PRGFLAGS" ) ), " " + GetEnv( "HB_USER_PRGFLAGS" ), "" ) +;
|
||||
|
||||
@@ -38,6 +38,4 @@ ifeq ($(findstring -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),)
|
||||
LIBS += hbzlib
|
||||
endif
|
||||
|
||||
HB_USER_PRGFLAGS += -gc0
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
ifeq ($(HB_MAIN),)
|
||||
HB_MAIN = std
|
||||
HB_MAIN = std
|
||||
endif
|
||||
|
||||
ROOT = ../../
|
||||
@@ -40,6 +40,4 @@ LIBS=\
|
||||
hbpp \
|
||||
hbcommon \
|
||||
|
||||
HB_USER_PRGFLAGS += -gc0
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
|
||||
Reference in New Issue
Block a user