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 16 genrule { 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 (a] 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 (a] 1.0::ISimple", 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 ], 38 } 39 40 genrule { 41 name: "c2hal_test_genc++", 42 tools: [ 43 "c2hal", 44 "hidl-gen", 45 ], 46 cmd: "$(location c2hal) -o $(genDir)/c2hal_test/1.0 " + 47 "-p android.hardware.c2hal_test (a] 1.0 $(in) && " + 48 "$(location hidl-gen) -o $(genDir) -Lc++ " + 49 "-r android.hardware:$(genDir) " + 50 "-r android.hidl:system/libhidl/transport " + 51 "android.hardware.c2hal_test (a] 1.0::ISimple", 52 srcs: [ 53 "simple.h", 54 ], 55 out: [ 56 "android/hardware/c2hal_test/1.0/SimpleAll.cpp", 57 ], 58 } 59 60 cc_library_shared { 61 name: "c2hal_test", 62 generated_headers: ["c2hal_test_genc++_headers"], 63 generated_sources: ["c2hal_test_genc++"], 64 export_generated_headers: ["c2hal_test_genc++_headers"], 65 shared_libs: [ 66 "libhidlbase", 67 "libhidltransport", 68 "libhwbinder", 69 "liblog", 70 "libutils", 71 "libcutils", 72 ], 73 } 74