From 3d0b0e9e1b80ec5625cd4d88ab4ddc34342a9a65 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 11 Aug 2009 07:57:13 +0000 Subject: [PATCH] 2009-08-11 09:55 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/bsd/gcc.cf * config/wce/msvcarm.cf * config/wce/mingwarm.cf * config/wce/poccarm.cf * config/hpux/gcc.cf * config/darwin/gcc.cf * config/dos/watcom.cf * config/dos/djgpp.cf * config/win/watcom.cf * config/win/icc.cf * config/win/cygwin.cf * config/win/msvc.cf * config/win/xcc.cf * config/win/mingw.cf * config/win/pocc.cf * config/win/bcc.cf * config/linux/watcom.cf * config/linux/gcc.cf * config/linux/icc.cf * config/linux/sunpro.cf * config/os2/watcom.cf * config/os2/gcc.cf * config/sunos/gcc.cf * config/sunos/sunpro.cf % CFLAGS and CPPFLAGS initialized using := operator. ! Fixed not initializing CFLAGS/CPPFLAGS at all for some compilers. This may cause spilling of unwanted switches into our make system. (watcom.cf) * Few remaining indentations left from previous round (sunpro.cf). * Some other minor cleanups along the way (xcc.cf). --- harbour/ChangeLog | 32 ++++++++++++++++++++++++++++++++ harbour/config/bsd/gcc.cf | 1 + harbour/config/darwin/gcc.cf | 4 ++-- harbour/config/dos/djgpp.cf | 5 +++-- harbour/config/dos/watcom.cf | 3 ++- harbour/config/hpux/gcc.cf | 5 +++-- harbour/config/linux/gcc.cf | 7 ++++--- harbour/config/linux/icc.cf | 9 ++++----- harbour/config/linux/sunpro.cf | 21 +++++++++++---------- harbour/config/linux/watcom.cf | 3 ++- harbour/config/os2/gcc.cf | 5 +++-- harbour/config/os2/watcom.cf | 3 ++- harbour/config/sunos/gcc.cf | 4 ++-- harbour/config/sunos/sunpro.cf | 31 ++++++++++++++++--------------- harbour/config/wce/mingwarm.cf | 5 +++-- harbour/config/wce/msvcarm.cf | 5 +++-- harbour/config/wce/poccarm.cf | 5 ++--- harbour/config/win/bcc.cf | 1 + harbour/config/win/cygwin.cf | 1 + harbour/config/win/icc.cf | 5 +++-- harbour/config/win/mingw.cf | 5 +++-- harbour/config/win/msvc.cf | 4 +++- harbour/config/win/pocc.cf | 5 ++--- harbour/config/win/watcom.cf | 3 ++- harbour/config/win/xcc.cf | 7 +++---- 25 files changed, 113 insertions(+), 66 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 260de76245..9001e37bcc 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,38 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-11 09:55 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/bsd/gcc.cf + * config/wce/msvcarm.cf + * config/wce/mingwarm.cf + * config/wce/poccarm.cf + * config/hpux/gcc.cf + * config/darwin/gcc.cf + * config/dos/watcom.cf + * config/dos/djgpp.cf + * config/win/watcom.cf + * config/win/icc.cf + * config/win/cygwin.cf + * config/win/msvc.cf + * config/win/xcc.cf + * config/win/mingw.cf + * config/win/pocc.cf + * config/win/bcc.cf + * config/linux/watcom.cf + * config/linux/gcc.cf + * config/linux/icc.cf + * config/linux/sunpro.cf + * config/os2/watcom.cf + * config/os2/gcc.cf + * config/sunos/gcc.cf + * config/sunos/sunpro.cf + % CFLAGS and CPPFLAGS initialized using := operator. + ! Fixed not initializing CFLAGS/CPPFLAGS at all for some compilers. + This may cause spilling of unwanted switches into our make system. + (watcom.cf) + * Few remaining indentations left from previous round (sunpro.cf). + * Some other minor cleanups along the way (xcc.cf). + 2009-08-11 09:41 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/bsd/gcc.cf * config/wce/msvcarm.cf diff --git a/harbour/config/bsd/gcc.cf b/harbour/config/bsd/gcc.cf index 6270368a41..f187d5fb4a 100644 --- a/harbour/config/bsd/gcc.cf +++ b/harbour/config/bsd/gcc.cf @@ -15,6 +15,7 @@ LIB_EXT := .a CC := $(HB_CCACHE) $(HB_CMP) CC_IN := -c CC_OUT := -o + CPPFLAGS := -I. -I$(HB_INC_COMPILE) CFLAGS := diff --git a/harbour/config/darwin/gcc.cf b/harbour/config/darwin/gcc.cf index 3963b68ee9..cca681ac1b 100644 --- a/harbour/config/darwin/gcc.cf +++ b/harbour/config/darwin/gcc.cf @@ -20,13 +20,13 @@ CC_IN := -c # Now solved with '$(subst x,x, )' expression. CC_OUT := -o$(subst x,x, ) -CPPFLAGS = -I. -I$(HB_INC_COMPILE) +CPPFLAGS := -I. -I$(HB_INC_COMPILE) # -no-cpp-precomp prevents from using buggy precompiled headers CPPFLAGS += -no-cpp-precomp # -fno-common enables building .dylib files -CFLAGS = -fno-common +CFLAGS := -fno-common ifneq ($(HB_BUILD_WARN),no) CFLAGS += -Wall -W diff --git a/harbour/config/dos/djgpp.cf b/harbour/config/dos/djgpp.cf index 45b630a736..f3be28fa1b 100644 --- a/harbour/config/dos/djgpp.cf +++ b/harbour/config/dos/djgpp.cf @@ -15,8 +15,9 @@ LIB_EXT := .a CC := $(HB_CMP) CC_IN := -c CC_OUT := -o -CPPFLAGS = -I. -I$(HB_INC_COMPILE) -CFLAGS = + +CPPFLAGS := -I. -I$(HB_INC_COMPILE) +CFLAGS := ifneq ($(HB_BUILD_WARN),no) CFLAGS += -Wall -W diff --git a/harbour/config/dos/watcom.cf b/harbour/config/dos/watcom.cf index 046d688899..8bd07d7740 100644 --- a/harbour/config/dos/watcom.cf +++ b/harbour/config/dos/watcom.cf @@ -28,7 +28,8 @@ endif CC_IN := CC_OUT := -fo= -CPPFLAGS = -zq -bt=dos +CPPFLAGS := -zq -bt=dos +CFLAGS := ifneq ($(HB_BUILD_WARN),no) CPPFLAGS += -w3 diff --git a/harbour/config/hpux/gcc.cf b/harbour/config/hpux/gcc.cf index 50a0258560..957777d2a0 100644 --- a/harbour/config/hpux/gcc.cf +++ b/harbour/config/hpux/gcc.cf @@ -15,9 +15,10 @@ LIB_EXT := .a CC := $(HB_CCACHE) $(HB_CMP) CC_IN := -c CC_OUT := -o -CPPFLAGS = -I. -I$(HB_INC_COMPILE) -CFLAGS = +CPPFLAGS := -I. -I$(HB_INC_COMPILE) +CFLAGS := + LDFLAGS = ifneq ($(HB_BUILD_WARN),no) diff --git a/harbour/config/linux/gcc.cf b/harbour/config/linux/gcc.cf index a41b81991d..2e3b08fc16 100644 --- a/harbour/config/linux/gcc.cf +++ b/harbour/config/linux/gcc.cf @@ -15,14 +15,15 @@ LIB_EXT := .a CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP) CC_IN := -c CC_OUT := -o -CPPFLAGS = -I. -I$(HB_INC_COMPILE) + +CPPFLAGS := -I. -I$(HB_INC_COMPILE) ifeq ($(HB_COMPILER),icc) - CFLAGS = -D_GNU_SOURCE + CFLAGS := -D_GNU_SOURCE #CFLAGS += -std=c99 #CFLAGS += -xHOST else - CFLAGS = + CFLAGS := endif ifneq ($(HB_BUILD_WARN),no) diff --git a/harbour/config/linux/icc.cf b/harbour/config/linux/icc.cf index af5e1b3401..531546c96b 100644 --- a/harbour/config/linux/icc.cf +++ b/harbour/config/linux/icc.cf @@ -15,11 +15,11 @@ LIB_EXT := .a CC := $(HB_CCACHE) $(HB_CMP) CC_IN := -c CC_OUT := -o -CPPFLAGS = -I. -I$(HB_INC_COMPILE) -#CFLAGS = -fast -#CFLAGS = -xHOST -CFLAGS = -D_GNU_SOURCE +CPPFLAGS := -I. -I$(HB_INC_COMPILE) +CFLAGS := -D_GNU_SOURCE +#CFLAGS += -fast +#CFLAGS += -xHOST #CFLAGS += -std=c99 ifneq ($(HB_BUILD_WARN),no) @@ -30,7 +30,6 @@ ifneq ($(HB_BUILD_OPTIM),no) CFLAGS += -O3 endif - # uncomment this if you want to force relocateable code for .so libs # it's necessary on some platforms but can reduce performance #CFLAGS += -fPIC diff --git a/harbour/config/linux/sunpro.cf b/harbour/config/linux/sunpro.cf index 5f127d79fc..655e06eb76 100644 --- a/harbour/config/linux/sunpro.cf +++ b/harbour/config/linux/sunpro.cf @@ -16,9 +16,10 @@ CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP) CC_IN := -c # NOTE: The ending space after -o is important, please preserve it. # Now solved with '$(subst x,x, )' expression. -CC_OUT = -o$(subst x,x, ) +CC_OUT := -o$(subst x,x, ) -CPPFLAGS = -I. -I$(HB_INC_COMPILE) +CPPFLAGS := -I. -I$(HB_INC_COMPILE) +CFLAGS := # try to keep `-fast' as left as possible, as later optim # flags may override values set by `-fast', and this way @@ -31,23 +32,23 @@ LDFLAGS ?= $(HB_ISAOPT) export HB_ISAOPT ifneq ($(HB_BUILD_OPTIM),no) -# Together with $(HB_ISAOPT) above, these are supposed to (somewhat) -# conform to the Blastwave build standards, see -# http://wiki.blastwave.org/mediawiki/index.php/Build_Standards -# Try to keep them this way. -CFLAGS = -fast $(HB_ISAOPT) + # Together with $(HB_ISAOPT) above, these are supposed to (somewhat) + # conform to the Blastwave build standards, see + # http://wiki.blastwave.org/mediawiki/index.php/Build_Standards + # Try to keep them this way. + CFLAGS += -fast $(HB_ISAOPT) endif CFLAGS += -KPIC ifneq ($(HB_BUILD_WARN),no) -CFLAGS += -erroff=%none + CFLAGS += -erroff=%none else -CFLAGS += -erroff=%all + CFLAGS += -erroff=%all endif ifeq ($(HB_BUILD_DEBUG),yes) -CFLAGS += -g + CFLAGS += -g endif LD := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP) diff --git a/harbour/config/linux/watcom.cf b/harbour/config/linux/watcom.cf index 111ecafc31..eec4db54df 100644 --- a/harbour/config/linux/watcom.cf +++ b/harbour/config/linux/watcom.cf @@ -28,7 +28,8 @@ endif CC_IN := CC_OUT := -fo= -CPPFLAGS = -zq -bt=linux +CPPFLAGS := -zq -bt=linux +CFLAGS := ifneq ($(HB_BUILD_WARN),no) CPPFLAGS += -w3 diff --git a/harbour/config/os2/gcc.cf b/harbour/config/os2/gcc.cf index 9faf793041..8e2e4e150b 100644 --- a/harbour/config/os2/gcc.cf +++ b/harbour/config/os2/gcc.cf @@ -15,8 +15,9 @@ LIB_EXT := .a CC := $(HB_CMP) CC_IN := -c CC_OUT := -o -CPPFLAGS = -I. -I$(HB_INC_COMPILE) -CFLAGS = + +CPPFLAGS := -I. -I$(HB_INC_COMPILE) +CFLAGS := ifneq ($(HB_BUILD_WARN),no) CFLAGS += -Wall -W diff --git a/harbour/config/os2/watcom.cf b/harbour/config/os2/watcom.cf index d4dc116dbc..5511dfaa35 100644 --- a/harbour/config/os2/watcom.cf +++ b/harbour/config/os2/watcom.cf @@ -28,7 +28,8 @@ endif CC_IN := CC_OUT := -fo= -CPPFLAGS = -zq -bt=os2 +CPPFLAGS := -zq -bt=os2 +CFLAGS := ifneq ($(HB_BUILD_WARN),no) CPPFLAGS += -w3 diff --git a/harbour/config/sunos/gcc.cf b/harbour/config/sunos/gcc.cf index a09abe07d6..76a8be5870 100644 --- a/harbour/config/sunos/gcc.cf +++ b/harbour/config/sunos/gcc.cf @@ -18,9 +18,9 @@ CC_IN := -c # Now solved with '$(subst x,x, )' expression. CC_OUT := -o$(subst x,x, ) -CPPFLAGS = -I. -I$(HB_INC_COMPILE) +CPPFLAGS := -I. -I$(HB_INC_COMPILE) +CFLAGS := -CFLAGS = LDFLAGS = ifneq ($(HB_BUILD_WARN),no) diff --git a/harbour/config/sunos/sunpro.cf b/harbour/config/sunos/sunpro.cf index d4bfc54575..6cfdd81a13 100644 --- a/harbour/config/sunos/sunpro.cf +++ b/harbour/config/sunos/sunpro.cf @@ -18,7 +18,8 @@ CC_IN := -c # Now solved with '$(subst x,x, )' expression. CC_OUT := -o$(subst x,x, ) -CPPFLAGS = -I. -I$(HB_INC_COMPILE) +CPPFLAGS := -I. -I$(HB_INC_COMPILE) +CFLAGS := # try to keep `-fast' as left as possible, as later optim # flags may override values set by `-fast', and this way @@ -33,31 +34,31 @@ LDFLAGS ?= $(HB_ISAOPT) export HB_ISAOPT ifneq ($(HB_BUILD_OPTIM),no) -# Together with $(HB_ISAOPT) above, these are supposed to (somewhat) -# conform to the Blastwave build standards, see -# http://wiki.blastwave.org/mediawiki/index.php/Build_Standards -# Try to keep them this way. -CFLAGS = -fast $(HB_ISAOPT) -ifneq ($(HB_BUILD_MODE),cpp) -CFLAGS += -xstrconst -endif -CFLAGS += -xnolibmopt + # Together with $(HB_ISAOPT) above, these are supposed to (somewhat) + # conform to the Blastwave build standards, see + # http://wiki.blastwave.org/mediawiki/index.php/Build_Standards + # Try to keep them this way. + CFLAGS += -fast $(HB_ISAOPT) + ifneq ($(HB_BUILD_MODE),cpp) + CFLAGS += -xstrconst + endif + CFLAGS += -xnolibmopt endif ifeq ($(findstring sparc,$(shell isalist)),sparc) -CFLAGS += -xcode=pic32 + CFLAGS += -xcode=pic32 else -CFLAGS += -KPIC + CFLAGS += -KPIC endif ifneq ($(HB_BUILD_WARN),no) -CFLAGS += -erroff=%none + CFLAGS += -erroff=%none else -CFLAGS += -erroff=%all + CFLAGS += -erroff=%all endif ifeq ($(HB_BUILD_DEBUG),yes) -CFLAGS += -g + CFLAGS += -g endif LD := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP) diff --git a/harbour/config/wce/mingwarm.cf b/harbour/config/wce/mingwarm.cf index 3068aa0abc..2af1debf2f 100644 --- a/harbour/config/wce/mingwarm.cf +++ b/harbour/config/wce/mingwarm.cf @@ -15,8 +15,9 @@ LIB_EXT := .a CC := $(HB_CCPREFIX)$(HB_CMP) CC_IN := -c CC_OUT := -o -CPPFLAGS = -I. -I$(HB_INC_COMPILE) -CFLAGS = + +CPPFLAGS := -I. -I$(HB_INC_COMPILE) +CFLAGS := ifneq ($(HB_BUILD_WARN),no) CFLAGS += -Wall -W diff --git a/harbour/config/wce/msvcarm.cf b/harbour/config/wce/msvcarm.cf index 1357a85107..2b1dd70f34 100644 --- a/harbour/config/wce/msvcarm.cf +++ b/harbour/config/wce/msvcarm.cf @@ -15,8 +15,9 @@ else endif CC_IN := -c CC_OUT := -Fo -CPPFLAGS = -I. -I$(HB_INC_COMPILE) -CFLAGS = -nologo -D"_WIN32_WCE=0x420" -D"UNDER_CE=0x420" -D"WIN32_PLATFORM_PSPC" -D"WINCE" -D"_WINCE" -D"_WINDOWS" -D"ARM" -D"_ARM_" -D"ARMV4" -D"POCKETPC2003_UI_MODEL" -D"_M_ARM" -D"UNICODE" -D"_UNICODE" -D_UWIN + +CPPFLAGS := -I. -I$(HB_INC_COMPILE) +CFLAGS := -nologo -D"_WIN32_WCE=0x420" -D"UNDER_CE=0x420" -D"WIN32_PLATFORM_PSPC" -D"WINCE" -D"_WINCE" -D"_WINDOWS" -D"ARM" -D"_ARM_" -D"ARMV4" -D"POCKETPC2003_UI_MODEL" -D"_M_ARM" -D"UNICODE" -D"_UNICODE" -D_UWIN ifeq ($(HB_BUILD_MODE),c) CFLAGS += -TC diff --git a/harbour/config/wce/poccarm.cf b/harbour/config/wce/poccarm.cf index f70c42b1c4..642f6b7544 100644 --- a/harbour/config/wce/poccarm.cf +++ b/harbour/config/wce/poccarm.cf @@ -11,9 +11,10 @@ LIB_EXT := .lib CC := pocc.exe CC_IN := -c CC_OUT := -Fo -CPPFLAGS = -I. +CPPFLAGS := -I. CPPFLAGS += -Ze -Go +CFLAGS := ifneq ($(HB_BUILD_WARN),no) CPPFLAGS += -W1 @@ -35,8 +36,6 @@ ifeq ($(HB_BUILD_DEBUG),yes) CPPFLAGS += -Zi endif -CFLAGS = - LD := polink.exe LD_OUT := -OUT: diff --git a/harbour/config/win/bcc.cf b/harbour/config/win/bcc.cf index bd35a949ca..c193056587 100644 --- a/harbour/config/win/bcc.cf +++ b/harbour/config/win/bcc.cf @@ -11,6 +11,7 @@ LIB_EXT := .lib CC := bcc32.exe CC_IN := -c CC_OUT := -o + CPPFLAGS := -I. -I$(HB_INC_COMPILE) CFLAGS := -q -tWM diff --git a/harbour/config/win/cygwin.cf b/harbour/config/win/cygwin.cf index 736f774064..a52bfb8667 100644 --- a/harbour/config/win/cygwin.cf +++ b/harbour/config/win/cygwin.cf @@ -15,6 +15,7 @@ LIB_EXT := .a CC := $(HB_CMP) CC_IN := -c CC_OUT := -o + CPPFLAGS := -I. -I$(HB_INC_COMPILE) CFLAGS := diff --git a/harbour/config/win/icc.cf b/harbour/config/win/icc.cf index 551d7eafe9..cd4a34b325 100644 --- a/harbour/config/win/icc.cf +++ b/harbour/config/win/icc.cf @@ -12,8 +12,9 @@ LIB_EXT := .lib CC := icl.exe CC_IN := -c CC_OUT := -Fo -CPPFLAGS = -nologo -I. -I$(HB_INC_COMPILE) -CFLAGS = -Gs + +CPPFLAGS := -nologo -I. -I$(HB_INC_COMPILE) +CFLAGS := -Gs ifeq ($(HB_BUILD_MODE),c) CPPFLAGS += -TC diff --git a/harbour/config/win/mingw.cf b/harbour/config/win/mingw.cf index 87c562f51a..4021f72548 100644 --- a/harbour/config/win/mingw.cf +++ b/harbour/config/win/mingw.cf @@ -15,8 +15,9 @@ LIB_EXT := .a CC := $(HB_CCPREFIX)$(HB_CMP) CC_IN := -c CC_OUT := -o -CPPFLAGS = -I. -I$(HB_INC_COMPILE) -CFLAGS = + +CPPFLAGS := -I. -I$(HB_INC_COMPILE) +CFLAGS := ifneq ($(HB_BUILD_WARN),no) CFLAGS += -Wall -W diff --git a/harbour/config/win/msvc.cf b/harbour/config/win/msvc.cf index 71c0a62bfb..259c7f361d 100644 --- a/harbour/config/win/msvc.cf +++ b/harbour/config/win/msvc.cf @@ -9,7 +9,9 @@ LIB_EXT := .lib CC := cl.exe CC_IN := -c CC_OUT := -Fo -CPPFLAGS = -nologo -I. -I$(HB_INC_COMPILE) -Gs + +CPPFLAGS := -nologo -I. -I$(HB_INC_COMPILE) -Gs +CFLAGS := ifeq ($(HB_BUILD_MODE),c) CPPFLAGS += -TC diff --git a/harbour/config/win/pocc.cf b/harbour/config/win/pocc.cf index 32c6c75554..f580fdcf6d 100644 --- a/harbour/config/win/pocc.cf +++ b/harbour/config/win/pocc.cf @@ -11,9 +11,10 @@ LIB_EXT := .lib CC := pocc.exe CC_IN := -c CC_OUT := -Fo -CPPFLAGS = -I. +CPPFLAGS := -I. CPPFLAGS += -Ze -Go -MT +CFLAGS := ifneq ($(HB_BUILD_WARN),no) CPPFLAGS += -W1 @@ -32,8 +33,6 @@ ifeq ($(HB_BUILD_DEBUG),yes) CPPFLAGS += -Zi endif -CFLAGS = - LD := polink.exe LD_OUT := -OUT: diff --git a/harbour/config/win/watcom.cf b/harbour/config/win/watcom.cf index 5ce03d21a0..493ada057f 100644 --- a/harbour/config/win/watcom.cf +++ b/harbour/config/win/watcom.cf @@ -28,7 +28,8 @@ endif CC_IN := CC_OUT := -fo= -CPPFLAGS = -zq -bt=nt -bm +CPPFLAGS := -zq -bt=nt -bm +CFLAGS := ifneq ($(HB_BUILD_WARN),no) CPPFLAGS += -w3 diff --git a/harbour/config/win/xcc.cf b/harbour/config/win/xcc.cf index 4a7c93a37e..ae7c063bab 100644 --- a/harbour/config/win/xcc.cf +++ b/harbour/config/win/xcc.cf @@ -11,10 +11,9 @@ LIB_EXT := .lib CC := xcc.exe CC_IN := -c CC_OUT := -Fo -CFLAGS = -I. -ifneq ($(HB_INC_COMPILE),) - CFLAGS += -I$(HB_INC_COMPILE) -endif + +CPPFLAGS := +CFLAGS := -I. -I$(HB_INC_COMPILE) ifneq ($(HB_BUILD_OPTIM),no) # disabled - it produces bad code