diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0fcc891c13..f4fa272649 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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 diff --git a/harbour/bin/hb-mkdyn.bat b/harbour/bin/hb-mkdyn.bat index 24e02a40fd..e21cb02e41 100644 --- a/harbour/bin/hb-mkdyn.bat +++ b/harbour/bin/hb-mkdyn.bat @@ -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%... diff --git a/harbour/config/bin.cf b/harbour/config/bin.cf index 5e8c900a7f..4d01350d2e 100644 --- a/harbour/config/bin.cf +++ b/harbour/config/bin.cf @@ -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= diff --git a/harbour/config/lib.cf b/harbour/config/lib.cf index bf1fa3b642..dfa6b35050 100644 --- a/harbour/config/lib.cf +++ b/harbour/config/lib.cf @@ -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) diff --git a/harbour/config/rules.cf b/harbour/config/rules.cf index 928f689fd2..25ba900df6 100644 --- a/harbour/config/rules.cf +++ b/harbour/config/rules.cf @@ -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)$(