Tri Vo | df20579 | 2019-01-30 09:24:19 -0800 | [diff] [blame] | 1 | // Copyright (C) 2018 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | aidl_interface { |
| 16 | name: "ashmemd_aidl_interface", |
| 17 | local_include_dir: "aidl", |
| 18 | srcs: [ |
| 19 | "aidl/android/ashmemd/IAshmemDeviceService.aidl", |
| 20 | ], |
| 21 | } |
| 22 | |
| 23 | cc_defaults { |
| 24 | name: "ashmemd_defaults", |
| 25 | shared_libs: [ |
| 26 | "ashmemd_aidl_interface-cpp", |
| 27 | "libbase", |
| 28 | "libbinder", |
| 29 | "libutils", |
| 30 | ], |
| 31 | cflags: [ |
| 32 | "-Wall", |
| 33 | "-Werror", |
| 34 | ], |
| 35 | } |
| 36 | |
| 37 | cc_binary { |
| 38 | name: "ashmemd", |
| 39 | defaults: ["ashmemd_defaults"], |
| 40 | srcs: ["ashmemd.cpp"], |
| 41 | init_rc: ["ashmemd.rc"], |
| 42 | } |
| 43 | |
| 44 | // This library is used to communicate with ashmemd using dlopen/dlsym. We do |
| 45 | // this to avoid shared library dependecy cycles. |
| 46 | cc_library { |
| 47 | name: "libashmemd_client", |
| 48 | defaults: ["ashmemd_defaults"], |
| 49 | srcs: ["ashmemd_client.cpp"], |
| 50 | cflags: [ |
| 51 | "-Wexit-time-destructors", |
| 52 | "-fno-c++-static-destructors", |
| 53 | ], |
| 54 | } |
| 55 | |
| 56 | cc_test { |
| 57 | name: "ashmemd_test", |
| 58 | defaults: ["ashmemd_defaults"], |
| 59 | srcs: ["tests/ashmemd_test.cpp"], |
Tri Vo | 085001a | 2019-03-22 16:45:29 -0700 | [diff] [blame] | 60 | test_suites: ["device-tests"], |
Tri Vo | df20579 | 2019-01-30 09:24:19 -0800 | [diff] [blame] | 61 | } |