audiohal: Update Makefile and Configure file
Update Makefile and Configure file to compile
target specific platform file.
Change-Id: Ic2e5c3f5cc5484d2acaacb9708595ee670d53c03
diff --git a/configure.ac b/configure.ac
index cbc082c..0db83d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,8 +56,26 @@
AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
-AM_CONDITIONAL([QAHW_SUPPORT], [test x$BOARD_SUPPORTS_QAHW = xtrue])
+AC_SUBST([TARGET_PLATFORM], ["msm8916"])
+if (test x$TARGET_SUPPORT = xapq8009); then
+ AC_SUBST([TARGET_PLATFORM], ["msm8916"])
+ TARGET_CFLAGS="-DPLATFORM_MSM8909"
+fi
+if (test x$TARGET_SUPPORT = xapq8053); then
+ AC_SUBST([TARGET_PLATFORM], ["msm8916"])
+ TARGET_CFLAGS="-DPLATFORM_MSM8916"
+fi
+if (test x$TARGET_SUPPORT = xapq8096); then
+ AC_SUBST([TARGET_PLATFORM], ["msm8974"])
+ TARGET_CFLAGS="-DPLATFORM_MSM8996"
+fi
+if (test x$TARGET_SUPPORT = xapq8098); then
+ AC_SUBST([TARGET_PLATFORM], ["msm8974"])
+ TARGET_CFLAGS="-DPLATFORM_MSM8998"
+fi
+AC_SUBST([TARGET_CFLAGS])
+AM_CONDITIONAL([QAHW_SUPPORT], [test x$BOARD_SUPPORTS_QAHW = xtrue])
AM_CONDITIONAL([HDMI_EDID], [test x$AUDIO_FEATURE_ENABLED_HDMI_EDID = xtrue])
AM_CONDITIONAL([FM_POWER_OPT], [test x$AUDIO_FEATURE_ENABLED_FM_POWER_OPT = xtrue])
AM_CONDITIONAL([USBAUDIO], [test x$AUDIO_FEATURE_ENABLED_USBAUDIO = xtrue])