blob: 5e76279df64c5c35c30fd5635b6de0796572a811 [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",
Jiyong Park0b3c24b2017-05-26 17:57:18 +090097 "libvndksupport",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070098 ],
Dan Willemsene16bdb12016-07-13 00:20:20 -070099
100 sanitize: {
101 misc_undefined: ["integer"],
102 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700103 },
104
105 host: {
106 cflags: ["-DLIBUTILS_NATIVE=1"],
107
108 shared: {
109 enabled: false,
110 },
111 },
112
113 linux: {
114 srcs: [
115 "Looper.cpp",
116 "ProcessCallStack.cpp",
117 ],
118 },
Dan Willemsenab34b472016-11-29 13:32:55 -0800119 linux_bionic: {
120 enabled: true,
121 srcs: [
122 "Looper.cpp",
123 "ProcessCallStack.cpp",
124 ],
125 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700126
127 darwin: {
128 cflags: ["-Wno-unused-parameter"],
129 },
130
131 // Under MinGW, ctype.h doesn't need multi-byte support
132 windows: {
133 cflags: ["-DMB_CUR_MAX=1"],
134
135 enabled: true,
136 },
137 },
138
139 clang: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700140}
141
142// Include subdirectory makefiles
143// ============================================================
144
145cc_test {
146 name: "SharedBufferTest",
147 host_supported: true,
Colin Cross2fedbf72016-07-12 23:43:18 -0700148 static_libs: ["libutils"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700149 shared_libs: ["liblog"],
150 srcs: ["SharedBufferTest.cpp"],
151}
152
153subdirs = ["tests"]