aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn4
-rw-r--r--audio_a2dp_hw/BUILD.gn2
-rw-r--r--btcore/BUILD.gn8
-rw-r--r--btif/BUILD.gn4
-rw-r--r--build/BUILD.gn21
-rw-r--r--build/secondary/third_party/gmock/BUILD.gn52
-rw-r--r--build/secondary/third_party/googletest/BUILD.gn91
-rw-r--r--build/secondary/third_party/gtest/BUILD.gn77
-rw-r--r--build/secondary/third_party/libchrome/BUILD.gn51
-rw-r--r--build/secondary/third_party/tinyxml2/BUILD.gn23
-rw-r--r--build/toolchain/gcc/BUILD.gn3
-rw-r--r--device/BUILD.gn16
-rw-r--r--embdrv/sbc/BUILD.gn4
-rw-r--r--hci/BUILD.gn10
-rw-r--r--main/BUILD.gn12
-rw-r--r--osi/BUILD.gn11
-rw-r--r--service/BUILD.gn61
-rw-r--r--stack/BUILD.gn1
-rw-r--r--test/suite/BUILD.gn26
-rw-r--r--udrv/BUILD.gn2
-rw-r--r--utils/BUILD.gn2
-rw-r--r--vendor_libs/BUILD.gn3
-rw-r--r--vendor_libs/linux/BUILD.gn6
-rw-r--r--vendor_libs/test_vendor_lib/BUILD.gn4
24 files changed, 250 insertions, 244 deletions
diff --git a/BUILD.gn b/BUILD.gn
index e6cb5cb43..ffbe4ef42 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -25,7 +25,7 @@ group("bluetooth") {
deps = [
"//main:bluetooth.default",
"//service:bluetoothtbd",
- "//vendor_libs:vendor-libs"
+ "//vendor_libs:vendor-libs",
]
}
@@ -33,7 +33,7 @@ group("bluetooth_tests") {
testonly = true
deps = [
- "//test/suite:net_test_bluedroid",
+ "//test/suite:net_test_bluetooth",
"//btcore:net_test_btcore",
"//hci:net_test_hci",
"//osi:net_test_osi",
diff --git a/audio_a2dp_hw/BUILD.gn b/audio_a2dp_hw/BUILD.gn
index 2c5024a46..4f252c417 100644
--- a/audio_a2dp_hw/BUILD.gn
+++ b/audio_a2dp_hw/BUILD.gn
@@ -16,7 +16,7 @@
shared_library("audio.a2dp.default") {
sources = [
- "audio_a2dp_hw.c"
+ "audio_a2dp_hw.c",
]
include_dirs = [
diff --git a/btcore/BUILD.gn b/btcore/BUILD.gn
index c0ebd8e81..860a3c0f3 100644
--- a/btcore/BUILD.gn
+++ b/btcore/BUILD.gn
@@ -48,8 +48,12 @@ executable("net_test_btcore") {
deps = [
"//btcore",
"//osi",
- "//third_party/gtest:gtest_main",
+ "//third_party/googletest:gtest_main",
]
- libs = [ "-lpthread", "-lrt", "-ldl" ]
+ libs = [
+ "-lpthread",
+ "-lrt",
+ "-ldl",
+ ]
}
diff --git a/btif/BUILD.gn b/btif/BUILD.gn
index ec683fb38..7285c9aa1 100644
--- a/btif/BUILD.gn
+++ b/btif/BUILD.gn
@@ -17,8 +17,10 @@
static_library("btif") {
sources = [
"src/btif_av.c",
+
+ #TODO(jpawlowski): heavily depends on Android,
+ # "src/btif_avrcp_audio_track.cpp",
"src/btif_config.c",
- "src/btif_config_transcode.cpp",
"src/btif_core.c",
"src/btif_debug.c",
"src/btif_debug_btsnoop.c",
diff --git a/build/BUILD.gn b/build/BUILD.gn
index fb20a34f6..eae173727 100644
--- a/build/BUILD.gn
+++ b/build/BUILD.gn
@@ -18,16 +18,22 @@ declare_args() {
# Include path for hardware/bluetooth.h
libhw_include_path = ""
core_include_path = ""
+ audio_include_path = ""
}
config("default_include_dirs") {
# TODO(armansito): Remove "core_include_path" once the cutils includes have
# been removed.
- assert(libhw_include_path != "", "libhardware_include_path build argument wasn't provided.")
- assert(core_include_path != "", "core_include_path build argument wasn't provided.")
+ assert(libhw_include_path != "",
+ "libhardware_include_path build argument wasn't provided.")
+ assert(core_include_path != "",
+ "core_include_path build argument wasn't provided.")
+ assert(audio_include_path != "",
+ "audio_include_path build argument wasn't provided.")
include_dirs = [
libhw_include_path,
core_include_path,
+ audio_include_path,
]
}
@@ -35,8 +41,9 @@ config("linux") {
# TODO(keybuk): AndroidConfig.h or equivalent
cflags = [
- "-Wall",
- "-Werror",
+ #TODO(jpawlowski): uncomment once we have no warnings on linux build
+ # "-Wall",
+ # "-Werror",
"-g",
"-O0",
"-fpic",
@@ -45,9 +52,7 @@ config("linux") {
"-fvisibility=hidden",
]
- cflags_c = [
- "-std=c99"
- ]
+ cflags_c = [ "-std=c99" ]
cflags_cc = [
"-std=c++11",
@@ -60,6 +65,8 @@ config("linux") {
"HAS_NO_BDROID_BUILDCFG",
"LOG_NDEBUG=1",
"EXPORT_SYMBOL=__attribute__((visibility(\"default\")))",
+ "PROPERTY_VALUE_MAX=256",
+ "KERNEL_MISSING_CLOCK_BOOTTIME_ALARM=TRUE",
# This is a macro to that can be used by source code to detect if the
# current build is done by GN or via Android.mk. This is a temporary
diff --git a/build/secondary/third_party/gmock/BUILD.gn b/build/secondary/third_party/gmock/BUILD.gn
deleted file mode 100644
index e1c4cf31b..000000000
--- a/build/secondary/third_party/gmock/BUILD.gn
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-config("gmock_config") {
- # Gmock headers need to be able to find themselves.
- include_dirs = [ "include" ]
-}
-
-static_library("gmock") {
- testonly = true
- sources = [
- # Sources based on files in r173 of gmock.
- "include/gmock/gmock-actions.h",
- "include/gmock/gmock-cardinalities.h",
- "include/gmock/gmock-generated-actions.h",
- "include/gmock/gmock-generated-function-mockers.h",
- "include/gmock/gmock-generated-matchers.h",
- "include/gmock/gmock-generated-nice-strict.h",
- "include/gmock/gmock-matchers.h",
- "include/gmock/gmock-spec-builders.h",
- "include/gmock/gmock.h",
- "include/gmock/internal/gmock-generated-internal-utils.h",
- "include/gmock/internal/gmock-internal-utils.h",
- "include/gmock/internal/gmock-port.h",
-
- #"src/gmock-all.cc", # Not needed by our build.
- "src/gmock-cardinalities.cc",
- "src/gmock-internal-utils.cc",
- "src/gmock-matchers.cc",
- "src/gmock-spec-builders.cc",
- "src/gmock.cc",
- ]
-
- # This project includes some stuff form gtest's guts.
- include_dirs = [ "../gtest/include" ]
-
- public_configs = [
- ":gmock_config",
- "//third_party/gtest:gtest_config",
- ]
-}
-
-static_library("gmock_main") {
- testonly = true
- sources = [
- "src/gmock_main.cc",
- ]
- deps = [
- ":gmock",
- ]
-}
diff --git a/build/secondary/third_party/googletest/BUILD.gn b/build/secondary/third_party/googletest/BUILD.gn
new file mode 100644
index 000000000..0122adcd5
--- /dev/null
+++ b/build/secondary/third_party/googletest/BUILD.gn
@@ -0,0 +1,91 @@
+#
+# Copyright (C) 2016 Google, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+config("gtest_config") {
+ # Gtest headers need to be able to find themselves.
+ include_dirs = [ "googletest/include" ]
+
+ defines = [ "GTEST_HAS_RTTI=0" ]
+}
+
+config("gtest_direct_config") {
+ visibility = [ ":*" ]
+ defines = [ "UNIT_TEST" ]
+}
+
+static_library("gtest") {
+ testonly = true
+ sources = [
+ "googletest/src/gtest-all.cc",
+ ]
+
+ include_dirs = [
+ "googletest/",
+ "googletest/include",
+ ]
+
+ all_dependent_configs = [ ":gtest_config" ]
+ public_configs = [ ":gtest_direct_config" ]
+}
+
+source_set("gtest_main") {
+ testonly = true
+ sources = [
+ "googletest/src/gtest_main.cc",
+ ]
+ deps = [
+ ":gtest",
+ ]
+}
+
+config("gmock_config") {
+ # Gmock headers need to be able to find themselves.
+ include_dirs = [ "googlemock/include" ]
+}
+
+static_library("gmock") {
+ testonly = true
+ sources = [
+ "googlemock/src/gmock-all.cc",
+ ]
+
+ # This project includes some stuff form gtest's guts.
+ include_dirs = [
+ "googlemock",
+ "googlemock/include",
+ ]
+
+ public_configs = [
+ ":gmock_config",
+ ":gtest_config",
+ ]
+}
+
+static_library("gmock_main") {
+ testonly = true
+ sources = [
+ "googlemock/src/gmock_main.cc",
+ ]
+ deps = [
+ ":gmock",
+ ":gtest",
+ ]
+
+ public_configs = [
+ ":gmock_config",
+ ":gtest_config",
+ ]
+}
diff --git a/build/secondary/third_party/gtest/BUILD.gn b/build/secondary/third_party/gtest/BUILD.gn
deleted file mode 100644
index c1112d952..000000000
--- a/build/secondary/third_party/gtest/BUILD.gn
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# Copyright (C) 2015 Google, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-config("gtest_config") {
- # Gtest headers need to be able to find themselves.
- include_dirs = [ "include" ]
-
- defines = [ "GTEST_HAS_RTTI=0" ]
-}
-
-config("gtest_direct_config") {
- visibility = [ ":*" ]
- defines = [ "UNIT_TEST" ]
-}
-
-static_library("gtest") {
- testonly = true
- sources = [
- "include/gtest/gtest-death-test.h",
- "include/gtest/gtest-message.h",
- "include/gtest/gtest-param-test.h",
- "include/gtest/gtest-printers.h",
- "include/gtest/gtest-spi.h",
- "include/gtest/gtest-test-part.h",
- "include/gtest/gtest-typed-test.h",
- "include/gtest/gtest.h",
- "include/gtest/gtest_pred_impl.h",
- "include/gtest/internal/gtest-death-test-internal.h",
- "include/gtest/internal/gtest-filepath.h",
- "include/gtest/internal/gtest-internal.h",
- "include/gtest/internal/gtest-linked_ptr.h",
- "include/gtest/internal/gtest-param-util-generated.h",
- "include/gtest/internal/gtest-param-util.h",
- "include/gtest/internal/gtest-port.h",
- "include/gtest/internal/gtest-string.h",
- "include/gtest/internal/gtest-tuple.h",
- "include/gtest/internal/gtest-type-util.h",
-
- "src/gtest-all.cc",
- "src/gtest-death-test.cc",
- "src/gtest-filepath.cc",
- "src/gtest-internal-inl.h",
- "src/gtest-port.cc",
- "src/gtest-printers.cc",
- "src/gtest-test-part.cc",
- "src/gtest-typed-test.cc",
- "src/gtest.cc",
- ]
-
- include_dirs = [ "." ]
-
- all_dependent_configs = [ ":gtest_config" ]
- public_configs = [ ":gtest_direct_config" ]
-}
-
-source_set("gtest_main") {
- testonly = true
- sources = [
- "src/gtest_main.cc",
- ]
- deps = [
- ":gtest",
- ]
-}
diff --git a/build/secondary/third_party/libchrome/BUILD.gn b/build/secondary/third_party/libchrome/BUILD.gn
index 4d1b6bd10..48f82c6ac 100644
--- a/build/secondary/third_party/libchrome/BUILD.gn
+++ b/build/secondary/third_party/libchrome/BUILD.gn
@@ -16,12 +16,10 @@
source_set("base_sources") {
sources = [
- "base/allocator/type_profiler_control.cc",
"base/at_exit.cc",
"base/atomic_ref_count.h",
"base/atomic_sequence_num.h",
"base/atomicops.h",
- "base/atomicops_internals_x86_gcc.cc",
"base/base64.cc",
"base/base64.h",
"base/base_export.h",
@@ -56,7 +54,6 @@ source_set("base_sources") {
"base/files/scoped_temp_dir.cc",
"base/guid.cc",
"base/guid_posix.cc",
- "base/hash.cc",
"base/json/json_parser.cc",
"base/json/json_reader.cc",
"base/json/json_string_value_serializer.cc",
@@ -72,13 +69,16 @@ source_set("base_sources") {
"base/memory/weak_ptr.cc",
"base/message_loop/incoming_task_queue.cc",
"base/message_loop/message_loop.cc",
- "base/message_loop/message_loop_proxy.cc",
- "base/message_loop/message_loop_proxy_impl.cc",
+ "base/message_loop/message_loop_task_runner.cc",
"base/message_loop/message_pump.cc",
"base/message_loop/message_pump_default.cc",
+
+ # we don't want any glib dependencies.
+ # "base/message_loop/message_pump_glib.cc",
"base/message_loop/message_pump_libevent.cc",
"base/metrics/bucket_ranges.cc",
"base/metrics/field_trial.cc",
+ "base/metrics/metrics_hashes.cc",
"base/metrics/histogram_base.cc",
"base/metrics/histogram.cc",
"base/metrics/histogram_samples.cc",
@@ -115,6 +115,7 @@ source_set("base_sources") {
"base/sequence_checker_impl.cc",
"base/sequenced_task_runner.cc",
"base/sha1_portable.cc",
+ "base/strings/pattern.cc",
"base/strings/safe_sprintf.cc",
"base/strings/string16.cc",
"base/strings/string_number_conversions.cc",
@@ -133,6 +134,7 @@ source_set("base_sources") {
"base/synchronization/waitable_event_posix.cc",
"base/sync_socket_posix.cc",
"base/sys_info.cc",
+
# TODO(armansito): For our GN builds these platform-specific implementations
# don't really make that much sense but instead of removing the line I'm
# commenting it out in case we want to re-add it later (it's included in the
@@ -142,12 +144,8 @@ source_set("base_sources") {
"base/sys_info_posix.cc",
"base/task/cancelable_task_tracker.cc",
"base/task_runner.cc",
- "base/third_party/dmg_fp/dtoa.cc",
- "base/third_party/dmg_fp/g_fmt.cc",
- "base/third_party/dynamic_annotations/dynamic_annotations.c",
"base/third_party/icu/icu_utf.cc",
"base/third_party/nspr/prtime.cc",
- "base/third_party/superfasthash/superfasthash.c",
"base/threading/non_thread_safe_impl.cc",
"base/threading/platform_thread_internal_posix.cc",
"base/threading/platform_thread_linux.cc",
@@ -174,6 +172,10 @@ source_set("base_sources") {
"base/time/tick_clock.cc",
"base/time/time.cc",
"base/time/time_posix.cc",
+ "base/trace_event/heap_profiler_allocation_context.cc",
+ "base/trace_event/heap_profiler_allocation_context_tracker.cc",
+ "base/trace_event/heap_profiler_stack_frame_deduplicator.cc",
+ "base/trace_event/heap_profiler_type_name_deduplicator.cc",
"base/trace_event/malloc_dump_provider.cc",
"base/trace_event/memory_allocator_dump.cc",
"base/trace_event/memory_allocator_dump_guid.cc",
@@ -184,29 +186,46 @@ source_set("base_sources") {
"base/trace_event/process_memory_maps_dump_provider.cc",
"base/trace_event/process_memory_totals.cc",
"base/trace_event/process_memory_totals_dump_provider.cc",
+ "base/trace_event/trace_buffer.cc",
"base/trace_event/trace_config.cc",
"base/trace_event/trace_event_argument.cc",
"base/trace_event/trace_event_impl.cc",
- "base/trace_event/trace_event_impl_constants.cc",
- "base/trace_event/trace_event_memory.cc",
"base/trace_event/trace_event_memory_overhead.cc",
"base/trace_event/trace_event_synthetic_delay.cc",
+ "base/trace_event/trace_log.cc",
+ "base/trace_event/trace_log_constants.cc",
+ "base/trace_event/trace_sampling_thread.cc",
"base/tracked_objects.cc",
"base/tracking_info.cc",
"base/values.cc",
"base/vlog.cc",
]
- defines = [ "BASE_IMPLEMENTATION" ]
+ defines = [
+ "BASE_IMPLEMENTATION",
+
+ # trick libchrome to think we're building host code within an Android checkout
+ # thanks to it no glib dependency
+ "__ANDROID_HOST__=1",
+ "OS_LINUX=1",
+ ]
include_dirs = [
"//",
"//third_party/libchrome",
+ "//third_party/libevent",
+ "//third_party/libevent/include",
"//third_party/libchrome/base",
"//third_party/modp_b64",
+ "//third_party/gtest/include",
]
}
+config("libchrome_config") {
+ # libchrome headers need to be able to find themselves.
+ include_dirs = [ "//third_party/libchrome" ]
+}
+
static_library("base") {
deps = [
":base_sources",
@@ -224,5 +243,11 @@ static_library("base") {
"-Wno-sign-promo",
]
- libs = [ "-levent", "-levent_core", "-lpthread" ]
+ libs = [
+ "-levent",
+ "-levent_core",
+ "-lpthread",
+ ]
+
+ public_configs = [ ":libchrome_config" ]
}
diff --git a/build/secondary/third_party/tinyxml2/BUILD.gn b/build/secondary/third_party/tinyxml2/BUILD.gn
deleted file mode 100644
index 335960b7e..000000000
--- a/build/secondary/third_party/tinyxml2/BUILD.gn
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Copyright (C) 2015 Google, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-static_library("tinyxml2") {
- sources = [
- "tinyxml2.cpp"
- ]
-
- include_dirs = [ "." ]
-}
diff --git a/build/toolchain/gcc/BUILD.gn b/build/toolchain/gcc/BUILD.gn
index ecf905737..888b0158d 100644
--- a/build/toolchain/gcc/BUILD.gn
+++ b/build/toolchain/gcc/BUILD.gn
@@ -54,7 +54,8 @@ toolchain("gcc") {
soname = "{{target_output_name}}{{output_extension}}" # e.g. "libfoo.so".
rspfile = soname + ".rsp"
- command = "$cxx -shared {{ldflags}} -o $soname -Wl,-soname=$soname @$rspfile"
+ command =
+ "$cxx -shared {{ldflags}} -o $soname -Wl,-soname=$soname @$rspfile"
rspfile_content = "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive {{libs}}"
description = "SOLINK $soname"
diff --git a/device/BUILD.gn b/device/BUILD.gn
index 797e0da04..bfc42ec96 100644
--- a/device/BUILD.gn
+++ b/device/BUILD.gn
@@ -17,7 +17,8 @@
static_library("device") {
sources = [
"src/classic/peer.c",
- "src/controller.c"
+ "src/controller.c",
+ "src/interop.c",
]
include_dirs = [
@@ -36,17 +37,18 @@ executable("net_test_device") {
"test/classic/peer_test.cpp",
]
- include_dirs = [
- "//",
- "//osi/include",
- ]
+ include_dirs = [ "//" ]
deps = [
"//device",
"//btcore",
"//osi",
- "//third_party/gtest:gtest_main",
+ "//third_party/googletest:gtest_main",
]
- libs = [ "-lpthread", "-lrt", "-ldl" ]
+ libs = [
+ "-lpthread",
+ "-lrt",
+ "-ldl",
+ ]
}
diff --git a/embdrv/sbc/BUILD.gn b/embdrv/sbc/BUILD.gn
index 7c9387ce7..7e75633ad 100644
--- a/embdrv/sbc/BUILD.gn
+++ b/embdrv/sbc/BUILD.gn
@@ -32,9 +32,7 @@ source_set("sbc_decoder") {
"decoder/srce/synthesis-sbc.c",
]
- include_dirs = [
- "decoder/include",
- ]
+ include_dirs = [ "decoder/include" ]
}
source_set("sbc_encoder") {
diff --git a/hci/BUILD.gn b/hci/BUILD.gn
index 496144da8..35a0b7805 100644
--- a/hci/BUILD.gn
+++ b/hci/BUILD.gn
@@ -37,6 +37,7 @@ static_library("hci") {
"include",
"//",
"//include",
+ "//bta/include",
"//btcore/include",
"//stack/include",
]
@@ -59,6 +60,7 @@ executable("net_test_hci") {
"//include",
"//btcore/include",
"//hci/include",
+ "//osi/test",
"//stack/include",
]
@@ -66,8 +68,12 @@ executable("net_test_hci") {
"//hci",
"//osi",
"//btcore",
- "//third_party/gtest:gtest_main",
+ "//third_party/googletest:gtest_main",
]
- libs = [ "-lpthread", "-lrt", "-ldl" ]
+ libs = [
+ "-lpthread",
+ "-lrt",
+ "-ldl",
+ ]
}
diff --git a/main/BUILD.gn b/main/BUILD.gn
index 1ffaee6ce..d7d0790c5 100644
--- a/main/BUILD.gn
+++ b/main/BUILD.gn
@@ -70,5 +70,15 @@ shared_library("bluetooth.default") {
"//utils",
]
- libs = [ "-ldl", "-lpthread", "-lresolv", "-lrt", "-lz" ]
+ cflags_c = [
+ "-Lobj/osi",
+ "-losi",
+ ]
+ libs = [
+ "-ldl",
+ "-lpthread",
+ "-lresolv",
+ "-lrt",
+ "-lz",
+ ]
}
diff --git a/osi/BUILD.gn b/osi/BUILD.gn
index b0a8f9193..a52647a51 100644
--- a/osi/BUILD.gn
+++ b/osi/BUILD.gn
@@ -42,14 +42,15 @@ static_library("osi") {
# dependencies are abstracted.
"src/socket_utils/socket_local_client.c",
"src/socket_utils/socket_local_server.c",
-
"src/thread.c",
"src/time.c",
+ "src/wakelock.c",
]
include_dirs = [
"//",
"//utils/include",
+ "//stack/include",
]
}
@@ -77,12 +78,16 @@ executable("net_test_osi") {
include_dirs = [
"//",
+ "//osi/test",
]
deps = [
"//osi",
- "//third_party/gtest:gtest_main",
+ "//third_party/googletest:gtest_main",
]
- libs = [ "-lpthread", "-lrt" ]
+ libs = [
+ "-lpthread",
+ "-lrt",
+ ]
}
diff --git a/service/BUILD.gn b/service/BUILD.gn
index 616c7e80f..e8d2fd309 100644
--- a/service/BUILD.gn
+++ b/service/BUILD.gn
@@ -17,48 +17,62 @@
source_set("service") {
sources = [
"adapter.cpp",
- "adapter_state.cpp",
"daemon.cpp",
+ "gatt_client.cpp",
"gatt_server.cpp",
+ "gatt_server_old.cpp",
+ "logging_helpers.cpp",
+ "low_energy_client.cpp",
+ "settings.cpp",
+ "common/bluetooth/advertise_data.cpp",
+ "common/bluetooth/adapter_state.cpp",
+ "common/bluetooth/uuid.cpp",
+ "common/bluetooth/scan_filter.cpp",
+ "common/bluetooth/scan_result.cpp",
+ "common/bluetooth/scan_settings.cpp",
+ "common/bluetooth/gatt_identifier.cpp",
+ "common/bluetooth/advertise_settings.cpp",
+ "common/bluetooth/util/atomic_string.cpp",
+ "common/bluetooth/util/address_helper.cpp",
"hal/bluetooth_interface.cpp",
- "ipc/binder/bluetooth_binder_server.cpp",
- "ipc/binder/IBluetooth.cpp",
- "ipc/binder/IBluetoothCallback.cpp",
- "ipc/binder/ipc_handler_binder.cpp",
+ "hal/bluetooth_gatt_interface.cpp",
+ "hal/fake_bluetooth_gatt_interface.cpp",
+ "hal/fake_bluetooth_interface.cpp",
+ "hal/gatt_helpers.cpp",
"ipc/ipc_handler.cpp",
- "ipc/ipc_handler_linux.cpp",
- "ipc/ipc_manager.cpp",
"ipc/linux_ipc_host.cpp",
- "logging_helpers.cpp",
- "settings.cpp",
- "util/atomic_string.cpp",
- "uuid.cpp"
+ "ipc/ipc_manager.cpp",
+ "ipc/ipc_handler_linux.cpp",
]
include_dirs = [
"//",
- "//third_party/libchrome"
+ "//service/common",
+ "//third_party/libchrome",
+ "//third_party/modp_b64/modp64",
+ libhw_include_path,
]
}
executable("bluetoothtbd") {
sources = [
- "main.cpp"
+ "main.cpp",
]
deps = [
":service",
"//btcore",
"//third_party/libchrome:base",
- "//third_party/modp_b64"
+ "//third_party/modp_b64",
]
- include_dirs = [
- "//",
- "//third_party/libchrome"
- ]
+ include_dirs = [ "//" ]
- libs = [ "-ldl", "-lpthread", "-lrt" ]
+ libs = [
+ "-ldl",
+ "-lpthread",
+ "-lrt",
+ ]
}
executable("service_unittests") {
@@ -70,16 +84,11 @@ executable("service_unittests") {
"test/uuid_unittest.cpp",
]
- include_dirs = [
- "//",
- "//third_party/gmock/include",
- "//third_party/libchrome"
- ]
+ include_dirs = [ "//" ]
deps = [
":service",
- "//third_party/gmock:gmock_main",
- "//third_party/gtest:gtest_main",
+ "//third_party/googletest:gmock_main",
"//third_party/libchrome:base",
"//third_party/modp_b64",
]
diff --git a/stack/BUILD.gn b/stack/BUILD.gn
index 95372d66c..24afc93d0 100644
--- a/stack/BUILD.gn
+++ b/stack/BUILD.gn
@@ -148,6 +148,7 @@ static_library("stack") {
"sdp",
"smp",
"srvc",
+ "//osi/include",
"//btcore/include",
"//vnd/include",
"//vnd/ble",
diff --git a/test/suite/BUILD.gn b/test/suite/BUILD.gn
index 74d6b758e..72188520c 100644
--- a/test/suite/BUILD.gn
+++ b/test/suite/BUILD.gn
@@ -17,18 +17,8 @@
executable("net_test_bluetooth") {
testonly = true
sources = [
- "cases/adapter.c",
- "cases/cases.c",
- "cases/gatt.c",
- "cases/pan.c",
- "cases/rfcomm.c",
- "support/adapter.c",
- "support/callbacks.c",
- "support/gatt.c",
- "support/hal.c",
- "support/pan.c",
- "support/rfcomm.c",
- "main.cpp",
+ "adapter/adapter_unittest.cpp",
+ "adapter/bluetooth_test.cpp",
]
include_dirs = [
@@ -39,10 +29,16 @@ executable("net_test_bluetooth") {
deps = [
"//btcore",
"//main:bluetooth.default",
+ "//service:service",
+ "//service:service_unittests",
+ "//third_party/libchrome:base",
"//osi",
- "//third_party/gtest:gtest_main",
+ "//third_party/googletest:gtest_main",
]
- libs = [ "-lpthread", "-lrt", "-ldl" ]
-
+ libs = [
+ "-lpthread",
+ "-lrt",
+ "-ldl",
+ ]
}
diff --git a/udrv/BUILD.gn b/udrv/BUILD.gn
index 1fb16f7b7..90c84b5a1 100644
--- a/udrv/BUILD.gn
+++ b/udrv/BUILD.gn
@@ -16,7 +16,7 @@
source_set("udrv") {
sources = [
- "ulinux/uipc.c"
+ "ulinux/uipc.c",
]
include_dirs = [
diff --git a/utils/BUILD.gn b/utils/BUILD.gn
index 2b7dc59ed..e7a5315d3 100644
--- a/utils/BUILD.gn
+++ b/utils/BUILD.gn
@@ -16,7 +16,7 @@
static_library("utils") {
sources = [
- "src/bt_utils.c"
+ "src/bt_utils.c",
]
include_dirs = [
diff --git a/vendor_libs/BUILD.gn b/vendor_libs/BUILD.gn
index a088315cd..2a125583d 100644
--- a/vendor_libs/BUILD.gn
+++ b/vendor_libs/BUILD.gn
@@ -17,6 +17,7 @@
group("vendor-libs") {
deps = [
"linux:bt-vendor-linux",
- "test_vendor_lib:test_vendor_lib",
+ #TODO(jpawlowski): uncomment when building fixed
+ # "test_vendor_lib:test_vendor_lib",
]
}
diff --git a/vendor_libs/linux/BUILD.gn b/vendor_libs/linux/BUILD.gn
index 602600174..2179a643a 100644
--- a/vendor_libs/linux/BUILD.gn
+++ b/vendor_libs/linux/BUILD.gn
@@ -16,10 +16,8 @@
shared_library("bt-vendor-linux") {
sources = [
- "bt_vendor_linux.c"
+ "bt_vendor_linux.c",
]
- include_dirs = [
- "//"
- ]
+ include_dirs = [ "//" ]
}
diff --git a/vendor_libs/test_vendor_lib/BUILD.gn b/vendor_libs/test_vendor_lib/BUILD.gn
index 4bcbd1196..76f4651df 100644
--- a/vendor_libs/test_vendor_lib/BUILD.gn
+++ b/vendor_libs/test_vendor_lib/BUILD.gn
@@ -14,9 +14,11 @@ shared_library("test_vendor_lib") {
include_dirs = [
"include",
"//",
+
# TODO(dennischeng): Ideally we should need to have the lines below for
# indirect includes.
"//stack/include",
+ "//third_party/libchrome:base",
]
}
@@ -40,7 +42,7 @@ executable("test_vendor_lib_test") {
]
deps = [
- "//third_party/gtest:gtest_main",
+ "//third_party/googletest:gtest_main",
"//third_party/libchrome:base",
"//vendor_libs/test_vendor_lib",
]