1 # Copyright 2016 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 audio_service_shared_libraries := \ 18 libbinder \ 19 libbinderwrapper \ 20 libbrillo \ 21 libbrillo-binder \ 22 libc \ 23 libchrome \ 24 libaudioclient \ 25 libutils 26 27 audio_client_sources := \ 28 aidl/android/brillo/brilloaudioservice/IAudioServiceCallback.aidl \ 29 aidl/android/brillo/brilloaudioservice/IBrilloAudioService.aidl \ 30 audio_service_callback.cpp \ 31 brillo_audio_client.cpp \ 32 brillo_audio_client_helpers.cpp \ 33 brillo_audio_device_info.cpp \ 34 brillo_audio_device_info_internal.cpp \ 35 brillo_audio_manager.cpp 36 37 audio_service_sources := \ 38 aidl/android/brillo/brilloaudioservice/IAudioServiceCallback.aidl \ 39 aidl/android/brillo/brilloaudioservice/IBrilloAudioService.aidl \ 40 audio_daemon.cpp \ 41 audio_device_handler.cpp \ 42 audio_volume_handler.cpp \ 43 brillo_audio_service_impl.cpp 44 45 # Audio service. 46 # ============================================================================= 47 include $(CLEAR_VARS) 48 LOCAL_MODULE := brilloaudioservice 49 LOCAL_SRC_FILES := \ 50 $(audio_service_sources) \ 51 main_audio_service.cpp 52 LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl 53 LOCAL_SHARED_LIBRARIES := $(audio_service_shared_libraries) 54 LOCAL_CFLAGS := -Werror -Wall 55 LOCAL_INIT_RC := brilloaudioserv.rc 56 include $(BUILD_EXECUTABLE) 57 58 # Audio client library. 59 # ============================================================================= 60 include $(CLEAR_VARS) 61 LOCAL_MODULE := libbrilloaudio 62 LOCAL_SRC_FILES := \ 63 $(audio_client_sources) 64 LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl 65 LOCAL_SHARED_LIBRARIES := $(audio_service_shared_libraries) 66 LOCAL_CFLAGS := -Wall -Werror -std=c++14 67 include $(BUILD_SHARED_LIBRARY) 68 69 # Unit tests for the Brillo audio service. 70 # ============================================================================= 71 include $(CLEAR_VARS) 72 LOCAL_MODULE := brilloaudioservice_test 73 LOCAL_SRC_FILES := \ 74 $(audio_service_sources) \ 75 test/audio_daemon_test.cpp \ 76 test/audio_device_handler_test.cpp \ 77 test/audio_volume_handler_test.cpp 78 LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl 79 LOCAL_SHARED_LIBRARIES := \ 80 $(audio_service_shared_libraries) 81 LOCAL_STATIC_LIBRARIES := \ 82 libBionicGtestMain \ 83 libbinderwrapper_test_support \ 84 libchrome_test_helpers \ 85 libgmock 86 LOCAL_CFLAGS := -Werror -Wall 87 LOCAL_CFLAGS += -Wno-sign-compare 88 include $(BUILD_NATIVE_TEST) 89 90 # Unit tests for the Brillo audio client. 91 # ============================================================================= 92 include $(CLEAR_VARS) 93 LOCAL_MODULE := brilloaudioclient_test 94 LOCAL_SRC_FILES := \ 95 $(audio_client_sources) \ 96 test/audio_service_callback_test.cpp \ 97 test/brillo_audio_client_test.cpp \ 98 test/brillo_audio_device_info_internal_test.cpp \ 99 test/brillo_audio_manager_test.cpp 100 LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl 101 LOCAL_SHARED_LIBRARIES := \ 102 $(audio_service_shared_libraries) 103 LOCAL_STATIC_LIBRARIES := \ 104 libBionicGtestMain \ 105 libbinderwrapper_test_support \ 106 libchrome_test_helpers \ 107 libgmock 108 LOCAL_CFLAGS := -Wno-sign-compare -Wall -Werror 109 include $(BUILD_NATIVE_TEST) 110