phosphor: Fix TARGET_*FLAGS variables

A few recipes were incorrectly passing -std=c++14 to CFLAGS or
CPPFLAGS, which was causing compile failure for pure C code.

Change-Id: I6a3f3cb8c53de95f2cf7631387b975b4ccd784ee
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/common/recipes-phosphor/host-ipmid/host-ipmid-fru.bb b/common/recipes-phosphor/host-ipmid/host-ipmid-fru.bb
index 171c126..6e5106f 100644
--- a/common/recipes-phosphor/host-ipmid/host-ipmid-fru.bb
+++ b/common/recipes-phosphor/host-ipmid/host-ipmid-fru.bb
@@ -14,7 +14,8 @@
 
 RDEPENDS_${PN} += "libsystemd"
 
-TARGET_CFLAGS += " -fpic -std=gnu++14"
+TARGET_CPPFLAGS += " -fpic -std=gnu++14"
+TARGET_CFLAGS += " -fpic"
 
 SRC_URI += "git://github.com/openbmc/ipmi-fru-parser"
 
diff --git a/common/recipes-phosphor/obmc-phosphor-event/obmc-phosphor-event.bb b/common/recipes-phosphor/obmc-phosphor-event/obmc-phosphor-event.bb
index 2ab7ce5..3be8e5d 100644
--- a/common/recipes-phosphor/obmc-phosphor-event/obmc-phosphor-event.bb
+++ b/common/recipes-phosphor/obmc-phosphor-event/obmc-phosphor-event.bb
@@ -9,7 +9,8 @@
 inherit obmc-phosphor-sdbus-service
 inherit obmc-phosphor-c-daemon
 
-TARGET_CPPFLAGS += "-std=c++11 -fpic"
+TARGET_CXXFLAGS += " -std=c++11 -fpic"
+TARGET_CFLAGS += " -fpic"
 
 SRC_URI += "git://github.com/openbmc/phosphor-event"
 SRC_URI += "file://eventd.conf"