Home | History | Annotate | Download | only in contexthubhal
      1 //
      2 // Copyright (C) 2018 The Android Open Source Project
      3 //
      4 // Licensed under the Apache License, Version 2.0 (the "License");
      5 // you may not use this file except in compliance with the License.
      6 // You may obtain a copy of the License at
      7 //
      8 //      http://www.apache.org/licenses/LICENSE-2.0
      9 //
     10 // Unless required by applicable law or agreed to in writing, software
     11 // distributed under the License is distributed on an "AS IS" BASIS,
     12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 // See the License for the specific language governing permissions and
     14 // limitations under the License.
     15 cc_defaults {
     16     name: "contexthub_libs_default",
     17     relative_install_path: "hw",
     18     srcs: [
     19         "nanohubhal.cpp",
     20         "nanohubhal_default.cpp",
     21         "system_comms.cpp",
     22     ],
     23     cflags: ["-Wall", "-Werror", "-Wextra"],
     24     shared_libs: [
     25         "liblog",
     26         "libcutils",
     27         "libutils",
     28         "libstagefright_foundation",
     29     ],
     30     static_libs: [
     31         "libjsoncpp",
     32         "libhubutilcommon",
     33     ],
     34     header_libs: [
     35         "libnanohub_common_headers",
     36         "libhardware_headers",
     37         "libutils_headers",
     38     ],
     39     vendor: true,
     40 }
     41 
     42 cc_defaults {
     43     name: "contexthub_hidl_libs_default",
     44     srcs: [
     45         "NanohubHidlAdapter.cpp",
     46     ],
     47     shared_libs: [
     48         "libhidlbase",
     49         "libhidltransport",
     50         "android.hardware.contexthub (a] 1.0",
     51     ],
     52 }
     53 
     54 cc_library {
     55     name: "context_hub.default",
     56     srcs: [
     57         "legacyhal.cpp",
     58     ],
     59     defaults: [
     60         "contexthub_libs_default",
     61     ],
     62 }
     63 
     64 cc_library_shared {
     65     name: "android.hardware.contexthub (a] 1.0-impl.nanohub",
     66     shared_libs: [
     67         "libbase",
     68     ],
     69     defaults: [
     70         "contexthub_libs_default",
     71         "contexthub_hidl_libs_default",
     72     ],
     73 }
     74 
     75 cc_binary {
     76     name: "android.hardware.contexthub (a] 1.0-service.nanohub",
     77     init_rc: ["android.hardware.contexthub (a] 1.0-service.nanohub.rc"],
     78     srcs: [
     79         "service.cpp",
     80     ],
     81     shared_libs: [
     82         "libhwbinder",
     83     ],
     84     defaults: [
     85         "contexthub_libs_default",
     86         "contexthub_hidl_libs_default",
     87     ],
     88 }
     89