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/hdmi_in_test/Android.mk b/hdmi_in_test/Android.mk
index 0530372..d016cb3 100644
--- a/hdmi_in_test/Android.mk
+++ b/hdmi_in_test/Android.mk
@@ -12,4 +12,10 @@
     liblog \
     libcutils
 
+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
+
 include $(BUILD_EXECUTABLE)