1// Copyright (C) 2016 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 16package { 17 // See: http://go/android-license-faq 18 // A large-scale-change added 'default_applicable_licenses' to import 19 // all of the 'license_kinds' from "system_tools_hidl_license" 20 // to get the below license kinds: 21 // SPDX-license-identifier-Apache-2.0 22 default_applicable_licenses: ["system_tools_hidl_license"], 23} 24 25genrule { 26 name: "c2hal_test_genc++_headers", 27 tools: [ 28 "c2hal", 29 "hidl-gen", 30 ], 31 cmd: "$(location c2hal) -o $(genDir)/c2hal_test/1.0 " + 32 " -p android.hardware.c2hal_test@1.0 $(in) && " + 33 "$(location hidl-gen) -o $(genDir) -Lc++ " + 34 " -r android.hardware:$(genDir) " + 35 " -r android.hidl:system/libhidl/transport " + 36 " android.hardware.c2hal_test@1.0", 37 srcs: [ 38 "simple.h", 39 ], 40 out: [ 41 "android/hardware/c2hal_test/1.0/BnHwSimple.h", 42 "android/hardware/c2hal_test/1.0/BpHwSimple.h", 43 "android/hardware/c2hal_test/1.0/BsSimple.h", 44 "android/hardware/c2hal_test/1.0/IHwSimple.h", 45 "android/hardware/c2hal_test/1.0/ISimple.h", 46 "android/hardware/c2hal_test/1.0/BnHwSimpleLocation.h", 47 "android/hardware/c2hal_test/1.0/BpHwSimpleLocation.h", 48 "android/hardware/c2hal_test/1.0/BsSimpleLocation.h", 49 "android/hardware/c2hal_test/1.0/IHwSimpleLocation.h", 50 "android/hardware/c2hal_test/1.0/ISimpleLocation.h", 51 "android/hardware/c2hal_test/1.0/types.h", 52 "android/hardware/c2hal_test/1.0/hwtypes.h", 53 ], 54} 55 56genrule { 57 name: "c2hal_test_genc++", 58 tools: [ 59 "c2hal", 60 "hidl-gen", 61 ], 62 cmd: "$(location c2hal) -o $(genDir)/c2hal_test/1.0 " + 63 " -p android.hardware.c2hal_test@1.0 $(in) && " + 64 "$(location hidl-gen) -o $(genDir) -Lc++ " + 65 " -r android.hardware:$(genDir) " + 66 " -r android.hidl:system/libhidl/transport " + 67 " android.hardware.c2hal_test@1.0", 68 srcs: [ 69 "simple.h", 70 ], 71 out: [ 72 "android/hardware/c2hal_test/1.0/SimpleAll.cpp", 73 "android/hardware/c2hal_test/1.0/types.cpp", 74 ], 75} 76 77cc_test_library { 78 name: "c2hal_test", 79 defaults: ["hidl-module-defaults"], 80 generated_headers: ["c2hal_test_genc++_headers"], 81 generated_sources: ["c2hal_test_genc++"], 82 export_generated_headers: ["c2hal_test_genc++_headers"], 83 shared_libs: [ 84 "libhidlbase", 85 "liblog", 86 "libutils", 87 "libcutils", 88 ], 89 gtest: false, 90} 91