| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | # 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 |  | 
|  | 15 | LOCAL_PATH:= $(call my-dir) | 
|  | 16 |  | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 17 | commonSources:= \ | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 18 | CallStack.cpp \ | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 19 | FileMap.cpp \ | 
| Raph Levien | b6ea175 | 2012-10-25 23:11:13 -0700 | [diff] [blame] | 20 | JenkinsHash.cpp \ | 
| Jason Simmons | b86c8e4 | 2011-06-28 17:43:30 -0700 | [diff] [blame] | 21 | LinearTransform.cpp \ | 
| Jeff Brown | 6454f46 | 2012-08-10 20:44:39 -0700 | [diff] [blame] | 22 | Log.cpp \ | 
| Jesse Hall | 29cc9ce | 2014-03-03 10:52:14 -0800 | [diff] [blame] | 23 | NativeHandle.cpp \ | 
| Igor Murashkin | ec79ef2 | 2013-10-24 17:09:15 -0700 | [diff] [blame] | 24 | Printer.cpp \ | 
| Jeff Brown | 04cbbc1 | 2010-11-29 17:37:49 -0800 | [diff] [blame] | 25 | PropertyMap.cpp \ | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 26 | RefBase.cpp \ | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 27 | SharedBuffer.cpp \ | 
|  | 28 | Static.cpp \ | 
|  | 29 | StopWatch.cpp \ | 
|  | 30 | String8.cpp \ | 
|  | 31 | String16.cpp \ | 
|  | 32 | SystemClock.cpp \ | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 33 | Threads.cpp \ | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 34 | Timers.cpp \ | 
| Jeff Brown | 647925d | 2010-11-10 16:03:06 -0800 | [diff] [blame] | 35 | Tokenizer.cpp \ | 
| Kenny Root | ba0165b | 2010-11-09 14:37:23 -0800 | [diff] [blame] | 36 | Unicode.cpp \ | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 37 | VectorImpl.cpp \ | 
| Elliott Hughes | dec12b2 | 2015-02-02 17:31:27 -0800 | [diff] [blame] | 38 | misc.cpp \ | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 39 |  | 
| Mark Salyzyn | 5bed803 | 2014-04-30 11:10:46 -0700 | [diff] [blame] | 40 | host_commonCflags := -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -Werror | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 41 |  | 
| Andrew Hsieh | a19d2c7 | 2012-03-13 00:55:34 -0700 | [diff] [blame] | 42 | # For the host | 
|  | 43 | # ===================================================== | 
|  | 44 | include $(CLEAR_VARS) | 
|  | 45 | LOCAL_SRC_FILES:= $(commonSources) | 
| Dan Willemsen | 86cf941 | 2016-02-03 23:29:32 -0800 | [diff] [blame] | 46 | LOCAL_SRC_FILES_linux := Looper.cpp ProcessCallStack.cpp | 
| Dan Willemsen | 87a419c | 2015-08-13 14:43:34 -0700 | [diff] [blame] | 47 | LOCAL_CFLAGS_darwin := -Wno-unused-parameter | 
| Andrew Hsieh | a19d2c7 | 2012-03-13 00:55:34 -0700 | [diff] [blame] | 48 | LOCAL_MODULE:= libutils | 
| Colin Cross | 946003a | 2013-07-23 17:39:35 -0700 | [diff] [blame] | 49 | LOCAL_STATIC_LIBRARIES := liblog | 
| Andrew Hsieh | a19d2c7 | 2012-03-13 00:55:34 -0700 | [diff] [blame] | 50 | LOCAL_CFLAGS += $(host_commonCflags) | 
| Dan Willemsen | 87a419c | 2015-08-13 14:43:34 -0700 | [diff] [blame] | 51 | # Under MinGW, ctype.h doesn't need multi-byte support | 
|  | 52 | LOCAL_CFLAGS_windows := -DMB_CUR_MAX=1 | 
| Ian Rogers | 59ec765 | 2014-06-05 14:32:49 -0700 | [diff] [blame] | 53 | LOCAL_MULTILIB := both | 
| Dan Willemsen | 87a419c | 2015-08-13 14:43:34 -0700 | [diff] [blame] | 54 | LOCAL_MODULE_HOST_OS := darwin linux windows | 
| Narayan Kamath | c609c31 | 2015-08-28 12:59:48 +0100 | [diff] [blame] | 55 | LOCAL_C_INCLUDES += external/safe-iop/include | 
| Andrew Hsieh | a19d2c7 | 2012-03-13 00:55:34 -0700 | [diff] [blame] | 56 | include $(BUILD_HOST_STATIC_LIBRARY) | 
|  | 57 |  | 
|  | 58 |  | 
| Bjorn Bringert | 00c14b4 | 2013-03-22 14:26:33 +0000 | [diff] [blame] | 59 | # For the device, static | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 60 | # ===================================================== | 
|  | 61 | include $(CLEAR_VARS) | 
|  | 62 |  | 
|  | 63 |  | 
|  | 64 | # we have the common sources, plus some device-specific stuff | 
|  | 65 | LOCAL_SRC_FILES:= \ | 
|  | 66 | $(commonSources) \ | 
| Michael Lentine | 6078805 | 2015-05-18 13:04:01 -0700 | [diff] [blame] | 67 | BlobCache.cpp \ | 
| Jamie Gennis | 2ccfe1a | 2012-02-23 11:28:28 -0800 | [diff] [blame] | 68 | Looper.cpp \ | 
| Dan Willemsen | 86cf941 | 2016-02-03 23:29:32 -0800 | [diff] [blame] | 69 | ProcessCallStack.cpp \ | 
| Jamie Gennis | 2ccfe1a | 2012-02-23 11:28:28 -0800 | [diff] [blame] | 70 | Trace.cpp | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 71 |  | 
| Chris Craik | 551fcf4 | 2012-12-05 10:36:45 -0800 | [diff] [blame] | 72 | ifeq ($(TARGET_ARCH),mips) | 
|  | 73 | LOCAL_CFLAGS += -DALIGN_DOUBLE | 
|  | 74 | endif | 
| Dimitry Ivanov | 2c7960c | 2016-02-25 11:44:35 -0800 | [diff] [blame] | 75 | LOCAL_CFLAGS += -Werror -fvisibility=protected | 
| Chris Craik | 551fcf4 | 2012-12-05 10:36:45 -0800 | [diff] [blame] | 76 |  | 
| Bjorn Bringert | 00c14b4 | 2013-03-22 14:26:33 +0000 | [diff] [blame] | 77 | LOCAL_STATIC_LIBRARIES := \ | 
| Michael Lentine | 6078805 | 2015-05-18 13:04:01 -0700 | [diff] [blame] | 78 | libcutils \ | 
|  | 79 | libc | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 80 |  | 
| Bjorn Bringert | 00c14b4 | 2013-03-22 14:26:33 +0000 | [diff] [blame] | 81 | LOCAL_SHARED_LIBRARIES := \ | 
| Dan Albert | 7bc49a1 | 2014-05-30 19:40:58 +0000 | [diff] [blame] | 82 | libbacktrace \ | 
| Bjorn Bringert | 00c14b4 | 2013-03-22 14:26:33 +0000 | [diff] [blame] | 83 | liblog \ | 
|  | 84 | libdl | 
|  | 85 |  | 
| Evgenii Stepanov | 6aaf740 | 2015-06-12 13:10:55 -0700 | [diff] [blame] | 86 | LOCAL_MODULE := libutils | 
| Nick Kralevich | 4d587f2 | 2015-08-24 10:51:38 -0700 | [diff] [blame] | 87 | LOCAL_CLANG := true | 
|  | 88 | LOCAL_SANITIZE := integer | 
| Narayan Kamath | c609c31 | 2015-08-28 12:59:48 +0100 | [diff] [blame] | 89 | LOCAL_C_INCLUDES += external/safe-iop/include | 
| Bjorn Bringert | 00c14b4 | 2013-03-22 14:26:33 +0000 | [diff] [blame] | 90 | include $(BUILD_STATIC_LIBRARY) | 
|  | 91 |  | 
|  | 92 | # For the device, shared | 
|  | 93 | # ===================================================== | 
|  | 94 | include $(CLEAR_VARS) | 
|  | 95 | LOCAL_MODULE:= libutils | 
|  | 96 | LOCAL_WHOLE_STATIC_LIBRARIES := libutils | 
|  | 97 | LOCAL_SHARED_LIBRARIES := \ | 
| Dan Albert | 7bc49a1 | 2014-05-30 19:40:58 +0000 | [diff] [blame] | 98 | libbacktrace \ | 
| Bjorn Bringert | 00c14b4 | 2013-03-22 14:26:33 +0000 | [diff] [blame] | 99 | libcutils \ | 
|  | 100 | libdl \ | 
| Mark Salyzyn | 5bed803 | 2014-04-30 11:10:46 -0700 | [diff] [blame] | 101 | liblog | 
|  | 102 | LOCAL_CFLAGS := -Werror | 
| Narayan Kamath | c609c31 | 2015-08-28 12:59:48 +0100 | [diff] [blame] | 103 | LOCAL_C_INCLUDES += external/safe-iop/include | 
| Christopher Ferris | 9b0e074 | 2013-10-31 16:25:04 -0700 | [diff] [blame] | 104 |  | 
| Nick Kralevich | 4d587f2 | 2015-08-24 10:51:38 -0700 | [diff] [blame] | 105 | LOCAL_CLANG := true | 
|  | 106 | LOCAL_SANITIZE := integer | 
| The Android Open Source Project | cbb1011 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 107 | include $(BUILD_SHARED_LIBRARY) | 
|  | 108 |  | 
| Sergio Giro | 7987b83 | 2015-08-18 17:36:50 +0100 | [diff] [blame] | 109 | include $(CLEAR_VARS) | 
|  | 110 | LOCAL_MODULE := SharedBufferTest | 
|  | 111 | LOCAL_STATIC_LIBRARIES := libutils | 
|  | 112 | LOCAL_SHARED_LIBRARIES := liblog | 
|  | 113 | LOCAL_SRC_FILES := SharedBufferTest.cpp | 
|  | 114 | include $(BUILD_NATIVE_TEST) | 
|  | 115 |  | 
|  | 116 | include $(CLEAR_VARS) | 
|  | 117 | LOCAL_MODULE := SharedBufferTest | 
|  | 118 | LOCAL_STATIC_LIBRARIES := libutils | 
|  | 119 | LOCAL_SHARED_LIBRARIES := liblog | 
|  | 120 | LOCAL_SRC_FILES := SharedBufferTest.cpp | 
|  | 121 | include $(BUILD_HOST_NATIVE_TEST) | 
| Jeff Brown | 7aba231 | 2010-06-30 16:10:35 -0700 | [diff] [blame] | 122 |  | 
| Elliott Hughes | dec12b2 | 2015-02-02 17:31:27 -0800 | [diff] [blame] | 123 | # Build the tests in the tests/ subdirectory. | 
| Jeff Brown | 7aba231 | 2010-06-30 16:10:35 -0700 | [diff] [blame] | 124 | include $(call first-makefiles-under,$(LOCAL_PATH)) |