Andrew Scull | 599e791 | 2017-09-14 14:00:36 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2017 The Android Open Source Project |
| 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 | subdirs = [ |
Andrew Scull | 98837ec | 2017-09-14 14:18:35 +0100 | [diff] [blame] | 18 | "generator", |
Andrew Scull | 599e791 | 2017-09-14 14:00:36 +0100 | [diff] [blame] | 19 | "test", |
| 20 | ] |
| 21 | |
| 22 | cc_library { |
| 23 | name: "libnos", |
Allen Webb | fbf534f | 2017-09-14 14:29:00 -0700 | [diff] [blame] | 24 | srcs: [ |
Andrew Scull | 96517d8 | 2017-10-09 12:53:19 +0100 | [diff] [blame] | 25 | "debug.cpp", |
Allen Webb | fbf534f | 2017-09-14 14:29:00 -0700 | [diff] [blame] | 26 | ], |
Andrew Scull | 599e791 | 2017-09-14 14:00:36 +0100 | [diff] [blame] | 27 | defaults: ["nos_shared_cc_defaults"], |
Andrew Scull | 87a2caf | 2017-10-11 14:07:24 +0100 | [diff] [blame^] | 28 | header_libs: ["nos_headers"], |
| 29 | shared_libs: ["libnos_datagram"], |
| 30 | export_include_dirs: ["include"], |
Andrew Scull | 96517d8 | 2017-10-09 12:53:19 +0100 | [diff] [blame] | 31 | export_shared_lib_headers: ["libnos_datagram"], |
Andrew Scull | 599e791 | 2017-09-14 14:00:36 +0100 | [diff] [blame] | 32 | } |
Andrew Scull | 87a2caf | 2017-10-11 14:07:24 +0100 | [diff] [blame^] | 33 | |
| 34 | // This part of libnos must be linked with the target's implementation of |
| 35 | // libnos_datagram. A library should be created for this such as: |
| 36 | // |
| 37 | // cc_library { |
| 38 | // name: "libnos_client_xxx", |
| 39 | // srcs: [":libnos_client"], |
| 40 | // defaults: ["libnos_client_defaults"], |
| 41 | // shared_libs: ["libnos_datagram_xxx"], |
| 42 | // } |
| 43 | // |
| 44 | // Components that directly use `NuggetClient` must link against it. Other |
| 45 | // components should be written against `NuggetClientInterface` and can simply |
| 46 | // link against `libnos`. |
| 47 | |
| 48 | filegroup { |
| 49 | name: "libnos_client", |
| 50 | srcs: ["NuggetClient.cpp"], |
| 51 | } |
| 52 | |
| 53 | cc_defaults { |
| 54 | name: "libnos_client_defaults", |
| 55 | header_libs: ["nos_headers"], |
| 56 | shared_libs: [ |
| 57 | "libnos", |
| 58 | "libnos_transport", |
| 59 | ], |
| 60 | } |