blob: 88c9efdf016a322a3d8f75ef255bf6ca13521a6b [file] [log] [blame]
Dan Willemsen2e1591b2016-07-12 17:20:18 -07001// Copyright (C) 2008 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080015cc_library_headers {
16 name: "libutils_headers",
Steven Moreland91527ed2017-04-11 12:43:16 -070017 vendor_available: true,
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080018 host_supported: true,
19 export_include_dirs: ["include"],
20 target: {
Dan Willemsene0cd1e02017-03-15 15:23:36 -070021 linux_bionic: {
22 enabled: true,
23 },
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080024 windows: {
Dan Willemsene0cd1e02017-03-15 15:23:36 -070025 enabled: true,
26 },
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080027 },
28}
29
Dan Willemsen2e1591b2016-07-12 17:20:18 -070030cc_library {
31 name: "libutils",
Steven Moreland91527ed2017-04-11 12:43:16 -070032 vendor_available: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -070033 host_supported: true,
34
35 srcs: [
36 "CallStack.cpp",
37 "FileMap.cpp",
38 "JenkinsHash.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070039 "Log.cpp",
40 "NativeHandle.cpp",
41 "Printer.cpp",
42 "PropertyMap.cpp",
43 "RefBase.cpp",
44 "SharedBuffer.cpp",
45 "Static.cpp",
46 "StopWatch.cpp",
47 "String8.cpp",
48 "String16.cpp",
Hans Boehm7f0b2602017-03-15 11:01:03 -070049 "StrongPointer.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070050 "SystemClock.cpp",
51 "Threads.cpp",
52 "Timers.cpp",
53 "Tokenizer.cpp",
54 "Unicode.cpp",
55 "VectorImpl.cpp",
56 "misc.cpp",
57 ],
58
59 cflags: ["-Werror"],
60 include_dirs: ["external/safe-iop/include"],
Steven Morelandb084bc32017-04-12 18:57:57 -070061 header_libs: [
62 "libsystem_headers",
63 "libutils_headers",
64 ],
65 export_header_lib_headers: [
66 "libsystem_headers",
67 "libutils_headers",
68 ],
Dan Willemsen2e1591b2016-07-12 17:20:18 -070069
70 arch: {
71 mips: {
72 cflags: ["-DALIGN_DOUBLE"],
73 },
74 },
75
76 target: {
77 android: {
78 srcs: [
Dan Willemsen2e1591b2016-07-12 17:20:18 -070079 "Looper.cpp",
80 "ProcessCallStack.cpp",
81 "Trace.cpp",
82 ],
83
84 cflags: ["-fvisibility=protected"],
85
86 shared_libs: [
87 "libbacktrace",
88 "libcutils",
89 "libdl",
90 "liblog",
91 ],
Dan Willemsene16bdb12016-07-13 00:20:20 -070092
93 sanitize: {
94 misc_undefined: ["integer"],
95 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -070096 },
97
98 host: {
99 cflags: ["-DLIBUTILS_NATIVE=1"],
100
101 shared: {
102 enabled: false,
103 },
104 },
105
106 linux: {
107 srcs: [
108 "Looper.cpp",
109 "ProcessCallStack.cpp",
110 ],
111 },
Dan Willemsenab34b472016-11-29 13:32:55 -0800112 linux_bionic: {
113 enabled: true,
114 srcs: [
115 "Looper.cpp",
116 "ProcessCallStack.cpp",
117 ],
118 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700119
120 darwin: {
121 cflags: ["-Wno-unused-parameter"],
122 },
123
124 // Under MinGW, ctype.h doesn't need multi-byte support
125 windows: {
126 cflags: ["-DMB_CUR_MAX=1"],
127
128 enabled: true,
129 },
130 },
131
132 clang: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700133}
134
135// Include subdirectory makefiles
136// ============================================================
137
138cc_test {
139 name: "SharedBufferTest",
140 host_supported: true,
Colin Cross2fedbf72016-07-12 23:43:18 -0700141 static_libs: ["libutils"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700142 shared_libs: ["liblog"],
143 srcs: ["SharedBufferTest.cpp"],
144}
145
146subdirs = ["tests"]