blob: c12fc6a7f25391e156e53a443183d10e79c059b0 [file] [log] [blame]
Dan Willemsend3eac262017-09-08 22:47:47 -07001//
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 Badour8a6a2bc2021-02-12 17:07:05 -080022package {
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 Willemsend3eac262017-09-08 22:47:47 -070031cc_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 ],
51 group_static_libs: true,
52
53 target: {
54 windows: {
55 enabled: true,
56 },
57 },
58
59 // This tool is prebuilt if we're doing an app-only build.
60 product_variables: {
61 pdk: {
62 enabled: false,
63 },
64 unbundled_build: {
65 enabled: false,
66 },
67 },
68}
69
70// ==========================================================
71// Build the host static library: libsplit-select
72// ==========================================================
73cc_library_host_static {
74 name: "libsplit-select",
75 defaults: ["split-select_defaults"],
76
77 srcs: [
78 "Abi.cpp",
79 "Grouper.cpp",
80 "Rule.cpp",
81 "RuleGenerator.cpp",
82 "SplitDescription.cpp",
83 "SplitSelector.cpp",
84 ],
85 cflags: ["-D_DARWIN_UNLIMITED_STREAMS"],
86
87}
88
89// ==========================================================
90// Build the host tests: libsplit-select_tests
91// ==========================================================
92cc_test_host {
93 name: "libsplit-select_tests",
94 defaults: ["split-select_defaults"],
95
96 srcs: [
97 "Grouper_test.cpp",
98 "Rule_test.cpp",
99 "RuleGenerator_test.cpp",
100 "SplitSelector_test.cpp",
101 "TestRules.cpp",
102 ],
103
104 static_libs: ["libsplit-select"],
105
106}
107
108// ==========================================================
109// Build the host executable: split-select
110// ==========================================================
111cc_binary_host {
112 name: "split-select",
113 defaults: ["split-select_defaults"],
114 srcs: ["Main.cpp"],
115
116 static_libs: ["libsplit-select"],
117}