Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d92d34e8 authored by Jack He's avatar Jack He
Browse files

Convert Android.mk in libaudioclient to Android.bp

* Since system/bt depends on this library, it needs to be converted to
  Android.bp before the conversion in system/bt can be continued.
* Majority of work is done by androidmk Android.mk > Android.bp
* Fixed sanitize arguements
* Removed LOCAL_EXPORT_C_INCLUDE_DIRS as Android.bp only supports
  exporting sub-directories of current Android.bp file
* Removed frameworks/av/media/libmedia/aidl include path as it no longer
  exists and Android.mk failed to check that
* Removed include path for audio-utils as it is being automatically
  included when we link against libaudioutils
* Android.mk file must be deleted as a library of the same name can only
  be defined once in either Android.bp or Android.mk
* A library defined in Android.bp can be used by either Android.bp or
  Android.mk files. However, a library defined in Android.mk cannot be
  used by Android.bp file. Therefore, for system/bt to link against this
  library in the Android.bp, this library must be converted first

Bug: 32958753
Test: Code compilation, no user visible effect

Change-Id: I2ae87a1151ed4235122c7774096c2dbff8b1fc62
parent 98d1217d
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
cc_library_shared {
    name: "libaudioclient",
    srcs: [
        "AudioEffect.cpp",
        "AudioPolicy.cpp",
        "AudioRecord.cpp",
        "AudioSystem.cpp",
        "AudioTrack.cpp",
        "AudioTrackShared.cpp",
        "IAudioFlinger.cpp",
        "IAudioFlingerClient.cpp",
        "IAudioPolicyService.cpp",
        "IAudioPolicyServiceClient.cpp",
        "IAudioRecord.cpp",
        "IAudioTrack.cpp",
        "IEffect.cpp",
        "IEffectClient.cpp",
        "ToneGenerator.cpp",
    ],
    shared_libs: [
        "liblog",
        "libcutils",
        "libutils",
        "libbinder",
        "libdl",
        "libaudioutils",
    ],
    export_shared_lib_headers: ["libbinder"],
    // for memory heap analysis
    static_libs: [
        "libc_malloc_debug_backtrace",
        "libc_logging",
    ],
    cflags: [
        "-Werror",
        "-Wno-error=deprecated-declarations",
        "-Wall",
    ],
    sanitize: {
        misc_undefined : [
            "unsigned-integer-overflow",
            "signed-integer-overflow",
        ],
    },
}

media/libaudioclient/Android.mk

deleted100644 → 0
+0 −50
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES += \
    AudioEffect.cpp \
    AudioPolicy.cpp \
    AudioRecord.cpp \
    AudioSystem.cpp \
    AudioTrack.cpp \
    AudioTrackShared.cpp \
    IAudioFlinger.cpp \
    IAudioFlingerClient.cpp \
    IAudioPolicyService.cpp \
    IAudioPolicyServiceClient.cpp \
    IAudioRecord.cpp \
    IAudioTrack.cpp \
    IEffect.cpp \
    IEffectClient.cpp \
    ToneGenerator.cpp \

LOCAL_SHARED_LIBRARIES := \
	liblog libcutils libutils libbinder \
        libdl libaudioutils \

LOCAL_EXPORT_SHARED_LIBRARY_HEADERS := libbinder

# for memory heap analysis
LOCAL_STATIC_LIBRARIES := libc_malloc_debug_backtrace libc_logging

LOCAL_MODULE:= libaudioclient

LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk

LOCAL_C_INCLUDES := \
    $(TOP)/frameworks/native/include/media/openmax \
    $(TOP)/frameworks/av/include/media/ \
    $(TOP)/frameworks/av/media/libstagefright \
    $(TOP)/frameworks/av/media/libmedia/aidl \
    $(call include-path-for, audio-utils)

LOCAL_EXPORT_C_INCLUDE_DIRS := \
    frameworks/av/include/media \
    frameworks/av/media/libmedia/aidl

LOCAL_CFLAGS += -Werror -Wno-error=deprecated-declarations -Wall
LOCAL_SANITIZE := unsigned-integer-overflow signed-integer-overflow

include $(BUILD_SHARED_LIBRARY)