diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f0ac0047f2..5ec9a96bd0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,24 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-11-12 19:11 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * make_b32.bat + * make_b32.mak + * make_vc.bat + * make_vc.mak + * make_gcc.mak + * contrib/mtpl_b32.mak + * contrib/mtpl_gcc.mak + * contrib/mtpl_vc.mak + + Added 'set HB_BUILD_OPTIM=no' option to disable + all C compiler optimization for all compilers in + non-GNU make system. This replaces old envvars + BCC_NOOPTIM and GCC_NOOPTIM and add MSVC support + for this option. + + * common.mak + * Formatting. + 2008-11-12 18:20 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * source/common/hbverdsp.c * Don't show '(C mode)', only C++. diff --git a/harbour/common.mak b/harbour/common.mak index 18fb9c4d55..58880e9cfb 100644 --- a/harbour/common.mak +++ b/harbour/common.mak @@ -114,9 +114,9 @@ BIN_DIR = bin\$(HB_CC_NAME) OBJ_DIR = obj\$(HB_CC_NAME) LIB_DIR = lib\$(HB_CC_NAME) -MT_OBJ_DIR = $(OBJ_DIR)\mt +MT_OBJ_DIR = $(OBJ_DIR)\mt MTDLL_OBJ_DIR = $(OBJ_DIR)\mt_dll -DLL_OBJ_DIR = $(OBJ_DIR)\dll +DLL_OBJ_DIR = $(OBJ_DIR)\dll # Targets Destination Directories HB_DEST_DIRS = \ diff --git a/harbour/contrib/mtpl_b32.mak b/harbour/contrib/mtpl_b32.mak index f5429f3e1a..0ecbdf5537 100644 --- a/harbour/contrib/mtpl_b32.mak +++ b/harbour/contrib/mtpl_b32.mak @@ -112,7 +112,7 @@ CFLAGS = -I$(INCLUDE_DIR) $(C_USR) $(CFLAGS) CFLAGS = -y -v $(CFLAGS) !endif #----------- -!if !$d(BCC_NOOPTIM) +!if "$(HB_BUILD_OPTIM)" != "no" CFLAGS = -4 -O2 -OS -Ov -Oi -Oc $(CFLAGS) !endif #----------- diff --git a/harbour/contrib/mtpl_gcc.mak b/harbour/contrib/mtpl_gcc.mak index 03153ef4ed..e878b5174d 100644 --- a/harbour/contrib/mtpl_gcc.mak +++ b/harbour/contrib/mtpl_gcc.mak @@ -114,7 +114,7 @@ endif # C Compiler Flags -ifndef GCC_NOOPTIM +ifneq ($(HB_BUILD_OPTIM),no) ifeq ($(HB_ARCHITECTURE),w32) CFLAGS := -march=i586 $(CFLAGS) endif diff --git a/harbour/contrib/mtpl_vc.mak b/harbour/contrib/mtpl_vc.mak index 60199266fb..e890a1fcae 100644 --- a/harbour/contrib/mtpl_vc.mak +++ b/harbour/contrib/mtpl_vc.mak @@ -108,11 +108,13 @@ HB_VISUALC_VER = 80 !endif # C Compiler Flags +!if "$(HB_BUILD_OPTIM)" != "no" !if $(HB_VISUALC_VER) >= 80 CFLAGS_VER = -Ot2b1 -EHs-c- !else CFLAGS_VER = -Ogt2yb1p -GX- -G6 -YX !endif +!endif #----------- CFLAGS = -nologo -W4 -wd4127 -Gs -I$(INCLUDE_DIR) $(CFLAGS_VER) \ diff --git a/harbour/make_b32.bat b/harbour/make_b32.bat index c44dce2046..b1ba8d020b 100644 --- a/harbour/make_b32.bat +++ b/harbour/make_b32.bat @@ -14,6 +14,7 @@ rem Set any of the below settings to customize your build process: rem set HB_BUILD_DLL=no rem set HB_BUILD_DEBUG=yes rem set HB_BUILD_VERBOSE=no +rem set HB_BUILD_OPTIM=no rem set HB_REBUILD_PARSER=yes rem set HB_MAKE_PROGRAM= rem set HB_SHOW_ERRORS= diff --git a/harbour/make_b32.mak b/harbour/make_b32.mak index 7352057b6c..b97552c15f 100644 --- a/harbour/make_b32.mak +++ b/harbour/make_b32.mak @@ -29,6 +29,7 @@ # dll in addition to normal static build # HB_BUILD_DEBUG - If set to yes causes to compile with debug info # HB_BUILD_VERBOSE - Controls echoing commands being executed +# HB_BUILD_OPTIM - Setting it to 'no' disables compiler optimizations # HB_REBUILD_PARSER - If set to yes force preprocessing new rules by # Bison (you must use Bison 2.3 or later) # HB_INSTALL_PREFIX - Path to installation directory into which @@ -85,7 +86,7 @@ CFLAGS = -I$(INCLUDE_DIR) -I$(OBJ_DIR) $(C_USR) CFLAGSMT = -DHB_MT_VM #----------- -!ifndef BCC_NOOPTIM +!if "$(HB_BUILD_OPTIM)" != "no" CFLAGS = -4 -O2 -OS -Ov -Oi -Oc $(CFLAGS) !endif #----------- @@ -655,15 +656,15 @@ doClean: @if exist $(OBJ_DIR)\*.obj $(DEL) $(OBJ_DIR)\*.obj > nul @if exist $(OBJ_DIR)\*.c $(DEL) $(OBJ_DIR)\*.c > nul @if exist $(OBJ_DIR)\*.h $(DEL) $(OBJ_DIR)\*.h > nul + @if exist $(DLL_OBJ_DIR)\*.obj $(DEL) $(DLL_OBJ_DIR)\*.obj > nul + @if exist $(DLL_OBJ_DIR)\*.c $(DEL) $(DLL_OBJ_DIR)\*.c > nul + @if exist $(DLL_OBJ_DIR)\*.h $(DEL) $(DLL_OBJ_DIR)\*.h > nul @if exist $(MT_OBJ_DIR)\*.obj $(DEL) $(MT_OBJ_DIR)\*.obj > nul @if exist $(MT_OBJ_DIR)\*.c $(DEL) $(MT_OBJ_DIR)\*.c > nul @if exist $(MT_OBJ_DIR)\*.h $(DEL) $(MT_OBJ_DIR)\*.h > nul @if exist $(MTDLL_OBJ_DIR)\*.obj $(DEL) $(MTDLL_OBJ_DIR)\*.obj > nul @if exist $(MTDLL_OBJ_DIR)\*.c $(DEL) $(MTDLL_OBJ_DIR)\*.c > nul @if exist $(MTDLL_OBJ_DIR)\*.h $(DEL) $(MTDLL_OBJ_DIR)\*.h > nul - @if exist $(DLL_OBJ_DIR)\*.obj $(DEL) $(DLL_OBJ_DIR)\*.obj > nul - @if exist $(DLL_OBJ_DIR)\*.c $(DEL) $(DLL_OBJ_DIR)\*.c > nul - @if exist $(DLL_OBJ_DIR)\*.h $(DEL) $(DLL_OBJ_DIR)\*.h > nul @if exist $(INCLUDE_DIR)\hbverbld.h $(DEL) $(INCLUDE_DIR)\hbverbld.h > nul @if exist inst_$(HB_CC_NAME).log $(DEL) inst_$(HB_CC_NAME).log > nul @if exist bin\*.exe $(DEL) bin\*.exe > nul diff --git a/harbour/make_gcc.mak b/harbour/make_gcc.mak index 969f1cb927..4a31bb32c9 100644 --- a/harbour/make_gcc.mak +++ b/harbour/make_gcc.mak @@ -29,6 +29,7 @@ # dll in addition to normal static build (currently not working) # HB_BUILD_DEBUG - If set to yes causes to compile with debug info # HB_BUILD_VERBOSE - Controls echoing commands being executed +# HB_BUILD_OPTIM - Setting it to 'no' disables compiler optimizations # HB_REBUILD_PARSER - If set to yes force preprocessing new rules by # Bison (you must use Bison 2.3 or later) # HB_INSTALL_PREFIX - Path to installation directory into which @@ -149,7 +150,7 @@ endif CFLAGS := -W -Wall -I$(INCLUDE_DIR) $(C_USR) -I$(OBJ_DIR) CFLAGSMT := -DHB_MT_VM #----------- -ifndef GCC_NOOPTIM +ifneq ($(HB_BUILD_OPTIM),no) ifeq ($(HB_ARCHITECTURE),w32) CFLAGS := -march=i586 $(CFLAGS) endif @@ -548,15 +549,15 @@ doClean: -$(DEL) $(OBJ_DIR)/*$(OBJEXT) -$(DEL) $(OBJ_DIR)/*.c -$(DEL) $(OBJ_DIR)/*.h + -$(DEL) $(DLL_OBJ_DIR)/*$(OBJEXT) + -$(DEL) $(DLL_OBJ_DIR)/*.c + -$(DEL) $(DLL_OBJ_DIR)/*.h -$(DEL) $(MT_OBJ_DIR)/*$(OBJEXT) -$(DEL) $(MT_OBJ_DIR)/*.c -$(DEL) $(MT_OBJ_DIR)/*.h -$(DEL) $(MTDLL_OBJ_DIR)/*$(OBJEXT) -$(DEL) $(MTDLL_OBJ_DIR)/*.c -$(DEL) $(MTDLL_OBJ_DIR)/*.h - -$(DEL) $(DLL_OBJ_DIR)/*$(OBJEXT) - -$(DEL) $(DLL_OBJ_DIR)/*.c - -$(DEL) $(DLL_OBJ_DIR)/*.h -$(DEL) $(INCLUDE_DIR)/hbverbld.h -$(DEL) inst_$(HB_CC_NAME).log -$(DEL) common.cf diff --git a/harbour/make_vc.bat b/harbour/make_vc.bat index 429d5420bd..b37c2973a6 100644 --- a/harbour/make_vc.bat +++ b/harbour/make_vc.bat @@ -14,6 +14,7 @@ rem Set any of the below settings to customize your build process: rem set HB_BUILD_DLL=no rem set HB_BUILD_DEBUG=yes rem set HB_BUILD_VERBOSE=no +rem set HB_BUILD_OPTIM=no rem set HB_REBUILD_PARSER=yes rem set HB_MAKE_PROGRAM= rem set HB_SHOW_ERRORS= diff --git a/harbour/make_vc.mak b/harbour/make_vc.mak index 55153ac5af..57daf08c51 100644 --- a/harbour/make_vc.mak +++ b/harbour/make_vc.mak @@ -29,6 +29,7 @@ # dll in addition to normal static build # HB_BUILD_DEBUG - If set to yes causes to compile with debug info # HB_BUILD_VERBOSE - Controls echoing commands being executed +# HB_BUILD_OPTIM - Setting it to 'no' disables compiler optimizations # HB_REBUILD_PARSER - If set to yes force preprocessing new rules by # Bison (you must use Bison 2.3 or later) # HB_INSTALL_PREFIX - Path to installation directory into which @@ -100,11 +101,13 @@ MTDLL_OBJS = $(TMP_DLL_OBJS:obj\vc=obj\vc\dll) $(VMMTDLL_LIB_OBJS) # C Compiler Flags !if "$(HB_BUILD_WINCE)" == "yes" +!if "$(HB_BUILD_OPTIM)" != "no" !if $(HB_VISUALC_VER) >= 80 CFLAGS_VER = -Od -Os -Gy -EHsc- -Gm -Zi -GR- !else CFLAGS_VER = -Oxsb1 -EHsc -YX -GF !endif +!endif # TOFIX: These should be cleaned from everything not absolutely necessary: @@ -127,11 +130,13 @@ DBGMARKER = d # NOTE: See here: http://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx +!if "$(HB_BUILD_OPTIM)" != "no" !if $(HB_VISUALC_VER) >= 80 CFLAGS_VER = -Ot2b1 -EHs-c- !else CFLAGS_VER = -Ogt2yb1p -GX- -G6 -YX !endif +!endif CFLAGS = -nologo -W4 -wd4127 -Gs -I$(INCLUDE_DIR) $(CFLAGS_VER) \ $(C_USR) -I$(OBJ_DIR) @@ -1036,15 +1041,15 @@ doClean: @if exist $(OBJ_DIR)\*.c $(DEL) $(OBJ_DIR)\*.c > nul @if exist $(OBJ_DIR)\*.h $(DEL) $(OBJ_DIR)\*.h > nul @if exist $(OBJ_DIR)\*.pch $(DEL) $(OBJ_DIR)\*.pch > nul + @if exist $(DLL_OBJ_DIR)\*.obj $(DEL) $(DLL_OBJ_DIR)\*.obj > nul + @if exist $(DLL_OBJ_DIR)\*.c $(DEL) $(DLL_OBJ_DIR)\*.c > nul + @if exist $(DLL_OBJ_DIR)\*.h $(DEL) $(DLL_OBJ_DIR)\*.h > nul @if exist $(MT_OBJ_DIR)\*.obj $(DEL) $(MT_OBJ_DIR)\*.obj > nul @if exist $(MT_OBJ_DIR)\*.c $(DEL) $(MT_OBJ_DIR)\*.c > nul @if exist $(MT_OBJ_DIR)\*.h $(DEL) $(MT_OBJ_DIR)\*.h > nul @if exist $(MTDLL_OBJ_DIR)\*.obj $(DEL) $(MTDLL_OBJ_DIR)\*.obj > nul @if exist $(MTDLL_OBJ_DIR)\*.c $(DEL) $(MTDLL_OBJ_DIR)\*.c > nul @if exist $(MTDLL_OBJ_DIR)\*.h $(DEL) $(MTDLL_OBJ_DIR)\*.h > nul - @if exist $(DLL_OBJ_DIR)\*.obj $(DEL) $(DLL_OBJ_DIR)\*.obj > nul - @if exist $(DLL_OBJ_DIR)\*.c $(DEL) $(DLL_OBJ_DIR)\*.c > nul - @if exist $(DLL_OBJ_DIR)\*.h $(DEL) $(DLL_OBJ_DIR)\*.h > nul @if exist $(INCLUDE_DIR)\hbverbld.h $(DEL) $(INCLUDE_DIR)\hbverbld.h > nul @if exist inst_$(HB_CC_NAME).log $(DEL) inst_$(HB_CC_NAME).log > nul @if exist bin\*.exe $(DEL) bin\*.exe > nul