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 16genrule { 17 name: "c2hal_test_genc++_headers", 18 tools: [ 19 "c2hal", 20 "hidl-gen", 21 ], 22 cmd: "$(location c2hal) -o $(genDir)/c2hal_test/1.0 " + 23 " -p android.hardware.c2hal_test@1.0 $(in) && " + 24 "$(location hidl-gen) -o $(genDir) -Lc++ " + 25 " -r android.hardware:$(genDir) " + 26 " -r android.hidl:system/libhidl/transport " + 27 " android.hardware.c2hal_test@1.0", 28 srcs: [ 29 "simple.h", 30 ], 31 out: [ 32 "android/hardware/c2hal_test/1.0/BnHwSimple.h", 33 "android/hardware/c2hal_test/1.0/BpHwSimple.h", 34 "android/hardware/c2hal_test/1.0/BsSimple.h", 35 "android/hardware/c2hal_test/1.0/IHwSimple.h", 36 "android/hardware/c2hal_test/1.0/ISimple.h", 37 "android/hardware/c2hal_test/1.0/BnHwSimpleLocation.h", 38 "android/hardware/c2hal_test/1.0/BpHwSimpleLocation.h", 39 "android/hardware/c2hal_test/1.0/BsSimpleLocation.h", 40 "android/hardware/c2hal_test/1.0/IHwSimpleLocation.h", 41 "android/hardware/c2hal_test/1.0/ISimpleLocation.h", 42 "android/hardware/c2hal_test/1.0/types.h", 43 "android/hardware/c2hal_test/1.0/hwtypes.h", 44 ], 45} 46 47genrule { 48 name: "c2hal_test_genc++", 49 tools: [ 50 "c2hal", 51 "hidl-gen", 52 ], 53 cmd: "$(location c2hal) -o $(genDir)/c2hal_test/1.0 " + 54 " -p android.hardware.c2hal_test@1.0 $(in) && " + 55 "$(location hidl-gen) -o $(genDir) -Lc++ " + 56 " -r android.hardware:$(genDir) " + 57 " -r android.hidl:system/libhidl/transport " + 58 " android.hardware.c2hal_test@1.0", 59 srcs: [ 60 "simple.h", 61 ], 62 out: [ 63 "android/hardware/c2hal_test/1.0/SimpleAll.cpp", 64 "android/hardware/c2hal_test/1.0/types.cpp", 65 ], 66} 67 68cc_test_library { 69 name: "c2hal_test", 70 defaults: ["hidl-module-defaults"], 71 generated_headers: ["c2hal_test_genc++_headers"], 72 generated_sources: ["c2hal_test_genc++"], 73 export_generated_headers: ["c2hal_test_genc++_headers"], 74 shared_libs: [ 75 "libhidlbase", 76 "libhidltransport", 77 "libhwbinder", 78 "liblog", 79 "libutils", 80 "libcutils", 81 ], 82 gtest: false, 83} 84