Yamit Mehta | a0d653a | 2016-11-25 20:33:25 +0530 | [diff] [blame] | 1 | AM_CFLAGS = -I ${WORKSPACE}/external/tinyalsa/include \ |
| 2 | -I ${WORKSPACE}/system/media/audio_effects/include \ |
| 3 | -I ${WORKSPACE}/system/media/audio_utils/include \ |
| 4 | -I $(top_srcdir)/hal \ |
| 5 | -I $(top_srcdir)/hal/audio_extn \ |
| 6 | -I $(top_srcdir)/hal/voice_extn \ |
| 7 | -I $(top_srcdir)/hal/msm8916 |
| 8 | |
| 9 | c_sources = audio_hw.c \ |
| 10 | voice.c \ |
| 11 | platform_info.c \ |
| 12 | msm8916/platform.c \ |
| 13 | audio_extn/audio_extn.c \ |
| 14 | audio_extn/utils.c |
| 15 | |
| 16 | if HDMI_EDID |
| 17 | AM_CFLAGS += -DHDMI_EDID |
| 18 | c_sources += edid.c |
| 19 | endif |
| 20 | |
| 21 | if FM_POWER_OPT |
| 22 | AM_CFLAGS += -DFM_POWER_OPT |
| 23 | c_sources += audio_extn/fm.c |
| 24 | endif |
| 25 | |
| 26 | if USBAUDIO |
| 27 | AM_CFLAGS += -DUSB_HEADSET_ENABLED |
| 28 | c_sources += audio_extn/usb.c |
| 29 | endif |
| 30 | |
| 31 | if HFP |
| 32 | AM_CFLAGS += -DHFP_ENABLED |
| 33 | c_sources += audio_extn/hfp.c |
| 34 | endif |
| 35 | |
| 36 | if SSR |
| 37 | AM_CFLAGS += -DSSR_ENABLED |
| 38 | c_sources += audio_extn/ssr.c |
| 39 | AM_CFLAGS += -I ${WORKSPACE}/audio/mm-audio-noship/surround_sound_3mic/libsurround_3mic_proc/surround_rec_interface/inc/ |
| 40 | endif |
| 41 | |
| 42 | if MULTI_VOICE_SESSIONS |
| 43 | AM_CFLAGS += -DMULTI_VOICE_SESSION_ENABLED |
| 44 | c_sources += voice_extn/voice_extn.c |
| 45 | endif |
| 46 | |
| 47 | if COMPRESS_VOIP |
| 48 | AM_CFLAGS += -DCOMPRESS_VOIP_ENABLED |
| 49 | c_sources += voice_extn/compress_voip.c |
| 50 | endif |
| 51 | |
| 52 | if SPKR_PROTECTION |
| 53 | AM_CFLAGS += -DSPKR_PROT_ENABLED |
| 54 | c_sources += audio_extn/spkr_protection.c |
| 55 | endif |
| 56 | |
| 57 | if HW_VARIANTS |
| 58 | AM_CFLAGS += -DHW_VARIANTS_ENABLED |
| 59 | c_sources += msm8916/hw_info.c |
| 60 | endif |
| 61 | |
| 62 | if COMPRESS_CAPTURE |
| 63 | AM_CFLAGS += -DCOMPRESS_CAPTURE_ENABLED |
| 64 | c_sources += audio_extn/compress_capture.c |
| 65 | endif |
| 66 | |
| 67 | if DTS_EAGLE |
| 68 | AM_CFLAGS += -DDTS_EAGLE |
| 69 | c_sources += audio_extn/dts_eagle.c |
| 70 | endif |
| 71 | |
| 72 | if DOLBY_DDP |
| 73 | AM_CFLAGS += -DDS1_DOLBY_DDP_ENABLED |
| 74 | c_sources += audio_extn/dolby.c |
| 75 | endif |
| 76 | |
| 77 | if DS1_DOLBY_DAP |
| 78 | AM_CFLAGS += -DDS1_DOLBY_DAP_ENABLED |
| 79 | if DOLBY_DDP |
| 80 | c_sources += audio_extn/dolby.c |
| 81 | endif |
| 82 | endif |
| 83 | |
| 84 | if DEV_ARBI |
| 85 | AM_CFLAGS += -DDEV_ARBI_ENABLED |
| 86 | c_sources += audio_extn/dev_arbi.c |
| 87 | endif |
| 88 | |
| 89 | if SOURCE_TRACKING |
| 90 | AM_CFLAGS += -DSOURCE_TRACKING_ENABLED |
| 91 | c_sources += audio_extn/source_track.c |
| 92 | endif |
| 93 | |
| 94 | if LISTEN |
| 95 | AM_CFLAGS += -DAUDIO_LISTEN_ENABLED |
| 96 | AM_CFLAGS += -I ${WORKSPACE}/audio/mm-audio-noship/audio-listen |
| 97 | c_sources += audio_extn/listen.c |
| 98 | endif |
| 99 | |
| 100 | if SOUND_TRIGGER |
| 101 | AM_CFLAGS += -DSOUND_TRIGGER_ENABLED |
| 102 | AM_CFLAGS += -I ${WORKSPACE}/audio/mm-audio/sound_trigger/ |
| 103 | c_sources += audio_extn/soundtrigger.c |
| 104 | endif |
| 105 | |
| 106 | h_sources = audio_extn/audio_defs.h \ |
| 107 | audio_extn/audio_extn.h \ |
| 108 | audio_hw.h \ |
| 109 | voice.h |
| 110 | |
| 111 | library_include_HEADERS = $(h_sources) |
| 112 | library_includedir = $(includedir) |
| 113 | |
| 114 | lib_LTLIBRARIES = audio_primary_default.la |
| 115 | audio_primary_default_la_SOURCES = $(c_sources) |
| 116 | audio_primary_default_la_LIBADD = $(GLIB_LIBS) -llog -lcutils -ltinyalsa |
| 117 | audio_primary_default_la_LIBADD += -ltinycompress -laudioroute -ldl -lexpat -laudioutils |
| 118 | audio_primary_default_la_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS) |
| 119 | audio_primary_default_la_CFLAGS += -Dstrlcat=g_strlcat |
| 120 | audio_primary_default_la_CFLAGS += -DINT_MAX=0x7fffffff |
| 121 | audio_primary_default_la_CFLAGS += -D__unused=__attribute__\(\(__unused__\)\) |
| 122 | audio_primary_default_la_CFLAGS += -DLINUX_ENABLED |
| 123 | audio_primary_default_la_LDFLAGS = -module -shared -avoid-version |