Home | History | Annotate | Download | only in soundtrigger
      1 # Copyright 2014 The Android Open Source Project
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
      4 # you may not use this file except in compliance with the License.
      5 # You may obtain a copy of the License at
      6 #
      7 #      http://www.apache.org/licenses/LICENSE-2.0
      8 #
      9 # Unless required by applicable law or agreed to in writing, software
     10 # distributed under the License is distributed on an "AS IS" BASIS,
     11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     14 
     15 LOCAL_PATH:= $(call my-dir)
     16 
     17 include $(CLEAR_VARS)
     18 
     19 ifeq ($(SOUND_TRIGGER_USE_STUB_MODULE), 1)
     20     ifneq ($(USE_LEGACY_LOCAL_AUDIO_HAL), true)
     21         $(error Requires building with USE_LEGACY_LOCAL_AUDIO_HAL=true)
     22     endif
     23     LOCAL_CFLAGS += -DSOUND_TRIGGER_USE_STUB_MODULE
     24 endif
     25 
     26 LOCAL_SRC_FILES:=               \
     27     SoundTriggerHwService.cpp
     28 
     29 LOCAL_SHARED_LIBRARIES:= \
     30     liblog \
     31     libutils \
     32     libbinder \
     33     libcutils \
     34     libhardware \
     35     libsoundtrigger \
     36     libaudioclient \
     37     libserviceutility
     38 
     39 
     40 ifeq ($(USE_LEGACY_LOCAL_AUDIO_HAL),true)
     41 # libhardware configuration
     42 LOCAL_SRC_FILES +=               \
     43     SoundTriggerHalLegacy.cpp
     44 else
     45 # Treble configuration
     46 LOCAL_SRC_FILES +=               \
     47     SoundTriggerHalHidl.cpp
     48 
     49 LOCAL_SHARED_LIBRARIES += \
     50     libhwbinder \
     51     libhidlbase \
     52     libhidltransport \
     53     libbase \
     54     libaudiohal \
     55     android.hardware.soundtrigger (a] 2.0 \
     56     android.hardware.audio.common (a] 2.0
     57 endif
     58 
     59 
     60 LOCAL_C_INCLUDES += \
     61     $(TOPDIR)frameworks/av/services/audioflinger
     62 
     63 LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
     64 
     65 LOCAL_CFLAGS += -Wall -Werror
     66 
     67 LOCAL_MODULE:= libsoundtriggerservice
     68 
     69 include $(BUILD_SHARED_LIBRARY)
     70