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

Commit c35dd77a authored by Jack He's avatar Jack He Committed by android-build-merger
Browse files

Convert build system to soong using Android.bp am: 65b2a57b

am: 9283de58

Change-Id: Id194d1c543cc52f52e93016f3ae37a3207527219
parents 831650cb 9283de58
Loading
Loading
Loading
Loading

Android.bp

0 → 100644
+18 −0
Original line number Diff line number Diff line
subdirs = [
    "build",
    "btif",
    "btcore",
    "audio_a2dp_hw",
    "hci",
    "utils",
    "device",
    "stack",
    "osi",
    "embdrv",
    "service",
    "main",
    "bta",
    "vendor_libs",
    "test",
    "udrv",
]
+0 −51
Original line number Diff line number Diff line
LOCAL_PATH := $(call my-dir)

# Setup Bluetooth local make variables for handling configuration
ifneq ($(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR),)
  bluetooth_C_INCLUDES := $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR)
  bluetooth_CFLAGS += -DHAS_BDROID_BUILDCFG
else
  bluetooth_C_INCLUDES :=
  bluetooth_CFLAGS += -DHAS_NO_BDROID_BUILDCFG
endif

ifneq ($(BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED),)
  bluetooth_CFLAGS += -DHCILP_INCLUDED=$(BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED)
endif

ifneq ($(TARGET_BUILD_VARIANT),user)
bluetooth_CFLAGS += -DBLUEDROID_DEBUG
endif

bluetooth_CFLAGS += -DEXPORT_SYMBOL="__attribute__((visibility(\"default\")))"

#
# Common C/C++ compiler flags.
#
# -Wno-gnu-variable-sized-type-not-at-end is needed, because struct BT_HDR
#  is defined as a variable-size header in a struct.
# -Wno-typedef-redefinition is needed because of the way the struct typedef
#  is done in osi/include header files. This issue can be obsoleted by
#  switching to C11 or C++.
# -Wno-unused-parameter is needed, because there are too many unused
#  parameters in all the code.
#
bluetooth_CFLAGS += \
  -fvisibility=hidden \
  -Wall \
  -Wextra \
  -Werror \
  -Wno-gnu-variable-sized-type-not-at-end \
  -Wno-typedef-redefinition \
  -Wno-unused-parameter \
  -DLOG_NDEBUG=1

bluetooth_CONLYFLAGS += -std=c99
bluetooth_CPPFLAGS :=

include $(call all-subdir-makefiles)

# Cleanup our locals
bluetooth_C_INCLUDES :=
bluetooth_CFLAGS :=
bluetooth_CONLYFLAGS :=
bluetooth_CPPFLAGS :=
+26 −0
Original line number Diff line number Diff line
// Audio A2DP shared library for target
// ========================================================
cc_library_shared {
    name: "audio.a2dp.default",
    defaults: ["fluoride_defaults"],
    relative_install_path: "hw",
    srcs: [
        "audio_a2dp_hw.cc",
        "audio_a2dp_hw_utils.cc",
    ],
    include_dirs: [
        "packages/modules/Bluetooth/system",
    ],
    shared_libs: [
        "liblog",
    ],
    static_libs: ["libosi"],
}

cc_library_static {
    name: "libaudio-a2dp-hw-utils",
    defaults: ["fluoride_defaults"],
    srcs: [
        "audio_a2dp_hw_utils.cc",
    ],
}

system/audio_a2dp_hw/Android.mk

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

# Audio A2DP shared library for target
# ========================================================
include $(CLEAR_VARS)
LOCAL_CPP_EXTENSION := .cc

LOCAL_SRC_FILES := \
	audio_a2dp_hw.cc \
	audio_a2dp_hw_utils.cc

LOCAL_C_INCLUDES := \
	. \
	$(LOCAL_PATH)/../ \
	$(LOCAL_PATH)/../utils/include

LOCAL_MODULE := audio.a2dp.default
LOCAL_MODULE_RELATIVE_PATH := hw

LOCAL_SHARED_LIBRARIES := liblog libchrome
LOCAL_STATIC_LIBRARIES := libosi

LOCAL_MODULE_TAGS := optional

LOCAL_CFLAGS += $(bluetooth_CFLAGS)
LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)

include $(BUILD_SHARED_LIBRARY)
+2 −2
Original line number Diff line number Diff line
@@ -44,13 +44,13 @@
#include <hardware/hardware.h>
#include <system/audio.h>

#include "audio_a2dp_hw.h"
#include "bt_utils.h"
#include "osi/include/hash_map_utils.h"
#include "osi/include/log.h"
#include "osi/include/osi.h"
#include "osi/include/socket_utils/sockets.h"

#include "audio_a2dp_hw.h"

/*****************************************************************************
 *  Constants & Macros
 *****************************************************************************/
Loading