OSDN Git Service

DO NOT MERGE Add bound check for rfc_parse_data
[android-x86/system-bt.git] / osi / BUILD.gn
1 #
2 #  Copyright (C) 2015 Google, Inc.
3 #
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at:
7 #
8 #  http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15 #
16
17 static_library("osi") {
18   sources = [
19     "src/alarm.c",
20     "src/allocation_tracker.c",
21     "src/allocator.c",
22     "src/array.c",
23     "src/buffer.c",
24     "src/compat.c",
25     "src/config.c",
26     "src/data_dispatcher.c",
27     "src/eager_reader.c",
28     "src/fixed_queue.c",
29     "src/future.c",
30     "src/hash_functions.c",
31     "src/hash_map.c",
32     "src/hash_map_utils.c",
33     "src/list.c",
34     "src/metrics_linux.cpp",
35     "src/mutex.c",
36     "src/osi.c",
37     "src/properties.c",
38     "src/reactor.c",
39     "src/ringbuffer.c",
40     "src/semaphore.c",
41     "src/socket.c",
42
43     # TODO(mcchou): Remove these sources after platform specific
44     # dependencies are abstracted.
45     "src/socket_utils/socket_local_client.c",
46     "src/socket_utils/socket_local_server.c",
47     "src/thread.c",
48     "src/time.c",
49     "src/wakelock.c",
50   ]
51
52   include_dirs = [
53     "//",
54     "//utils/include",
55     "//stack/include",
56   ]
57 }
58
59 executable("net_test_osi") {
60   testonly = true
61   sources = [
62     "test/AlarmTestHarness.cpp",
63     "test/AllocationTestHarness.cpp",
64     "test/alarm_test.cpp",
65     "test/allocation_tracker_test.cpp",
66     "test/allocator_test.cpp",
67     "test/array_test.cpp",
68     "test/config_test.cpp",
69     "test/data_dispatcher_test.cpp",
70     "test/eager_reader_test.cpp",
71     "test/future_test.cpp",
72     "test/hash_map_test.cpp",
73     "test/hash_map_utils_test.cpp",
74     "test/leaky_bonded_queue_test.cpp",
75     "test/list_test.cpp",
76     "test/metrics_test.cpp",
77     "test/properties_test.cpp",
78     "test/rand_test.cpp",
79     "test/reactor_test.cpp",
80     "test/ringbuffer_test.cpp",
81     "test/thread_test.cpp",
82     "test/time_test.cpp",
83   ]
84
85   include_dirs = [
86     "//",
87     "//osi/test",
88   ]
89
90   deps = [
91     "//osi",
92     "//third_party/googletest:gtest_main",
93     "//third_party/googletest:gmock_main",
94     "//third_party/libchrome:base",
95   ]
96
97   libs = [
98     "-lpthread",
99     "-lrt",
100   ]
101 }