audio: Add flags to makefiles

Enable GCOV if config is set to true. Also
add gcov_flush in source files to get enhanced
code coverage.

Change-Id: I39776cc6d6f16cd23da05b66669eea22fc4cba81
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
diff --git a/post_proc/Android.mk b/post_proc/Android.mk
index 9d58497..43132eb 100644
--- a/post_proc/Android.mk
+++ b/post_proc/Android.mk
@@ -43,6 +43,12 @@
     LOCAL_CFLAGS += -DINSTANCE_ID_ENABLED
 endif
 
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GCOV)),true)
+    LOCAL_CFLAGS += --coverage -fprofile-arcs -ftest-coverage
+    LOCAL_CPPFLAGS += --coverage -fprofile-arcs -ftest-coverage
+    LOCAL_STATIC_LIBRARIES += libprofile_rt
+endif
+
 LOCAL_CFLAGS+= -O2 -fvisibility=hidden
 
 ifneq ($(strip $(AUDIO_FEATURE_DISABLED_DTS_EAGLE)),true)