blob: 696db3bdcc0911c4ac24e9e05f83a1f3b9c151c8 [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,
Steven Morelandd3b4b2c2017-04-13 21:01:40 -070019
20 header_libs: ["libsystem_headers",],
21 export_header_lib_headers: ["libsystem_headers",],
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080022 export_include_dirs: ["include"],
Steven Morelandd3b4b2c2017-04-13 21:01:40 -070023
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080024 target: {
Steven Morelandd3b4b2c2017-04-13 21:01:40 -070025 android: {
26 header_libs: ["libbacktrace_headers"],
27 export_header_lib_headers: ["libbacktrace_headers"],
28 },
Dan Willemsene0cd1e02017-03-15 15:23:36 -070029 linux_bionic: {
30 enabled: true,
31 },
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080032 windows: {
Dan Willemsene0cd1e02017-03-15 15:23:36 -070033 enabled: true,
34 },
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080035 },
36}
37
Dan Willemsen2e1591b2016-07-12 17:20:18 -070038cc_library {
39 name: "libutils",
Steven Moreland91527ed2017-04-11 12:43:16 -070040 vendor_available: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -070041 host_supported: true,
42
43 srcs: [
44 "CallStack.cpp",
45 "FileMap.cpp",
46 "JenkinsHash.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070047 "Log.cpp",
48 "NativeHandle.cpp",
49 "Printer.cpp",
50 "PropertyMap.cpp",
51 "RefBase.cpp",
52 "SharedBuffer.cpp",
53 "Static.cpp",
54 "StopWatch.cpp",
55 "String8.cpp",
56 "String16.cpp",
Hans Boehm7f0b2602017-03-15 11:01:03 -070057 "StrongPointer.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070058 "SystemClock.cpp",
59 "Threads.cpp",
60 "Timers.cpp",
61 "Tokenizer.cpp",
62 "Unicode.cpp",
63 "VectorImpl.cpp",
64 "misc.cpp",
65 ],
66
67 cflags: ["-Werror"],
68 include_dirs: ["external/safe-iop/include"],
Steven Morelandb084bc32017-04-12 18:57:57 -070069 header_libs: [
Steven Morelandb084bc32017-04-12 18:57:57 -070070 "libutils_headers",
71 ],
72 export_header_lib_headers: [
Steven Morelandb084bc32017-04-12 18:57:57 -070073 "libutils_headers",
74 ],
Dan Willemsen2e1591b2016-07-12 17:20:18 -070075
76 arch: {
77 mips: {
78 cflags: ["-DALIGN_DOUBLE"],
79 },
80 },
81
82 target: {
83 android: {
84 srcs: [
Dan Willemsen2e1591b2016-07-12 17:20:18 -070085 "Looper.cpp",
86 "ProcessCallStack.cpp",
87 "Trace.cpp",
88 ],
89
90 cflags: ["-fvisibility=protected"],
91
92 shared_libs: [
93 "libbacktrace",
94 "libcutils",
95 "libdl",
96 "liblog",
97 ],
Dan Willemsene16bdb12016-07-13 00:20:20 -070098
99 sanitize: {
100 misc_undefined: ["integer"],
101 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700102 },
103
104 host: {
105 cflags: ["-DLIBUTILS_NATIVE=1"],
106
107 shared: {
108 enabled: false,
109 },
110 },
111
112 linux: {
113 srcs: [
114 "Looper.cpp",
115 "ProcessCallStack.cpp",
116 ],
117 },
Dan Willemsenab34b472016-11-29 13:32:55 -0800118 linux_bionic: {
119 enabled: true,
120 srcs: [
121 "Looper.cpp",
122 "ProcessCallStack.cpp",
123 ],
124 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700125
126 darwin: {
127 cflags: ["-Wno-unused-parameter"],
128 },
129
130 // Under MinGW, ctype.h doesn't need multi-byte support
131 windows: {
132 cflags: ["-DMB_CUR_MAX=1"],
133
134 enabled: true,
135 },
136 },
137
138 clang: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700139}
140
141// Include subdirectory makefiles
142// ============================================================
143
144cc_test {
145 name: "SharedBufferTest",
146 host_supported: true,
Colin Cross2fedbf72016-07-12 23:43:18 -0700147 static_libs: ["libutils"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700148 shared_libs: ["liblog"],
149 srcs: ["SharedBufferTest.cpp"],
150}
151
152subdirs = ["tests"]