Jack He | e2eeff4 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 1 | // libbtcore static library for target and host |
| 2 | // ======================================================== |
| 3 | cc_library_static { |
| 4 | name: "libbtcore", |
| 5 | defaults: ["fluoride_defaults"], |
| 6 | local_include_dirs: ["include"], |
| 7 | include_dirs: ["system/bt"], |
| 8 | srcs: [ |
Jack He | e2eeff4 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 9 | "src/device_class.cc", |
| 10 | "src/hal_util.cc", |
| 11 | "src/module.cc", |
| 12 | "src/osi_module.cc", |
| 13 | "src/property.cc", |
Jack He | e2eeff4 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 14 | ], |
| 15 | shared_libs: [ |
| 16 | "liblog", |
| 17 | ], |
Jakub Pawlowski | e56fabc | 2017-10-19 00:26:09 -0700 | [diff] [blame^] | 18 | header_libs: ["libbluetooth_headers"], |
Jack He | e2eeff4 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 19 | host_supported: true, |
| 20 | target: { |
| 21 | darwin: { |
| 22 | enabled: false, |
| 23 | }, |
Dan Willemsen | f6b1716 | 2017-10-02 10:41:11 -0700 | [diff] [blame] | 24 | linux_glibc: { |
Jack He | e2eeff4 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 25 | cflags: ["-D_GNU_SOURCE"], |
| 26 | }, |
| 27 | }, |
| 28 | } |
| 29 | |
| 30 | // Note: It's good to get the tests compiled both for the host and the target so |
| 31 | // we get to test with both Bionic libc and glibc |
| 32 | // libbtcore unit tests for target and host |
| 33 | // ======================================================== |
| 34 | cc_test { |
| 35 | name: "net_test_btcore", |
Dan Shi | 15fbcf0 | 2017-03-31 17:12:55 -0700 | [diff] [blame] | 36 | test_suites: ["device-tests"], |
Jack He | e2eeff4 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 37 | defaults: ["fluoride_defaults"], |
| 38 | local_include_dirs: ["include"], |
| 39 | include_dirs: ["system/bt"], |
| 40 | srcs: [ |
Jack He | e2eeff4 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 41 | "test/device_class_test.cc", |
| 42 | "test/property_test.cc", |
Jack He | e2eeff4 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 43 | ], |
| 44 | shared_libs: [ |
| 45 | "liblog", |
| 46 | ], |
| 47 | static_libs: [ |
| 48 | "libbtcore", |
| 49 | "libosi-AllocationTestHarness", |
| 50 | "libosi", |
| 51 | ], |
| 52 | host_supported: true, |
| 53 | target: { |
| 54 | darwin: { |
| 55 | enabled: false, |
| 56 | } |
| 57 | } |
| 58 | } |