Dan Willemsen | d3eac26 | 2017-09-08 22:47:47 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2014 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 | // |
| 16 | |
| 17 | // ========================================================== |
| 18 | // Setup some common variables for the different build |
| 19 | // targets here. |
| 20 | // ========================================================== |
| 21 | |
Bob Badour | 051ef78 | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 22 | package { |
| 23 | // See: http://go/android-license-faq |
| 24 | // A large-scale-change added 'default_applicable_licenses' to import |
| 25 | // all of the 'license_kinds' from "frameworks_base_license" |
| 26 | // to get the below license kinds: |
| 27 | // SPDX-license-identifier-Apache-2.0 |
| 28 | default_applicable_licenses: ["frameworks_base_license"], |
| 29 | } |
| 30 | |
Dan Willemsen | d3eac26 | 2017-09-08 22:47:47 -0700 | [diff] [blame] | 31 | cc_defaults { |
| 32 | name: "split-select_defaults", |
| 33 | |
| 34 | cflags: [ |
| 35 | "-Wall", |
| 36 | "-Werror", |
| 37 | ], |
| 38 | include_dirs: ["frameworks/base/tools"], |
| 39 | static_libs: [ |
| 40 | "libaapt", |
| 41 | "libandroidfw", |
| 42 | "libpng", |
| 43 | "libutils", |
| 44 | "liblog", |
| 45 | "libcutils", |
| 46 | "libexpat", |
| 47 | "libziparchive", |
| 48 | "libbase", |
| 49 | "libz", |
| 50 | ], |
Dan Willemsen | d3eac26 | 2017-09-08 22:47:47 -0700 | [diff] [blame] | 51 | |
| 52 | target: { |
| 53 | windows: { |
| 54 | enabled: true, |
| 55 | }, |
| 56 | }, |
| 57 | |
| 58 | // This tool is prebuilt if we're doing an app-only build. |
| 59 | product_variables: { |
Dan Willemsen | d3eac26 | 2017-09-08 22:47:47 -0700 | [diff] [blame] | 60 | unbundled_build: { |
| 61 | enabled: false, |
| 62 | }, |
| 63 | }, |
| 64 | } |
| 65 | |
| 66 | // ========================================================== |
| 67 | // Build the host static library: libsplit-select |
| 68 | // ========================================================== |
| 69 | cc_library_host_static { |
| 70 | name: "libsplit-select", |
| 71 | defaults: ["split-select_defaults"], |
| 72 | |
| 73 | srcs: [ |
| 74 | "Abi.cpp", |
| 75 | "Grouper.cpp", |
| 76 | "Rule.cpp", |
| 77 | "RuleGenerator.cpp", |
| 78 | "SplitDescription.cpp", |
| 79 | "SplitSelector.cpp", |
| 80 | ], |
| 81 | cflags: ["-D_DARWIN_UNLIMITED_STREAMS"], |
| 82 | |
| 83 | } |
| 84 | |
| 85 | // ========================================================== |
| 86 | // Build the host tests: libsplit-select_tests |
| 87 | // ========================================================== |
| 88 | cc_test_host { |
| 89 | name: "libsplit-select_tests", |
| 90 | defaults: ["split-select_defaults"], |
| 91 | |
| 92 | srcs: [ |
| 93 | "Grouper_test.cpp", |
| 94 | "Rule_test.cpp", |
| 95 | "RuleGenerator_test.cpp", |
| 96 | "SplitSelector_test.cpp", |
| 97 | "TestRules.cpp", |
| 98 | ], |
| 99 | |
| 100 | static_libs: ["libsplit-select"], |
| 101 | |
| 102 | } |
| 103 | |
| 104 | // ========================================================== |
| 105 | // Build the host executable: split-select |
| 106 | // ========================================================== |
| 107 | cc_binary_host { |
| 108 | name: "split-select", |
| 109 | defaults: ["split-select_defaults"], |
| 110 | srcs: ["Main.cpp"], |
| 111 | |
| 112 | static_libs: ["libsplit-select"], |
| 113 | } |