summaryrefslogblamecommitdiffstats
blob: fea4d3869ddb2b55f63665980a9d8cd3903d7862 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                                           






                              
 

                     
                         
                                    


                  
                     
                      







                                          
                          
                           
                                 
                                     
                          


                           
                            
                          
                      
                    
      

             


                                      



                                  


                          
                            


                           


                                        


                                          



                  
                                    






                   

                

                                    
                  
                   



                      






                          













                                          
                
                           
                                    
                  

                   
      


                           
           
                                 

      
 
                   
                         
                                    














                                                                   
                           






                                     
                      














                                          
// Copyright (C) 2017 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.

subdirs = [
    "test"
]

cc_defaults {
    name: "libvintf-defaults",
    cflags: [
        "-Wall",
        "-Werror",
    ],
}

cc_library {
    name: "libvintf",
    host_supported: true,
    defaults: ["libvintf-defaults"],
    shared_libs: [
        "libbase",
        "liblog",
        "libselinux",
        "libtinyxml2",
    ],
    export_include_dirs: ["include"],
    local_include_dirs: ["include/vintf"],

    srcs: [
        "parse_string.cpp",
        "parse_xml.cpp",
        "CompatibilityMatrix.cpp",
        "HalManifest.cpp",
        "HalInterface.cpp",
        "KernelConfigParser.cpp",
        "KernelConfigTypedValue.cpp",
        "RuntimeInfo.cpp",
        "ManifestHal.cpp",
        "MatrixHal.cpp",
        "MatrixKernel.cpp",
        "TransportArch.cpp",
        "VintfObject.cpp",
        "XmlFile.cpp",
        "utils.cpp",
    ],

    target: {
        host: {
            srcs: [
                "RuntimeInfo-host.cpp"
            ],
            cflags: [
                "-DLIBVINTF_HOST",
            ],
        },
        android: {
            shared_libs: [
                "libcutils",
                "libutils",
                "libz"
            ],
            srcs: [
                "RuntimeInfo-target.cpp"
            ],
            cflags: ["-DLIBVINTF_TARGET"],
        },
    }
}

cc_binary {
    name: "vintf",
    defaults: ["libvintf-defaults"],
    shared_libs: [
        "libvintf",
    ],
    srcs: [
        "main.cpp"
    ],
}

cc_binary_host {
    name: "checkvintf",
    defaults: ["libvintf-defaults"],
    static_libs: [
        "libvintf",
        "libtinyxml2",
    ],
    shared_libs: [
        "libbase",
    ],
    srcs: [
        "check_vintf.cpp",
        "utils.cpp"
    ],
}

cc_library_static {
    name: "libassemblevintf",
    host_supported: true,
    defaults: ["libvintf-defaults"],
    shared_libs: [
        "libvintf",
        "libbase",
    ],
    srcs: [
        "AssembleVintf.cpp",
    ],
    export_include_dirs: ["include-test"],
}

cc_binary_host {
    name: "assemble_vintf",
    defaults: ["libvintf-defaults"],
    shared_libs: [
        "libvintf",
        "libbase",
    ],
    static_libs: [
        "libassemblevintf",
    ],
    srcs: [
        "assemble_vintf_main.cpp"
    ],
}

cc_library_static {
    name: "libvintftest",
    defaults: ["libvintf-defaults"],
    host_supported: true,
    shared_libs: [
        "libbase",
        "liblog",
        "libselinux",
        "libtinyxml2",
    ],
    export_include_dirs: ["include/vintf", "include", "test", "."],
    local_include_dirs: ["include/vintf", "test", "."],

    srcs: [
        "parse_string.cpp",
        "parse_xml.cpp",
        "CompatibilityMatrix.cpp",
        "HalManifest.cpp",
        "HalInterface.cpp",
        "KernelConfigTypedValue.cpp",
        "RuntimeInfo.cpp",
        "ManifestHal.cpp",
        "MatrixHal.cpp",
        "MatrixKernel.cpp",
        "TransportArch.cpp",
        "VintfObject.cpp",
        "XmlFile.cpp",
        "test/RuntimeInfo-fake.cpp",
        "test/utils-fake.cpp",
    ],

    target: {
        android: {
            shared_libs: [
                "libcutils",
                "libutils",
                "libz"
            ],
            cflags: ["-DLIBVINTF_TARGET"],
        },
    }
}