1# 2# Copyright 2017 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 17static_library("types") { 18 cflags = [ 19 "-fvisibility=default", 20 ] 21 22 sources = [ 23 "class_of_device.cc", 24 "bluetooth/uuid.cc", 25 "raw_address.cc", 26 ] 27 28 include_dirs = [ 29 "//bt/", 30 ] 31 32 configs += [ 33 "//bt:target_defaults", 34 ] 35} 36 37if (use.test) { 38 executable("net_test_types") { 39 sources = [ 40 "test/class_of_device_unittest.cc", 41 "test/raw_address_unittest.cc", 42 "test/bluetooth/uuid_unittest.cc", 43 ] 44 45 include_dirs = [ 46 "//bt/", 47 ] 48 49 libs = [ 50 "dl", 51 "pthread", 52 "resolv", 53 "rt", 54 "z", 55 ] 56 57 # For some reason, this is required for host build. Otherwise, I get 58 # a complaint from gmock: 59 # undefined reference to symbol 'pthread_getspecific@@GLIBC_2.2.5' 60 ldflags = [ 61 "-lpthread" 62 ] 63 64 deps = [ 65 ":types", 66 ] 67 68 configs += [ 69 "//bt:external_gmock_main", 70 "//bt:target_defaults", 71 ] 72 } 73} 74