2009-02-26 12:16 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

* config/rules.cf
  * config/win/global.cf
  * config/lib.cf
  * config/bin.cf
    * Make files changed to:
      - add Harbour option -n1 for all lib .prgs.
      - add Harbour option -n for all binary .prgs.
      - use HB_GCMODE to override -gc mode for binaries.
      - add C -DHB_DYNLIB option when HB_DLL envvar is set to 'yes'.
    ; This means that now 'set HB_DLL=yes' setting works as planned,
      and will compile Harbour to allow the creation of .dlls
      and will also create those (msvc, bcc32, owatcom).
      (MinGW has been covered before these changes already.)
    ; TOFIX: .dlls still need tweaking to work properly.
             owatcom doesn't create usable binaries when
             using HB_DLL=yes f.e., also hbrun-dll cannot be
             built with msvc/bcc32.

  * config/win/owatcom.cf
    % Removed DOS hack.

  * bin/hb-mkdyn.bat
    ! Fixes to recent changes.
This commit is contained in:
Viktor Szakats
2009-02-26 11:17:38 +00:00
parent 4ced222eb0
commit df007814b5
7 changed files with 47 additions and 21 deletions

View File

@@ -8,6 +8,31 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-02-26 12:16 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* config/rules.cf
* config/win/global.cf
* config/lib.cf
* config/bin.cf
* Make files changed to:
- add Harbour option -n1 for all lib .prgs.
- add Harbour option -n for all binary .prgs.
- use HB_GCMODE to override -gc mode for binaries.
- add C -DHB_DYNLIB option when HB_DLL envvar is set to 'yes'.
; This means that now 'set HB_DLL=yes' setting works as planned,
and will compile Harbour to allow the creation of .dlls
and will also create those (msvc, bcc32, owatcom).
(MinGW has been covered before these changes already.)
; TOFIX: .dlls still need tweaking to work properly.
owatcom doesn't create usable binaries when
using HB_DLL=yes f.e., also hbrun-dll cannot be
built with msvc/bcc32.
* config/win/owatcom.cf
% Removed DOS hack.
* bin/hb-mkdyn.bat
! Fixes to recent changes.
2009-02-26 12:02 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/gtwvt/gtwvt.h
* harbour/source/rtl/gtwvt/gtwvt.c
@@ -634,7 +659,7 @@
+ Added -n1 to Harbour flags to lib.cf.
; TOFIX: The former works, the latter doesn't.
Could someone please help why is this
happening?
happening? [DONE]
* utils/hbmk2/hbmk2.prg
- Removed -n from default Harbour switches.
@@ -654,7 +679,7 @@
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)
one has only befenefits for other scenarios) [DONE]
; TODO: Add hb-mkdll.bat to postinst.bat. [DONE]
; TODO: Add BCC support, if possible. [DONE]
; TODO: Rename hb-mkslib.sh to 8.3 name and sync

View File

@@ -120,9 +120,7 @@ rmdir _dll
goto END
:DO_OWATCOM
if not "%HB_COMPILER%" == "bcc32" goto NOT_BCC32
:DO_BCC32
echo Making .dlls for %HB_COMPILER%...
@@ -217,10 +215,10 @@ set _DST_NAME_ST=harbour-%HB_DLL_VERSION%-b32
set _DST_NAME_MT=harbourmt-%HB_DLL_VERSION%-b32
echo. , "%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll",, cw32mt.lib import32.lib >> _hballst.txt
echo. , "%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll",, cw32mt.lib import32.lib >> _hballmt.txt
echo. , "%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll",, cw32mt.lib import32.lib >> _hballmt.txt
echo Making %_DST_NAME_ST%.dll... && ilink32 -Gn -C -aa -Tpd -Gi -x c0d32.obj @_hballst.txt > nul
echo Making %_DST_NAME_MT%.dll... && ilink32 -Gn -C -aa -Tpd -Gi -x c0d32.obj @_hballmt.txt > nul
echo Making %_DST_NAME_ST%.dll... && ilink32 -Gn -C -aa -Tpd -Gi -x c0d32.obj @_hballst.txt
echo Making %_DST_NAME_MT%.dll... && ilink32 -Gn -C -aa -Tpd -Gi -x c0d32.obj @_hballmt.txt
if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib"
if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib"
@@ -246,9 +244,7 @@ rmdir _dll
goto END
:NOT_BCC32
if not "%HB_COMPILER%" == "owatcom" goto NOT_OWATCOM
:DO_OWATCOM
echo Making .dlls for %HB_COMPILER%...

View File

@@ -9,7 +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
HB_GCMODE=0
HB_NFLAG=-n
EXE_NAME=

View File

@@ -14,7 +14,7 @@ include $(TOP)$(ROOT)config/global.cf
include $(TOP)$(ROOT)config/c.cf
include $(TOP)$(ROOT)config/prg.cf
HB_FLAGS := $(HB_FLAGS) -n1
HB_NFLAG=-n1
LIB_NAME := $(LIB_PREF)$(LIBNAME)$(LIB_EXT)

View File

@@ -23,7 +23,11 @@ HB := $(HB)harbour$(EXE_EXT)
ifeq ($(HB_GCMODE),)
HB_GCMODE=3
endif
HB_FLAGS := -n -i$(HB_INC_COMPILE) -q0 -w3 -es2 -gc$(HB_GCMODE) -km -l
ifeq ($(HB_NFLAG),)
HB_NFLAG=
endif
HB_FLAGS := -i$(HB_INC_COMPILE) -q0 -w3 -es2 -km -l
HB_RULE = $(HB) $? $(HB_NFLAG) $(HB_FLAGS) -gc$(HB_GCMODE) $(HB_USER_PRGFLAGS)
# The rule to link an executable.
ifeq ($(LD_RULE),)
@@ -34,13 +38,13 @@ endif
# The rule to compile a C source file.
ifeq ($(CC_RULE),)
# Use default rule if architecture/compiler specific rule is not defined
CC_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(HB_USER_CFLAGS) $(CC_IN) $< $(CC_OUT)$(<F:.c=$(OBJ_EXT))
CC_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(HB_USER_CFLAGS) $(HB_CDYNLIB) $(CC_IN) $< $(CC_OUT)$(<F:.c=$(OBJ_EXT))
endif
# The rule to compile a C++ source file.
ifeq ($(CPP_RULE),)
# Use default rule if architecture/compiler specific rule is not defined
CPP_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(HB_USER_CFLAGS) $(CC_IN) $< $(CC_OUT)$(<F:.cpp=$(OBJ_EXT))
CPP_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(HB_USER_CFLAGS) $(HB_CDYNLIB) $(CC_IN) $< $(CC_OUT)$(<F:.cpp=$(OBJ_EXT))
endif
@@ -80,7 +84,7 @@ endif
# Rule to generate a C file from a PRG file.
%.c : $(GRANDP)%.prg
$(HB) $? $(HB_FLAGS) $(HB_USER_PRGFLAGS)
$(HB_RULE)
ifeq ($(SHLVL),) # COMMAND.COM
# Do nothing. the $(HB_ARCHITECTURE)/global.cf will handle clean up.

View File

@@ -18,6 +18,10 @@ HB_GT_LIST=\
# verify if GT drivers exist
HB_GT_LIBS := $(foreach gt, $(HB_GT_LIST), $(if $(wildcard $(TOP)$(ROOT)source/rtl/$(gt)),$(gt),))
ifeq ($(HB_DLL),yes)
HB_CDYNLIB=-DHB_DYNLIB
endif
ifeq ($(SHLVL),) # COMMAND.COM
# There is a conflict with the use of '\' and '/' characters

View File

@@ -105,7 +105,3 @@ ARFLAGS = -p=64 -c -n $(HB_USER_AFLAGS)
AR_RULE = $(create_library)
include $(TOP)$(ROOT)config/rules.cf
# work arround to DOS command line size limit
export HARBOURCMD := $(HB_FLAGS)
HB_FLAGS =