Index: branches/kBuild-0.1.5/kBuild/footer.kmk
===================================================================
--- branches/kBuild-0.1.5/kBuild/footer.kmk	(revision 2367)
+++ branches/kBuild-0.1.5/kBuild/footer.kmk	(revision 2368)
@@ -2166,4 +2166,9 @@
 define def_src_handler_objc
 local type := OBJC
+ $(kb-src-one 2)
+endef
+
+define def_src_handler_objcxx
+local type := OBJCXX
  $(kb-src-one 2)
 endef
Index: branches/kBuild-0.1.5/kBuild/header.kmk
===================================================================
--- branches/kBuild-0.1.5/kBuild/header.kmk	(revision 2367)
+++ branches/kBuild-0.1.5/kBuild/header.kmk	(revision 2368)
@@ -809,4 +809,6 @@
  .CC:def_src_handler_cxx \
   .m:def_src_handler_objc \
+  .M:def_src_handler_objcxx \
+ .mm:def_src_handler_objcxx \
 .asm:def_src_handler_asm \
 .ASM:def_src_handler_asm \
@@ -820,5 +822,5 @@
 ## PROPS_TOOLS
 # This is a subset of PROPS_SINGLE.
-PROPS_TOOLS := TOOL CTOOL CXXTOOL OBJCTOOL ASTOOL RCTOOL ARTOOL LDTOOL FETCHTOOL UNPACKTOOL PATCHTOOL
+PROPS_TOOLS := TOOL CTOOL CXXTOOL OBJCTOOL OBJCXXTOOL ASTOOL RCTOOL ARTOOL LDTOOL FETCHTOOL UNPACKTOOL PATCHTOOL
 
 ## PROPS_SINGLE
@@ -827,11 +829,11 @@
 # will do the necessary inheritance for templates, sdks, tools and targets.
 PROPS_SINGLE := $(PROPS_TOOLS) TEMPLATE INST NOINST BLD_TYPE BLD_TRG BLD_TRG_ARCH BLD_TRG_CPU FETCHDIR \
-	OBJSUFF COBJSUFF CXXOBJSUFF OBJCOBJSUFF ASOBJSUFF RCOBJSUFF SYSSUFF BINSUFF EXESUFF DLLSUFF LIBSUFF ARLIBSUFF \
+	OBJSUFF COBJSUFF CXXOBJSUFF OBJCOBJSUFF OBJCXXOBJSUFF ASOBJSUFF RCOBJSUFF SYSSUFF BINSUFF EXESUFF DLLSUFF LIBSUFF ARLIBSUFF \
 	MODE UID GID
 ## PROPS_SINGLE_LNK
 # Subset of PROPS_SINGLE which applies to all linkable targets.
-PROPS_SINGLE_LNK := TOOL TEMPLATE CTOOL CXXTOOL OBJCTOOL ASTOOL RCTOOL \
+PROPS_SINGLE_LNK := TOOL TEMPLATE CTOOL CXXTOOL OBJCTOOL OBJCXXTOOL ASTOOL RCTOOL \
 	INST NOINST BLD_TYPE BLD_TRG BLD_TRG_ARCH BLD_TRG_CPU \
-	OBJSUFF COBJSUFF CXXOBJSUFF OBJCOBJSUFF ASOBJSUFF RCOBJSUFF \
+	OBJSUFF COBJSUFF CXXOBJSUFF OBJCOBJSUFF OBJCXXOBJSUFF ASOBJSUFF RCOBJSUFF \
 	MODE UID GID
 
@@ -852,4 +854,5 @@
 	CXXFLAGS CXXDEFS \
 	OBJCFLAGS OBJCDEFS \
+	OBJCXXFLAGS OBJCXXDEFS \
 	ASFLAGS ASDEFS \
 	RCFLAGS RCDEFS \
@@ -864,4 +867,5 @@
 	CXXFLAGS CXXDEFS \
 	OBJCFLAGS OBJCDEFS \
+	OBJCXXFLAGS OBJCXXDEFS \
 	ASFLAGS ASDEFS \
 	RCFLAGS RCDEFS \
@@ -875,5 +879,5 @@
 PROPS_ACCUMULATE_L := \
 	SDKS USES SOURCES SRC_HANDLERS INTERMEDIATES \
-	INCS CINCS CXXINCS OBJCINCS ASINCS RCINCS \
+	INCS CINCS CXXINCS OBJCINCS OBJCXXINCS ASINCS RCINCS \
 	LIBS LIBPATH \
 	DIRS BLDDIRS CLEAN
@@ -882,5 +886,5 @@
 PROPS_ACCUMULATE_L_LNK := \
 	SDKS USES SOURCES SRC_HANDLERS INTERMEDIATES \
-	INCS CINCS CXXINCS OBJCINCS ASINCS RCINCS \
+	INCS CINCS CXXINCS OBJCINCS OBJCXXINCS ASINCS RCINCS \
 	BLDDIRS CLEAN
 
Index: branches/kBuild-0.1.5/kBuild/tools/GCC4MACHO.kmk
===================================================================
--- branches/kBuild-0.1.5/kBuild/tools/GCC4MACHO.kmk	(revision 2367)
+++ branches/kBuild-0.1.5/kBuild/tools/GCC4MACHO.kmk	(revision 2368)
@@ -35,9 +35,10 @@
 
 # Tool Specific Properties
-TOOL_GCC4MACHO_CC  ?= gcc$(HOSTSUFF_EXE)
-TOOL_GCC4MACHO_CXX ?= g++$(HOSTSUFF_EXE)
-TOOL_GCC4MACHO_OBJC?= gcc$(HOSTSUFF_EXE)
-TOOL_GCC4MACHO_AS  ?= gcc$(HOSTSUFF_EXE)
-TOOL_GCC4MACHO_LD  ?= gcc$(HOSTSUFF_EXE)
+TOOL_GCC4MACHO_CC        ?= gcc$(HOSTSUFF_EXE)
+TOOL_GCC4MACHO_CXX       ?= g++$(HOSTSUFF_EXE)
+TOOL_GCC4MACHO_OBJC      ?= gcc$(HOSTSUFF_EXE)
+TOOL_GCC4MACHO_OBJCXX    ?= gcc$(HOSTSUFF_EXE)
+TOOL_GCC4MACHO_AS        ?= gcc$(HOSTSUFF_EXE)
+TOOL_GCC4MACHO_LD        ?= gcc$(HOSTSUFF_EXE)
 TOOL_GCC4MACHO_LD_SYSMOD ?= gcc$(HOSTSUFF_EXE)
 ifndef TOOL_GCC4MACHO_LDFLAGS.$(KBUILD_TARGET)
@@ -50,7 +51,8 @@
 
 ifdef SLKRUNS
-TOOL_GCC4MACHO_CC  += -fmessage-length=0
-TOOL_GCC4MACHO_CXX += -fmessage-length=0
-TOOL_GCC4MACHO_OBJC+= -fmessage-length=0
+TOOL_GCC4MACHO_CC        += -fmessage-length=0
+TOOL_GCC4MACHO_CXX       += -fmessage-length=0
+TOOL_GCC4MACHO_OBJC      += -fmessage-length=0
+TOOL_GCC4MACHO_OBJCXX    += -fmessage-length=0
 endif
 
@@ -65,5 +67,4 @@
 
 TOOL_GCC4MACHO_CXXOBJSUFF       ?= .o
-TOOL_GCC4MACHO_CXXOBJSUFF       ?= .o
 TOOL_GCC4MACHO_CXXFLAGS         ?=
 TOOL_GCC4MACHO_CXXFLAGS.debug   ?= -g
@@ -73,5 +74,4 @@
 TOOL_GCC4MACHO_CXXDEFS          ?=
 
-TOOL_GCC4MACHO_OBJCOBJSUFF      ?= .o
 TOOL_GCC4MACHO_OBJCOBJSUFF      ?= .o
 TOOL_GCC4MACHO_OBJCFLAGS        ?=
@@ -81,4 +81,12 @@
 TOOL_GCC4MACHO_OBJCINCS         ?=
 TOOL_GCC4MACHO_OBJCDEFS         ?=
+
+TOOL_GCC4MACHO_OBJCXXOBJSUFF        ?= .o
+TOOL_GCC4MACHO_OBJCXXFLAGS          ?=
+TOOL_GCC4MACHO_OBJCXXFLAGS.debug    ?= -g
+TOOL_GCC4MACHO_OBJCXXFLAGS.profile  ?= -O2 #-g -pg
+TOOL_GCC4MACHO_OBJCXXFLAGS.release  ?= -O2
+TOOL_GCC4MACHO_OBJCXXINCS           ?=
+TOOL_GCC4MACHO_OBJCXXDEFS           ?=
 
 TOOL_GCC4MACHO_ASFLAGS          ?= -x assembler-with-cpp
@@ -215,4 +223,46 @@
 define TOOL_GCC4MACHO_COMPILE_OBJC_CMDS
 	$(QUIET)$(TOOL_GCC4MACHO_OBJC) -c\
+		$(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		-o $(obj)\
+		$(abspath $(source))
+endef
+endif # !KBUILD_USE_KOBJCACHE
+
+
+## Compile Objective-C++ source.
+# @param    $(target)   Normalized main target name.
+# @param    $(source)   Source filename (relative).
+# @param    $(obj)      Object file name. This shall be (re)created by the compilation.
+# @param    $(dep)	    Dependcy file. This shall be (re)created by the compilation.
+# @param    $(flags)    Flags.
+# @param    $(defs)     Definitions. No -D or something.
+# @param    $(incs)     Includes. No -I or something.
+# @param    $(dirdep)   Directory creation dependency.
+# @param    $(deps)		Other dependencies.
+# @param    $(outbase)  Output basename (full). Use this for list files and such.
+# @param    $(objsuff)  Object suffix.
+TOOL_GCC4MACHO_COMPILE_OBJCXX_DEPEND =
+TOOL_GCC4MACHO_COMPILE_OBJCXX_DEPORD =
+ifdef KBUILD_USE_KOBJCACHE
+TOOL_GCC4MACHO_COMPILE_OBJCXX_USES_KOBJCACHE = 1
+TOOL_GCC4MACHO_COMPILE_OBJCXX_OUTPUT = $(outbase).mii
+define TOOL_GCC4MACHO_COMPILE_OBJCXX_CMDS
+	$(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
+		--kObjCache-cpp $(outbase).mii\
+		$(TOOL_GCC4MACHO_OBJCXX) -E -o -\
+		$(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		$(abspath $(source))\
+		--kObjCache-cc $(obj)\
+		$(TOOL_GCC4MACHO_OBJCXX) -c\
+		$(flags) -fpreprocessed -x objective-c++\
+		-o $(obj)\
+		-
+endef
+else  # !KBUILD_USE_KOBJCACHE
+TOOL_GCC4MACHO_COMPILE_OBJCXX_OUTPUT =
+define TOOL_GCC4MACHO_COMPILE_OBJCXX_CMDS
+	$(QUIET)$(TOOL_GCC4MACHO_OBJCXX) -c\
 		$(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
 		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
Index: branches/kBuild-0.1.5/kBuild/tools/GXX4MACHO.kmk
===================================================================
--- branches/kBuild-0.1.5/kBuild/tools/GXX4MACHO.kmk	(revision 2367)
+++ branches/kBuild-0.1.5/kBuild/tools/GXX4MACHO.kmk	(revision 2368)
@@ -35,9 +35,10 @@
 
 # Tool Specific Properties
-TOOL_GXX4MACHO_CC  ?= gcc$(HOSTSUFF_EXE)
-TOOL_GXX4MACHO_CXX ?= g++$(HOSTSUFF_EXE)
-TOOL_GXX4MACHO_OBJC?= gcc$(HOSTSUFF_EXE)
-TOOL_GXX4MACHO_AS  ?= gcc$(HOSTSUFF_EXE)
-TOOL_GXX4MACHO_LD  ?= g++$(HOSTSUFF_EXE)
+TOOL_GXX4MACHO_CC        ?= gcc$(HOSTSUFF_EXE)
+TOOL_GXX4MACHO_CXX       ?= g++$(HOSTSUFF_EXE)
+TOOL_GXX4MACHO_OBJC      ?= gcc$(HOSTSUFF_EXE)
+TOOL_GXX4MACHO_OBJCXX    ?= gcc$(HOSTSUFF_EXE)
+TOOL_GXX4MACHO_AS        ?= gcc$(HOSTSUFF_EXE)
+TOOL_GXX4MACHO_LD        ?= g++$(HOSTSUFF_EXE)
 TOOL_GXX4MACHO_LD_SYSMOD ?= g++$(HOSTSUFF_EXE)
 ifndef TOOL_GXX4MACHO_LDFLAGS.$(KBUILD_TARGET)
@@ -50,7 +51,8 @@
 
 ifdef SLKRUNS
-TOOL_GXX4MACHO_CC  += -fmessage-length=0
-TOOL_GXX4MACHO_CXX += -fmessage-length=0
-TOOL_GXX4MACHO_OBJC+= -fmessage-length=0
+TOOL_GXX4MACHO_CC     += -fmessage-length=0
+TOOL_GXX4MACHO_CXX    += -fmessage-length=0
+TOOL_GXX4MACHO_OBJC   += -fmessage-length=0
+TOOL_GXX4MACHO_OBJCXX += -fmessage-length=0
 endif
 
@@ -65,5 +67,4 @@
 
 TOOL_GXX4MACHO_CXXOBJSUFF       ?= .o
-TOOL_GXX4MACHO_CXXOBJSUFF       ?= .o
 TOOL_GXX4MACHO_CXXFLAGS         ?=
 TOOL_GXX4MACHO_CXXFLAGS.debug   ?= -g
@@ -73,5 +74,4 @@
 TOOL_GXX4MACHO_CXXDEFS          ?=
 
-TOOL_GXX4MACHO_OBJCOBJSUFF      ?= .o
 TOOL_GXX4MACHO_OBJCOBJSUFF      ?= .o
 TOOL_GXX4MACHO_OBJCFLAGS        ?=
@@ -81,4 +81,12 @@
 TOOL_GXX4MACHO_OBJCINCS         ?=
 TOOL_GXX4MACHO_OBJCDEFS         ?=
+
+TOOL_GXX4MACHO_OBJCXXOBJSUFF        ?= .o
+TOOL_GXX4MACHO_OBJCXXFLAGS          ?=
+TOOL_GXX4MACHO_OBJCXXFLAGS.debug    ?= -g
+TOOL_GXX4MACHO_OBJCXXFLAGS.profile  ?= -O2 #-g -pg
+TOOL_GXX4MACHO_OBJCXXFLAGS.release  ?= -O2
+TOOL_GXX4MACHO_OBJCXXINCS           ?=
+TOOL_GXX4MACHO_OBJCXXDEFS           ?=
 
 TOOL_GXX4MACHO_ASFLAGS          ?= -x assembler-with-cpp
@@ -215,4 +223,46 @@
 define TOOL_GXX4MACHO_COMPILE_OBJC_CMDS
 	$(QUIET)$(TOOL_GXX4MACHO_OBJC) -c\
+		$(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		-o $(obj)\
+		$(abspath $(source))
+endef
+endif # !KUSE_OBJCACHE
+
+
+## Compile Objective-C++ source.
+# @param    $(target)   Normalized main target name.
+# @param    $(source)   Source filename (relative).
+# @param    $(obj)      Object file name. This shall be (re)created by the compilation.
+# @param    $(dep)	    Dependcy file. This shall be (re)created by the compilation.
+# @param    $(flags)    Flags.
+# @param    $(defs)     Definitions. No -D or something.
+# @param    $(incs)     Includes. No -I or something.
+# @param    $(dirdep)   Directory creation dependency.
+# @param    $(deps)		Other dependencies.
+# @param    $(outbase)  Output basename (full). Use this for list files and such.
+# @param    $(objsuff)  Object suffix.
+TOOL_GXX4MACHO_COMPILE_OBJCXX_DEPEND =
+TOOL_GXX4MACHO_COMPILE_OBJCXX_DEPORD =
+ifdef KBUILD_USE_KOBJCACHE
+TOOL_GXX4MACHO_COMPILE_OBJCXX_USES_KOBJCACHE = 1
+TOOL_GXX4MACHO_COMPILE_OBJCXX_OUTPUT = $(outbase).mii
+define TOOL_GXX4MACHO_COMPILE_OBJCXX_CMDS
+	$(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
+		--kObjCache-cpp $(outbase).mii\
+		$(TOOL_GXX4MACHO_OBJCXX) -E -o -\
+		$(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		$(abspath $(source))\
+		--kObjCache-cc $(obj)\
+		$(TOOL_GXX4MACHO_OBJCXX) -c\
+		$(flags) -fpreprocessed -x objective-c++ \
+		-o $(obj)\
+		-
+endef
+else  # !KBUILD_USE_KOBJCACHE
+TOOL_GXX4MACHO_COMPILE_OBJCXX_OUTPUT =
+define TOOL_GXX4MACHO_COMPILE_OBJCXX_CMDS
+	$(QUIET)$(TOOL_GXX4MACHO_OBJCXX) -c\
 		$(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
 		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
Index: branches/kBuild-0.1.5/kBuild/units/qt4.kmk
===================================================================
--- branches/kBuild-0.1.5/kBuild/units/qt4.kmk	(revision 2367)
+++ branches/kBuild-0.1.5/kBuild/units/qt4.kmk	(revision 2368)
@@ -957,4 +957,5 @@
  # Adding -F to CXXFLAGS is necessary to make #include <QtCore/qstring.h> stuff work...
  $(eval $(target)_CXXFLAGS += -F$(PATH_SDK_QT4_LIB) )
+ $(eval $(target)_OBJCXXFLAGS += -F$(PATH_SDK_QT4_LIB) )
  $(eval $(target)_LDFLAGS  += -F$(PATH_SDK_QT4_LIB) $(foreach module,$(qt_modules), -framework $(qt_prefix)Qt$(module)$(qt_infix)) )
  $(eval $(target)_INCS     += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module)$(qt_infix).framework/Versions/4/Headers) )
