audio.mak 25.7 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664
# Define source file folder to SRC_LIST
ifeq ($(strip $(DSP_SOLUTION)),DUALMACDSP)
   AUDFOLDER         =  hal\audio\src\v2
   AUD_SOLUTION      =  V2
else   
   ifneq ($(strip $(SMART_PHONE_CORE)),NONE)
      AUDFOLDER         =  hal\audio\src\v1\sp
      AUD_SOLUTION      =  V1_SP
   else 
      AUDFOLDER         =  hal\audio\src\v1
      AUD_SOLUTION      =  V1
   endif
endif


# Start Define source file lists to SRC_LIST
# Common part in v1, v2 and v1SP
SRC_LIST = $(strip $(AUDFOLDER))\am.c \
           $(strip $(AUDFOLDER))\sp_drv.c \
           $(strip $(AUDFOLDER))\tone_drv.c \
           $(strip $(AUDFOLDER))\tone_debug.c \
           $(strip $(AUDFOLDER))\dtmf_drv.c \
           $(strip $(AUDFOLDER))\media.c \
           $(strip $(AUDFOLDER))\l1audio_trace.c \
           $(strip $(AUDFOLDER))\pcm4way.c \
           $(strip $(AUDFOLDER))\audio_service.c \
           $(strip $(AUDFOLDER))\wav_codec.c \
           $(strip $(AUDFOLDER))\wav.c \
           $(strip $(AUDFOLDER))\dpmgr.c \
           $(strip $(AUDFOLDER))\l1audio_sph_srv.c \
           interface\hal\audio\audio_create.c

ifneq ($(filter __MCU_DTMF_SUPPORT__, $(strip $(MODULE_DEFS))),)
   SRC_LIST +=  $(strip $(AUDFOLDER))\PcmMixer.c
endif

ifneq ($(filter __AUDIO_RECORD_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
   ifneq ($(filter WAV_CODEC, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\pcm_comp_rec.c
      SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\wav_comp_rec.c
   endif
   ifneq ($(filter AMR_CODEC, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\amr_comp_rec.c
   endif
   ifneq ($(filter __VORBIS_ENCODE__, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\vorbis_comp_rec.c
   endif
   ifneq ($(filter __VM_CODEC_SUPPORT__, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\vm_comp_rec.c
   endif
endif

AFE_SPLIT_DRIVER_PLATFORM  = MT6251 MT6255 MT6256 MT6250 MT6922 MT6260 MT6261 MT2501 MT2502
ifneq ($(filter $(strip $(MODULE_DEFS)), $(AFE_SPLIT_DRIVER_PLATFORM)),)
   SRC_LIST +=  $(strip $(AUDFOLDER))\afe_common.c
   ifeq ($(strip $(PLATFORM)),MT6260)
     SRC_LIST += $(strip $(AUDFOLDER))\afes\afe_6260.c
   endif
   ifeq ($(strip $(PLATFORM)),MT6250)
     SRC_LIST += $(strip $(AUDFOLDER))\afes\afe_6250.c
   endif
   ifeq ($(strip $(PLATFORM)),MT6255)
     SRC_LIST += $(strip $(AUDFOLDER))\afes\afe_6255.c
   endif
   ifeq ($(strip $(PLATFORM)),MT6922)
     SRC_LIST += $(strip $(AUDFOLDER))\afes\afe_6255.c
   endif
   ifeq ($(strip $(PLATFORM)),MT6256)
     SRC_LIST += $(strip $(AUDFOLDER))\afes\afe_6256.c
   endif
   ifeq ($(strip $(PLATFORM)),MT6261)
     SRC_LIST += $(strip $(AUDFOLDER))\afes\afe_6261.c
   endif
   ifeq ($(strip $(PLATFORM)),MT2501)
     SRC_LIST += $(strip $(AUDFOLDER))\afes\afe_6261.c
   endif
   ifeq ($(strip $(PLATFORM)),MT2502)
     SRC_LIST += $(strip $(AUDFOLDER))\afes\afe_6261.c
   endif
else
   SRC_LIST +=  $(strip $(AUDFOLDER))\afe2.c
endif
 


ifneq ($(filter __VM_CODEC_SUPPORT__, $(strip $(MODULE_DEFS))),)
   SRC_LIST +=  $(strip $(AUDFOLDER))\vm.c
endif

ifneq ($(filter __KARAOKE_SUPPORT__, $(strip $(MODULE_DEFS))),)
   SRC_LIST +=  $(strip $(AUDFOLDER))\karaoke_drv.c
   SRC_LIST +=  $(strip $(AUDFOLDER))\remix.c
endif

ifneq ($(filter __CVSD_CODEC_SUPPORT__, $(strip $(MODULE_DEFS))),)
   SRC_LIST +=  $(strip $(AUDFOLDER))\bt_sco_drv.c
   SRC_LIST +=  $(strip $(AUDFOLDER))\bt_sco_app.c
endif

# Common part in V1_SP
ifeq ($(strip $(AUD_SOLUTION)),V1_SP)
   SRC_LIST += $(strip $(AUDFOLDER))\vm_strm_drv.c \
               $(strip $(AUDFOLDER))\bgsnd_drv.c \
               $(strip $(AUDFOLDER))\sp_enhance.c \
               $(strip $(AUDFOLDER))\wav_thumb.c
else
# Common part in V1 and V2
   SRC_LIST += $(strip $(AUDFOLDER))\audioPP.c \
               $(strip $(AUDFOLDER))\tone_loopback_rec.c \
               $(strip $(AUDFOLDER))\audioCF.c

ifneq ($(filter __VM_CODEC_SUPPORT__, $(strip $(MODULE_DEFS))),)
   SRC_LIST +=  $(strip $(AUDFOLDER))\vm_drv.c
endif

ifneq ($(filter __SPECTRUM_DISPLAY_SUPPORT__, $(strip $(MODULE_DEFS))),)
   SRC_LIST +=  $(strip $(AUDFOLDER))\spt_analyzer.c
endif

ifneq ($(filter __VIBRATION_SPEAKER_SUPPORT__, $(strip $(MODULE_DEFS))),)
   SRC_LIST +=  $(strip $(AUDFOLDER))\vibration_drv.c
   SRC_LIST +=  $(strip $(AUDFOLDER))\vibration_rom.c
endif

   ifeq ($(strip $(AUD_SOLUTION)),V1)
      SRC_LIST += $(strip $(AUDFOLDER))\audio_idma.c \
                  $(strip $(AUDFOLDER))\spe_custom_drv.c \
                  $(strip $(AUDFOLDER))\sp_enhance.c

      ifneq ($(filter __DRA_DECODE_SUPPORT__, $(strip $(MODULE_DEFS))),)
        ifeq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
           SRC_LIST += $(strip $(AUDFOLDER))\dra_drv.c
        endif
      endif
      
      ifneq ($(filter __DUAL_TALK_MODEM_SUPPORT__, $(strip $(MODULE_DEFS))),)
        SRC_LIST += $(strip $(AUDFOLDER))\spc_drv.c
        SRC_LIST += $(strip $(AUDFOLDER))\pcm_rec.c
        SRC_LIST += $(strip $(AUDFOLDER))\audl_service.c
        SRC_LIST += $(strip $(AUDFOLDER))\sp_strm_drv.c
      endif      
      
   endif
   
   ifeq ($(strip $(AUD_SOLUTION)),V2)
      ifneq ($(strip $(SMART_PHONE_CORE)),NONE)
         SRC_LIST += $(strip $(AUDFOLDER))\audl_service.c \
                     $(strip $(AUDFOLDER))\spc_drv.c
      endif
      SRC_LIST += $(strip $(AUDFOLDER))\ut_acoustic_loopback.c
      ifneq ($(filter DSP_WT_SYN, $(strip $(MODULE_DEFS))),)
         SRC_LIST += $(strip $(AUDFOLDER))\Wavetable_SW.c
      endif
      ifneq ($(filter __DATA_CARD_SPEECH__, $(strip $(MODULE_DEFS))),)
         SRC_LIST += $(strip $(AUDFOLDER))\audl_service.c \
                     $(strip $(AUDFOLDER))\sp_strm_drv.c
      endif
   endif
   ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\Wavetable_SW.c
   endif
endif

ifneq ($(filter __UMTS_RAT__, $(strip $(MODULE_DEFS))),)
   SRC_LIST += $(strip $(AUDFOLDER))\amr_table.c \
               $(strip $(AUDFOLDER))\sp_3g.c
else
  ifneq ($(filter __UMTS_TDD128_MODE__, $(strip $(MODULE_DEFS))),)
    SRC_LIST += $(strip $(AUDFOLDER))\amr_table.c \
                $(strip $(AUDFOLDER))\sp_3g.c
  endif
endif

ifneq ($(filter BGSND_ENABLE, $(strip $(MODULE_DEFS))),)
  SRC_LIST += $(strip $(AUDFOLDER))\snd_effect.c
endif
ifneq ($(filter WAV_CODEC, $(strip $(MODULE_DEFS))),)
  SRC_LIST += $(strip $(AUDFOLDER))\wav_thumb.c
  SRC_LIST += $(strip $(AUDFOLDER))\pcm_strm_drv.c
  WAV_DRIVER_NOT_SUPPORT_PLATFORM = MT6516 MT6573
  ifeq ($(filter $(strip $(MODULE_DEFS)) ,$(WAV_DRIVER_NOT_SUPPORT_PLATFORM)),)
    ifeq ($(strip $(AUD_SOLUTION)),V2)
       SRC_LIST += $(strip $(AUDFOLDER))\wav_drv.c
    else
       ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
          SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\wav_comp_drv.c
       else
          SRC_LIST += $(strip $(AUDFOLDER))\wav_drv.c
       endif
    endif     
  endif
  ifneq ($(strip $(AUD_SOLUTION)),V2)
    SRC_LIST += $(strip $(AUDFOLDER))\pcm.c
  endif
endif

ifneq ($(filter __CTM_SUPPORT__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\ctm_drv.c
endif

ifneq ($(filter __ECALL_SUPPORT__, $(strip $(MODULE_DEFS))),)
  SRC_LIST += $(strip $(AUDFOLDER))\eCall_drv.c
endif

ifeq ($(strip $(SMART_PHONE_CORE)),NONE)
   ifneq ($(filter AAC_DECODE, $(strip $(MODULE_DEFS))),)
     ifeq ($(strip $(AUD_SOLUTION)),V2)
       SRC_LIST += $(strip $(AUDFOLDER))\aac_drv.c
     else
       ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
          SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\aac_comp_drv.c
       else
          SRC_LIST += $(strip $(AUDFOLDER))\aac_drv.c
       endif
     endif
   endif
   ifneq ($(filter AAC_PLUS_DECODE, $(strip $(MODULE_DEFS))),)
     ifeq ($(strip $(AUD_SOLUTION)),V1)
       SRC_LIST += $(strip $(AUDFOLDER))\aac_huffman_table.c
     endif
   endif
   ifneq ($(filter AMR_CODEC, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\amr.c \
                 $(strip $(AUDFOLDER))\amr_table.c
     ifeq ($(strip $(AUD_SOLUTION)),V2)
       SRC_LIST += $(strip $(AUDFOLDER))\amr_drv.c
     else
       ifneq ($(strip $(MED_PROFILE)),MED_MODEM)
          ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
             SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\amr_comp_drv.c
          else
             SRC_LIST += $(strip $(AUDFOLDER))\amr_drv.c
          endif
       endif
     endif
     ifneq ($(filter DEDI_AMR_REC, $(strip $(MODULE_DEFS))),)
       ifeq ($(strip $(AUD_SOLUTION)),V1)
           SRC_LIST += $(strip $(AUDFOLDER))\amr_dedi.c
       endif
     endif
   endif
   ifneq ($(filter AMRWB_ENCODE, $(strip $(MODULE_DEFS))),)
     AWB_SW_ENC_SUPPORT_PLATFORM = MT6255 MT6922
     ifneq ($(filter $(strip $(MODULE_DEFS)), $(AWB_SW_ENC_SUPPORT_PLATFORM)),)
       SRC_LIST += $(strip $(AUDFOLDER))\awb_enc.c
     endif
   endif
   ifneq ($(filter __APE_DECODE__, $(strip $(MODULE_DEFS))),)
     ifeq ($(strip $(AUD_SOLUTION)),V2)
       SRC_LIST += $(strip $(AUDFOLDER))\ape_drv.c
     else
       ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
          SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\ape_comp_drv.c
       else
          SRC_LIST += $(strip $(AUDFOLDER))\ape_drv.c
       endif
     endif
   endif
   
   ifneq ($(filter SBC_DECODE, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\a2dp_comp_drv.c
      SRC_LIST += hal\audio\src\common\src\A2dpParser.c
      SRC_LIST += hal\audio\src\common\src\SbcDecoder.c
   endif      
   
   ifneq ($(filter __VORBIS_DECODE__, $(strip $(MODULE_DEFS))),)
     ifeq ($(strip $(AUD_SOLUTION)),V2)
       SRC_LIST += $(strip $(AUDFOLDER))\vorbis_drv.c
       SRC_LIST += $(strip $(AUDFOLDER))\vorbis_strm_drv.c
     else
       ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
          SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\vorbis_comp_drv.c
          SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\vorbis_strm_comp_drv.c
       else
          SRC_LIST += $(strip $(AUDFOLDER))\vorbis_drv.c
          SRC_LIST += $(strip $(AUDFOLDER))\vorbis_strm_drv.c
       endif
     endif
   endif
   ifneq ($(filter __VORBIS_ENCODE__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\vorbis_enc_drv.c
   endif
   ifneq ($(filter __AUDIO_DSP_LOWPOWER_V2__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\audlp2_drv.c
   endif
   ifneq ($(filter __ENABLE_AUDIO_DVT__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\audio_DVT.c
   endif
   ifneq ($(filter __BT_AUDIO_VIA_SCO__, $(strip $(MODULE_DEFS))),)
     ifeq ($(strip $(AUD_SOLUTION)),V1)
       SRC_LIST += $(strip $(AUDFOLDER))\avb_drv.c
     endif
   endif
   ifneq ($(filter __COOK_DECODE__, $(strip $(MODULE_DEFS))),)
     ifeq ($(filter __COOK_DECODE_DSP__, $(strip $(MODULE_DEFS))),)     
        ifeq ($(strip $(AUD_SOLUTION)),V2)
          SRC_LIST += $(strip $(AUDFOLDER))\cook_drv.c
        else
          ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
             SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\cook_comp_drv.c
          else
             SRC_LIST += $(strip $(AUDFOLDER))\cook_drv.c
          endif
        endif
     endif
   endif
   ifneq ($(filter __COOK_DECODE__, $(strip $(MODULE_DEFS))),)
     ifneq ($(filter __COOK_DECODE_DSP__, $(strip $(MODULE_DEFS))),)
       SRC_LIST += $(strip $(AUDFOLDER))\ra_drv.c
     endif
   endif
   ifneq ($(filter DAF_DECODE, $(strip $(MODULE_DEFS))),)
     ifeq ($(strip $(AUD_SOLUTION)),V2)
       SRC_LIST += $(strip $(AUDFOLDER))\daf_drv.c
     else
       ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
          SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\daf_comp_drv.c
       else
          SRC_LIST += $(strip $(AUDFOLDER))\daf_drv.c
       endif
     endif
   endif
   ifneq ($(filter __FLAC_DECODE__ , $(strip $(MODULE_DEFS))),)
       ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
          SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\flac_comp_drv.c
       endif
   endif
   ifneq ($(filter __BES_EQ_SUPPORT__, $(strip $(MODULE_DEFS))),)
     ifeq ($(strip $(AUD_SOLUTION)),V1)
       SRC_LIST += $(strip $(AUDFOLDER))\eq_table.c
     endif
   endif
   ifneq ($(filter __I2S_INPUT_MODE_SUPPORT__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\i2s_drv.c
   endif
   ifneq ($(filter CYBERON_DIC_TTS, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\tts_drv.c
   else
     ifneq ($(filter IFLY_TTS, $(strip $(MODULE_DEFS))),)
       SRC_LIST += $(strip $(AUDFOLDER))\tts_drv.c
       endif
   endif
   ifneq ($(filter SINOVOICE_TTS, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\tts_drv.c
   endif   
   ifneq ($(filter __BT_A2DP_PROFILE__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\sbc_drv.c
     ifeq ($(filter __LOW_COST_SUPPORT_COMMON__, $(strip $(MODULE_DEFS))),)
       SRC_LIST += $(strip $(AUDFOLDER))\daf_rtpss.c
     endif
   endif
   ifneq ($(filter UT_2WAYWB_RECORD_SUPPORT, $(strip $(MODULE_DEFS))),)
     ifneq ($(filter __UTIL_CLI_SUPPORT__, $(strip $(MODULE_DEFS))),)
       SRC_LIST += $(strip $(AUDFOLDER))\ut_2waywb_record.c
     endif
   endif
   ifneq ($(filter __ACOUSTIC_LOOPBACK_SUPPORT__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\ut_acoustic_loopback.c
   endif
   ifneq ($(filter __UTIL_CLI_SUPPORT__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\util_cli_input.c \
                 $(strip $(AUDFOLDER))\util_cli_parser.c \
                 $(strip $(AUDFOLDER))\util_cli_task.c \
                 $(strip $(AUDFOLDER))\util_aud_cmd.c
   endif
   ifneq ($(filter __LG_VOICE_ENGINE__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\voice_clarity.c
   endif
   ifneq ($(filter VRSI_CYBERON, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\vr_si.c
   endif
   ifneq ($(filter WMA_DECODE, $(strip $(MODULE_DEFS))),)
     ifeq ($(strip $(AUD_SOLUTION)),V2)
       SRC_LIST += $(strip $(AUDFOLDER))\wma_drv.c
     else
       ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
          SRC_LIST += $(strip $(AUDFOLDER))\cmpdrv\wma_comp_drv.c
       else
          SRC_LIST += $(strip $(AUDFOLDER))\wma_drv.c
       endif
     endif
   endif
   ifneq ($(filter __DAF_ENCODE__, $(strip $(MODULE_DEFS))),)
     SRC_LIST +=  $(strip $(AUDFOLDER))\mp3_enc_drv.c
   endif
   ifneq ($(filter __BT_SUPPORT__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\BT_PcmLoopback.c
     ifneq ($(filter BT_Loopback_Test, $(strip $(COMP_DEFS))),)
       SRC_LIST += $(strip $(AUDFOLDER))\BT_loopback.c
     endif   
   endif
   ifneq ($(filter DSP_WT_SYN, $(strip $(MODULE_DEFS))),)
     ifeq ($(strip $(AUD_SOLUTION)),V1)
        DSP_WT_SYN_V1_SUPPORT_PLATFORM = MT6219 MT6223 MT6225 MT6229 MT6253T MT6253 MT6268A MT6268T MT6268H MT6223P
        ifneq ($(filter $(strip $(MODULE_DEFS)) ,$(DSP_WT_SYN_V1_SUPPORT_PLATFORM)),)
           SRC_LIST += $(strip $(AUDFOLDER))\Wavetable_DSPv1.c
        else
           ifeq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
           SRC_LIST += $(strip $(AUDFOLDER))\Wavetable_DSPv2.c
           endif
        endif
     endif
   endif
   ifneq ($(filter STREAM_SUPPORT, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\poc_amr.c
   else
     ifneq ($(filter __VOIP__, $(strip $(MODULE_DEFS))),)
       SRC_LIST += $(strip $(AUDFOLDER))\poc_amr.c
       endif
   endif
   ifneq ($(filter __VOIP__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\PCMRB.c
   endif
endif           

SRC_LIST += $(strip $(AUDFOLDER))\comp\daf_seek.c \
            $(strip $(AUDFOLDER))\comp\ast.c \
            $(strip $(AUDFOLDER))\comp\audioeq.c \
            $(strip $(AUDFOLDER))\comp\kt_Detect.c \
            $(strip $(AUDFOLDER))\comp\media_avsync.c \
            $(strip $(AUDFOLDER))\comp\tonedect.c \
            $(strip $(AUDFOLDER))\comp\tonesyn.c

ifneq ($(filter __AUDIO_RECORD_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
   SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\PcmSource.c
   SRC_LIST += hal\audio\src\common\src\PcmPacker.c
   SRC_LIST += hal\audio\src\common\src\SRConv.c
   
   ifneq ($(filter WAV_CODEC, $(strip $(MODULE_DEFS))),)
      SRC_LIST += hal\audio\src\common\src\WavEncoder.c
   endif
   ifeq ($(strip $(AUD_SOLUTION)),V1)
      ifneq ($(filter AMR_CODEC, $(strip $(MODULE_DEFS))),)
         SRC_LIST += hal\audio\src\v1\comp\PBMG\AmrDspEncoder.c
      endif
      ifneq ($(filter __VM_CODEC_SUPPORT__, $(strip $(MODULE_DEFS))),)
         SRC_LIST += hal\audio\src\v1\comp\PBMG\VmDspEncoder.c
      endif
   endif
   ifneq ($(filter DEDI_AMR_REC, $(strip $(MODULE_DEFS))),)
      SRC_LIST += hal\audio\src\common\src\AmrEncoder.c
   endif
   ifneq ($(filter __VORBIS_ENCODE__, $(strip $(MODULE_DEFS))),)
      SRC_LIST += hal\audio\src\common\src\VorbisEncoder.c
   endif
   ifneq ($(filter __SPEECH_ENHENCEMENT_SWIP_SUPPORT__, $(strip $(MODULE_DEFS))),)
      SRC_LIST += hal\audio\src\common\src\SphEnhance.c
   endif
endif

ifeq ($(strip $(AUD_SOLUTION)),V2)
  SRC_LIST += $(strip $(AUDFOLDER))\comp\apm.c
else
  ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += hal\audio\src\common\src\apm_comp.c
  else
     SRC_LIST += $(strip $(AUDFOLDER))\comp\apm.c
  endif
endif

ifeq ($(strip $(AUD_SOLUTION)),V2)
   SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\AudComUtil.c
   ifneq ($(strip $(MED_PROFILE)),MED_MODEM)
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\AudioDrain.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\MedAdapt.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\PcmRouteSrc.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\PcmSink.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\SeekEngine.c
   endif
   ifneq ($(filter AMR_CODEC, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\AmrDecoder.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\AmrParser.c
   endif
   ifneq ($(filter AAC_DECODE, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\AacDecoder.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\AacParser.c
   endif
   SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\M4aParser.c
   ifneq ($(filter DAF_DECODE, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\DafParser.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\DafDecoder.c
   endif
   ifneq ($(filter __DRA_DECODE_SUPPORT__, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\DraDecoder.c
   endif
   ifneq ($(filter WAV_CODEC, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\WavDecoder.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\WavParser.c
   endif
   ifneq ($(filter __COOK_DECODE__, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\CookDecoder.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\CookParser.c
   endif
   ifneq ($(filter __APE_DECODE__, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\ApeDecoder.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\ApeParser.c
   endif
   ifneq ($(filter __VORBIS_DECODE__, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\VorbisStrmDecoder.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\VorbisDecoder.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\VorbisParser.c
   endif
   ifneq ($(filter __BES_TS_SUPPORT__, $(strip $(MODULE_DEFS))),)
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\BesSoundTemplate.c
      SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\BesTSEntry.c
   endif
   
   ifneq ($(filter DSP_WT_SYN, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\comp\melody_common.c
     SRC_LIST += $(strip $(AUDFOLDER))\comp\jimy.c
     SRC_LIST += $(strip $(AUDFOLDER))\comp\jsmf.c
     SRC_LIST += $(strip $(AUDFOLDER))\comp\jtone.c
     SRC_LIST += $(strip $(AUDFOLDER))\comp\jwav.c
     SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\MelodySynthesizer.c
     SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\MelodyParser.c
   endif
else
   SRC_LIST += $(strip $(AUDFOLDER))\comp\aac_sbr.c \
               $(strip $(AUDFOLDER))\comp\aac_seek.c \
               $(strip $(AUDFOLDER))\comp\amr_seek.c \
               $(strip $(AUDFOLDER))\comp\jamr.c
               
  ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += hal\audio\src\common\src\AudComUtil.c
     ifneq ($(strip $(MED_PROFILE)),MED_MODEM)
        SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\PcmSink.c
        SRC_LIST += hal\audio\src\common\src\AudioDrain.c
        SRC_LIST += hal\audio\src\common\src\MedAdapt.c
        SRC_LIST += hal\audio\src\common\src\PcmRouteSrc.c
        SRC_LIST += hal\audio\src\common\src\pcmRouteService.c
        SRC_LIST += hal\audio\src\common\src\SeekEngine.c
     endif
     ifneq ($(filter WMA_DECODE, $(strip $(MODULE_DEFS))),)
      SRC_LIST += hal\audio\src\common\src\WmaDecoder.c
      SRC_LIST += hal\audio\src\common\src\WmaParser.c
     endif
     ifneq ($(filter __VORBIS_DECODE__, $(strip $(MODULE_DEFS))),)
       SRC_LIST += hal\audio\src\common\src\VorbisStrmDecoder.c
       SRC_LIST += hal\audio\src\common\src\VorbisParser.c
       SRC_LIST += hal\audio\src\common\src\VorbisDecoder.c
     endif     
     ifneq ($(filter DAF_DECODE, $(strip $(MODULE_DEFS))),)
       SRC_LIST += hal\audio\src\common\src\DafParser.c
       SRC_LIST += hal\audio\src\common\src\DafDecoder.c
     endif
     ifneq ($(filter __FLAC_DECODE__, $(strip $(MODULE_DEFS))),)
       SRC_LIST += hal\audio\src\common\src\FlacParser.c
       SRC_LIST += hal\audio\src\common\src\FlacDecoder.c
     endif  
     ifneq ($(filter AAC_DECODE, $(strip $(MODULE_DEFS))),)
        ifeq ($(filter __KARAOKE_SUPPORT__, $(strip $(MODULE_DEFS))),)    
          SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\AacDspDecoder.c  
        else
          SRC_LIST += hal\audio\src\common\src\AacDecoder.c
        endif         
        SRC_LIST += hal\audio\src\common\src\AacParser.c
     endif
     SRC_LIST += hal\audio\src\common\src\M4aParser.c
     ifneq ($(filter __DRA_DECODE_SUPPORT__, $(strip $(MODULE_DEFS))),)
       SRC_LIST += hal\audio\src\common\src\DraDecoder.c
     endif
     ifneq ($(filter WAV_CODEC, $(strip $(MODULE_DEFS))),)
       SRC_LIST += hal\audio\src\common\src\WavDecoder.c
       SRC_LIST += hal\audio\src\common\src\WavParser.c
     endif
     ifneq ($(filter AMR_CODEC, $(strip $(MODULE_DEFS))),)
       ifneq ($(strip $(MED_PROFILE)),MED_MODEM)
          SRC_LIST += hal\audio\src\common\src\AmrParser.c
          SRC_LIST += $(strip $(AUDFOLDER))\comp\PBMG\AmrDspDecoder.c
       endif   
     endif    
     ifneq ($(filter __COOK_DECODE__, $(strip $(MODULE_DEFS))),)
       SRC_LIST += hal\audio\src\common\src\CookDecoder.c
       SRC_LIST += hal\audio\src\common\src\CookParser.c
     endif
     ifneq ($(filter __APE_DECODE__, $(strip $(MODULE_DEFS))),)
       SRC_LIST += hal\audio\src\common\src\ApeDecoder.c
       SRC_LIST += hal\audio\src\common\src\ApeParser.c
     endif
     ifneq ($(filter __BES_TS_SUPPORT__, $(strip $(MODULE_DEFS))),)
       SRC_LIST += hal\audio\src\common\src\BesSoundTemplate.c
       SRC_LIST += hal\audio\src\common\src\BesTSEntry.c
     endif     
  endif
  
  
  ifneq ($(filter DSP_WT_SYN, $(strip $(MODULE_DEFS))),)    
     ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
        SRC_LIST += hal\audio\src\common\src\melody\jimy_comp.c
        SRC_LIST += hal\audio\src\common\src\melody\jsmf_comp.c
        SRC_LIST += hal\audio\src\common\src\melody\jtone_comp.c
        SRC_LIST += hal\audio\src\common\src\melody\jwav_comp.c
        SRC_LIST += hal\audio\src\common\src\melody\melody_common.c
        SRC_LIST += hal\audio\src\common\src\melody\MelodySynthesizer.c
        SRC_LIST += hal\audio\src\common\src\melody\MelodyParser.c
     else
        SRC_LIST += $(strip $(AUDFOLDER))\comp\dspsyn.c
        SRC_LIST += $(strip $(AUDFOLDER))\comp\jimy.c
        SRC_LIST += $(strip $(AUDFOLDER))\comp\jsmf.c
        SRC_LIST += $(strip $(AUDFOLDER))\comp\jtone.c
        SRC_LIST += $(strip $(AUDFOLDER))\comp\jwav.c
     endif
  endif
endif

ifneq ($(filter __VOIP__, $(strip $(MODULE_DEFS))),)
     SRC_LIST += $(strip $(AUDFOLDER))\comp\VoRTP\VoRTP.c \
                 $(strip $(AUDFOLDER))\comp\RTPBuffer.c \
                 $(strip $(AUDFOLDER))\comp\RTPCodec.c \
                 $(strip $(AUDFOLDER))\comp\G711_main.c \
                 $(strip $(AUDFOLDER))\comp\G726_main.c \
                 $(strip $(AUDFOLDER))\comp\VoIPev_drv.c \
                 $(strip $(AUDFOLDER))\comp\vmi.c
endif

#  Define include path lists to INC_DIR
INC_DIR = $(strip $(AUDFOLDER)) \
          $(strip $(AUDFOLDER))\inc \
          $(strip $(AUDFOLDER))\comp \
          $(strip $(AUDFOLDER))\comp\VoRTP \
          hal\audio\lib\MTKINC \
          hal\audio\lib\VENDOR\tc01 \
          interface\hal\audio \
          interface\hal\video \
          interface\hal\system \
          hal\dsp_ram \
          hal\dp_engine\ctm \
          hal\dp_engine \
          $(strip $(PS_FOLDER))\l4\include \
          hal\audio\src32_inc \
          drv\include \
          hal\video\demuxer\mp4_parser\inc \
          hal\system\init\inc \
          l1_dm\l1d_ext \
          hal\system\DP\inc \
          hal\system\dcmgr\inc \
          custom\common\hal

ifneq ($(filter __GENERAL_TTS__, $(strip $(MODULE_DEFS))),)
     INC_DIR += hal\audio\lib\VENDOR\tts
endif
ifeq ($(strip $(AUD_SOLUTION)),V1)
  ifneq ($(filter __AUDIO_COMPONENT_SUPPORT__, $(strip $(MODULE_DEFS))),)
     INC_DIR += hal\audio\src\common\inc
  endif
endif

ifneq ($(filter __CENTRALIZED_SLEEP_MANAGER__, $(strip $(MODULE_DEFS))),)
  INC_DIR    += hal\sleep_drv\public\inc
endif

ifneq ($(filter __MMI_DSM_NEW__ , $(strip $(MODULE_DEFS))),)                  
	INC_DIR += plutommi\mmi\mythroad\mythroadinc
endif 

# Define the specified compile options to COMP_DEFS
COMP_DEFS = APCS_INTWORK
ifneq ($(filter __GBC_LOAD_APP_SWITCH_ON__, $(strip $(MODULE_DEFS))),)
		INC_DIR += plutommi\mmi\GBC\inc
endif