blob: ec9d42a2dc6462db86634a939ef64d89e1f0767b [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 Badour051ef782021-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 ],
Dan Willemsend3eac262017-09-08 22:47:47 -070051
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 Willemsend3eac262017-09-08 22:47:47 -070060 unbundled_build: {
61 enabled: false,
62 },
63 },
64}
65
66// ==========================================================
67// Build the host static library: libsplit-select
68// ==========================================================
69cc_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// ==========================================================
88cc_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// ==========================================================
107cc_binary_host {
108 name: "split-select",
109 defaults: ["split-select_defaults"],
110 srcs: ["Main.cpp"],
111
112 static_libs: ["libsplit-select"],
113}