Index: pjproject/trunk/build/rules.mak
===================================================================
--- pjproject/trunk/build/rules.mak	(revision 4636)
+++ pjproject/trunk/build/rules.mak	(revision 4637)
@@ -143,5 +143,5 @@
 
 $(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cpp
-	$(CC) $($(APP)_CXXFLAGS) \
+	$(CXX) $($(APP)_CXXFLAGS) \
 		$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
 		$(subst /,$(HOST_PSEP),$<)
Index: pjproject/trunk/pjlib-util/build/Makefile
===================================================================
--- pjproject/trunk/pjlib-util/build/Makefile	(revision 4636)
+++ pjproject/trunk/pjlib-util/build/Makefile	(revision 4637)
@@ -35,4 +35,5 @@
 		stun_simple_client.o xml.o
 export PJLIB_UTIL_CFLAGS += $(_CFLAGS)
+export PJLIB_UTIL_CXXFLAGS += $(_CXXFLAGS)
 
 ###############################################################################
@@ -43,4 +44,5 @@
 		http_client.o
 export UTIL_TEST_CFLAGS += $(_CFLAGS)
+export UTIL_TEST_CXXFLAGS += $(_CXXFLAGS)
 export UTIL_TEST_LDFLAGS += $(_LDFLAGS)
 export UTIL_TEST_EXE:=../bin/pjlib-util-test-$(TARGET_NAME)$(HOST_EXE)
Index: pjproject/trunk/pjlib/build/Makefile
===================================================================
--- pjproject/trunk/pjlib/build/Makefile	(revision 4636)
+++ pjproject/trunk/pjlib/build/Makefile	(revision 4637)
@@ -31,4 +31,5 @@
 	string.o timer.o types.o
 export PJLIB_CFLAGS += $(_CFLAGS)
+export PJLIB_CXXFLAGS += $(_CXXFLAGS)
 
 ###############################################################################
@@ -45,4 +46,5 @@
 		    util.o
 export TEST_CFLAGS += $(_CFLAGS)
+export TEST_CXXFLAGS += $(_CXXFLAGS)
 export TEST_LDFLAGS += $(_LDFLAGS)
 export TEST_EXE := ../bin/pjlib-test-$(TARGET_NAME)$(HOST_EXE)
Index: pjproject/trunk/pjmedia/build/Makefile
===================================================================
--- pjproject/trunk/pjmedia/build/Makefile	(revision 4636)
+++ pjproject/trunk/pjmedia/build/Makefile	(revision 4637)
@@ -74,4 +74,5 @@
 
 export PJMEDIA_CFLAGS += $(_CFLAGS)
+export PJMEDIA_CXXFLAGS += $(_CXXFLAGS)
 
 
@@ -85,4 +86,5 @@
 				 android_jni_dev.o opensl_dev.o
 export PJMEDIA_AUDIODEV_CFLAGS += $(_CFLAGS)
+export PJMEDIA_AUDIODEV_CXXFLAGS += $(_CXXFLAGS)
 
 
@@ -94,4 +96,5 @@
 				colorbar_dev.o v4l2_dev.o
 export PJMEDIA_VIDEODEV_CFLAGS += $(_CFLAGS)
+export PJMEDIA_VIDEODEV_CXXFLAGS += $(_CXXFLAGS)
 
 
@@ -106,4 +109,5 @@
 			errno.o sdp.o sdp_cmp.o sdp_neg.o
 export PJSDP_CFLAGS += $(_CFLAGS)
+export PJSDP_CXXFLAGS += $(_CXXFLAGS)
 
 
@@ -119,4 +123,6 @@
 export PJMEDIA_CODEC_CFLAGS += $(_CFLAGS) $(GSM_CFLAGS) $(SPEEX_CFLAGS) \
 			$(ILBC_CFLAGS) $(IPP_CFLAGS) $(G7221_CFLAGS)
+export PJMEDIA_CODEC_CXXFLAGS += $(_CXXFLAGS) $(GSM_CFLAGS) $(SPEEX_CFLAGS) \
+			$(ILBC_CFLAGS) $(IPP_CFLAGS) $(G7221_CFLAGS)
 
 
@@ -130,4 +136,5 @@
 export PJMEDIA_TEST_OBJS += sdp_neg_test.o 
 export PJMEDIA_TEST_CFLAGS += $(_CFLAGS)
+export PJMEDIA_TEST_CXXFLAGS += $(_CXXFLAGS)
 export PJMEDIA_TEST_LDFLAGS += $(_LDFLAGS)
 export PJMEDIA_TEST_EXE:=../bin/pjmedia-test-$(TARGET_NAME)$(HOST_EXE)
Index: pjproject/trunk/pjnath/build/Makefile
===================================================================
--- pjproject/trunk/pjnath/build/Makefile	(revision 4636)
+++ pjproject/trunk/pjnath/build/Makefile	(revision 4637)
@@ -36,4 +36,5 @@
 		stun_transaction.o turn_session.o turn_sock.o
 export PJNATH_CFLAGS += $(_CFLAGS)
+export PJNATH_CXXFLAGS += $(_CXXFLAGS)
 
 ###############################################################################
@@ -44,4 +45,5 @@
 			    stun_sock_test.o turn_sock_test.o test.o
 export PJNATH_TEST_CFLAGS += $(_CFLAGS)
+export PJNATH_TEST_CXXFLAGS += $(_CXXFLAGS)
 export PJNATH_TEST_LDFLAGS += $(_LDFLAGS)
 export PJNATH_TEST_EXE:=../bin/pjnath-test-$(TARGET_NAME)$(HOST_EXE)
@@ -54,4 +56,5 @@
 export PJTURN_CLIENT_OBJS += client_main.o
 export PJTURN_CLIENT_CFLAGS += $(_CFLAGS)
+export PJTURN_CLIENT_CXXFLAGS += $(_CXXFLAGS)
 export PJTURN_CLIENT_LDFLAGS += $(_LDFLAGS)
 export PJTURN_CLIENT_EXE:=../bin/pjturn-client-$(TARGET_NAME)$(HOST_EXE)
@@ -64,4 +67,5 @@
 			  listener_tcp.o server.o main.o
 export PJTURN_SRV_CFLAGS += $(_CFLAGS)
+export PJTURN_SRV_CXXFLAGS += $(_CXXFLAGS)
 export PJTURN_SRV_LDFLAGS += $(_LDFLAGS)
 export PJTURN_SRV_EXE:=../bin/pjturn-srv-$(TARGET_NAME)$(HOST_EXE)
Index: pjproject/trunk/pjsip-apps/build/Makefile
===================================================================
--- pjproject/trunk/pjsip-apps/build/Makefile	(revision 4636)
+++ pjproject/trunk/pjsip-apps/build/Makefile	(revision 4637)
@@ -37,4 +37,5 @@
             pjsua_app_config.o pjsua_app_legacy.o
 export PJSUA_CFLAGS += $(_CFLAGS)
+export PJSUA_CXXFLAGS += $(_CXXFLAGS)
 export PJSUA_LDFLAGS += $(APP_LDFLAGS) $(APP_LDLIBS) $(LDFLAGS)
 export PJSUA_EXE:=../bin/pjsua-$(TARGET_NAME)$(HOST_EXE)
@@ -48,4 +49,5 @@
 			systest.o main_console.o
 export PJSYSTEST_CFLAGS += $(_CFLAGS)
+export PJSYSTEST_CXXFLAGS += $(_CXXFLAGS)
 export PJSYSTEST_LDFLAGS += $(APP_LDFLAGS) $(APP_LDLIBS) $(LDFLAGS)
 export PJSYSTEST_EXE:=../bin/pjsystest-$(TARGET_NAME)$(HOST_EXE)
Index: pjproject/trunk/pjsip/build/Makefile
===================================================================
--- pjproject/trunk/pjsip/build/Makefile	(revision 4636)
+++ pjproject/trunk/pjsip/build/Makefile	(revision 4637)
@@ -49,4 +49,5 @@
 		sip_dialog.o sip_ua_layer.o
 export PJSIP_CFLAGS += $(_CFLAGS)
+export PJSIP_CXXFLAGS += $(_CXXFLAGS)
 
 ###############################################################################
@@ -58,4 +59,5 @@
 			sip_100rel.o sip_timer.o
 export PJSIP_UA_CFLAGS += $(_CFLAGS)
+export PJSIP_UA_CXXFLAGS += $(_CXXFLAGS)
 
 
@@ -69,4 +71,5 @@
 			rpid.o xpidf.o
 export PJSIP_SIMPLE_CFLAGS += $(_CFLAGS)
+export PJSIP_SIMPLE_CXXFLAGS += $(_CXXFLAGS)
 
 
@@ -80,4 +83,5 @@
 			pjsua_dump.o pjsua_aud.o pjsua_vid.o
 export PJSUA_LIB_CFLAGS += $(_CFLAGS) $(PJ_VIDEO_CFLAGS)
+export PJSUA_LIB_CXXFLAGS += $(_CXXFLAGS) $(PJ_VIDEO_CFLAGS)
 
 
@@ -96,4 +100,5 @@
 		    inv_offer_answer_test.o
 export TEST_CFLAGS += $(_CFLAGS)
+export TEST_CXXFLAGS += $(_CXXFLAGS)
 export TEST_LDFLAGS += $(PJ_LDFLAGS) $(PJ_LDLIBS) $(LDFLAGS)
 export TEST_EXE := ../bin/pjsip-test-$(TARGET_NAME)$(HOST_EXE)
