// Copyright (C) 2018 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. aidl_interface { name: "ashmemd_aidl_interface", local_include_dir: "aidl", srcs: [ "aidl/android/ashmemd/IAshmemDeviceService.aidl", ], } cc_defaults { name: "ashmemd_defaults", shared_libs: [ "libbase", "libbinder", "libcutils", "libutils", "libhidlbase", ], cflags: [ "-Wall", "-Werror", ], } cc_binary { name: "ashmemd", defaults: ["ashmemd_defaults"], srcs: ["ashmemd.cpp"], shared_libs: [ "android.system.ashmem@1.0", "ashmemd_aidl_interface-cpp", ], init_rc: ["ashmemd.rc"], vintf_fragments: ["android.system.ashmem@1.0.xml"], } // This library is used to communicate with ashmemd using dlopen/dlsym. We do // this to avoid shared library dependency cycles. cc_library { name: "libashmemd_client", defaults: ["ashmemd_defaults"], srcs: ["ashmemd_client.cpp"], shared_libs: ["ashmemd_aidl_interface-cpp"], cflags: [ "-Wexit-time-destructors", "-fno-c++-static-destructors", ], } // This library is used to communicate with ashmemd using dlopen/dlsym. We do // this to avoid shared library dependency cycles. cc_library { name: "libashmemd_hidl_client", vendor: true, defaults: ["ashmemd_defaults"], srcs: ["ashmemd_hidl_client.cpp"], shared_libs: [ "android.system.ashmem@1.0", ], cflags: [ "-Wexit-time-destructors", "-fno-c++-static-destructors", ], } cc_test { name: "ashmemd_test", defaults: ["ashmemd_defaults"], srcs: ["tests/ashmemd_test.cpp"], shared_libs: [ "android.system.ashmem@1.0", "ashmemd_aidl_interface-cpp", ], test_suites: ["device-tests"], require_root: true, } cc_test { name: "ashmemd_hidl_client_test", vendor: true, defaults: ["ashmemd_defaults"], srcs: ["tests/ashmemd_hidl_client_test.cpp"], shared_libs: ["android.system.ashmem@1.0"], test_suites: ["device-tests"], }