The Android Open Source Project | 9066cfe | 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 | |
| 17 | # libutils is a little unique: It's built twice, once for the host |
| 18 | # and once for the device. |
| 19 | |
| 20 | commonSources:= \ |
| 21 | Asset.cpp \ |
| 22 | AssetDir.cpp \ |
| 23 | AssetManager.cpp \ |
Jamie Gennis | 9539d9f | 2011-04-28 16:19:45 -0700 | [diff] [blame] | 24 | BlobCache.cpp \ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 25 | BufferedTextOutput.cpp \ |
| 26 | CallStack.cpp \ |
| 27 | Debug.cpp \ |
| 28 | FileMap.cpp \ |
Mathias Agopian | c86727f | 2010-02-11 17:30:52 -0800 | [diff] [blame] | 29 | Flattenable.cpp \ |
Jason Simmons | aa11965 | 2011-06-28 17:43:30 -0700 | [diff] [blame] | 30 | LinearTransform.cpp \ |
Kenny Root | 7cee34a | 2010-06-01 10:34:29 -0700 | [diff] [blame] | 31 | ObbFile.cpp \ |
Jeff Brown | 47e6b1b | 2010-11-29 17:37:49 -0800 | [diff] [blame] | 32 | PropertyMap.cpp \ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 33 | RefBase.cpp \ |
| 34 | ResourceTypes.cpp \ |
| 35 | SharedBuffer.cpp \ |
| 36 | Static.cpp \ |
| 37 | StopWatch.cpp \ |
Christopher Tate | b100cbf | 2010-07-26 11:24:18 -0700 | [diff] [blame] | 38 | StreamingZipInflater.cpp \ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 39 | String8.cpp \ |
| 40 | String16.cpp \ |
Mathias Agopian | 8ed6beb | 2009-06-05 01:26:23 -0700 | [diff] [blame] | 41 | StringArray.cpp \ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 42 | SystemClock.cpp \ |
| 43 | TextOutput.cpp \ |
| 44 | Threads.cpp \ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 45 | Timers.cpp \ |
Jeff Brown | 6b53e8d | 2010-11-10 16:03:06 -0800 | [diff] [blame] | 46 | Tokenizer.cpp \ |
Kenny Root | 300ba68 | 2010-11-09 14:37:23 -0800 | [diff] [blame] | 47 | Unicode.cpp \ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 48 | VectorImpl.cpp \ |
Jeff Brown | d890cbf | 2010-06-13 20:21:19 -0700 | [diff] [blame] | 49 | ZipFileCRO.cpp \ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 50 | ZipFileRO.cpp \ |
| 51 | ZipUtils.cpp \ |
Mathias Agopian | e583a4e | 2009-06-05 15:11:23 -0700 | [diff] [blame] | 52 | misc.cpp |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 53 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 54 | |
| 55 | # For the host |
| 56 | # ===================================================== |
| 57 | |
| 58 | include $(CLEAR_VARS) |
| 59 | |
Mathias Agopian | 55e3d60 | 2009-06-05 14:56:35 -0700 | [diff] [blame] | 60 | LOCAL_SRC_FILES:= $(commonSources) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 61 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 62 | LOCAL_MODULE:= libutils |
| 63 | |
| 64 | LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) |
| 65 | LOCAL_C_INCLUDES += external/zlib |
| 66 | |
| 67 | ifeq ($(HOST_OS),windows) |
| 68 | ifeq ($(strip $(USE_CYGWIN),),) |
| 69 | # Under MinGW, ctype.h doesn't need multi-byte support |
| 70 | LOCAL_CFLAGS += -DMB_CUR_MAX=1 |
| 71 | endif |
| 72 | endif |
| 73 | |
Iliyan Malchev | 64ef6b4 | 2011-10-19 22:35:56 -0700 | [diff] [blame] | 74 | ifeq ($(TARGET_OS),linux) |
| 75 | LOCAL_LDLIBS += -lrt -ldl |
| 76 | endif |
| 77 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 78 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 79 | |
| 80 | |
| 81 | |
| 82 | # For the device |
| 83 | # ===================================================== |
| 84 | include $(CLEAR_VARS) |
| 85 | |
| 86 | |
| 87 | # we have the common sources, plus some device-specific stuff |
| 88 | LOCAL_SRC_FILES:= \ |
| 89 | $(commonSources) \ |
Jeff Brown | d890cbf | 2010-06-13 20:21:19 -0700 | [diff] [blame] | 90 | BackupData.cpp \ |
| 91 | BackupHelpers.cpp \ |
Jeff Brown | 4fe6c3e | 2010-09-13 23:17:30 -0700 | [diff] [blame] | 92 | Looper.cpp |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 93 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 94 | ifeq ($(TARGET_OS),linux) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 95 | LOCAL_LDLIBS += -lrt -ldl |
| 96 | endif |
| 97 | |
| 98 | LOCAL_C_INCLUDES += \ |
| 99 | external/zlib \ |
| 100 | external/icu4c/common |
Mathias Agopian | b1c4ca5 | 2009-07-12 23:11:20 -0700 | [diff] [blame] | 101 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 102 | LOCAL_LDLIBS += -lpthread |
| 103 | |
| 104 | LOCAL_SHARED_LIBRARIES := \ |
| 105 | libz \ |
| 106 | liblog \ |
Mathias Agopian | acde31e | 2011-09-28 17:33:11 -0700 | [diff] [blame] | 107 | libcutils \ |
| 108 | libdl |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 109 | |
| 110 | LOCAL_MODULE:= libutils |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 111 | include $(BUILD_SHARED_LIBRARY) |
| 112 | |
Dan Egnor | 08b3d2e | 2010-05-06 00:55:09 -0700 | [diff] [blame] | 113 | ifeq ($(TARGET_OS),linux) |
| 114 | include $(CLEAR_VARS) |
| 115 | LOCAL_C_INCLUDES += external/zlib external/icu4c/common |
| 116 | LOCAL_LDLIBS := -lrt -ldl -lpthread |
| 117 | LOCAL_MODULE := libutils |
| 118 | LOCAL_SRC_FILES := $(commonSources) BackupData.cpp BackupHelpers.cpp |
| 119 | include $(BUILD_STATIC_LIBRARY) |
| 120 | endif |
Jeff Brown | fd03582 | 2010-06-30 16:10:35 -0700 | [diff] [blame] | 121 | |
| 122 | |
| 123 | # Include subdirectory makefiles |
| 124 | # ============================================================ |
| 125 | |
| 126 | # If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework |
| 127 | # team really wants is to build the stuff defined by this makefile. |
| 128 | ifeq (,$(ONE_SHOT_MAKEFILE)) |
| 129 | include $(call first-makefiles-under,$(LOCAL_PATH)) |
Christopher Tate | b100cbf | 2010-07-26 11:24:18 -0700 | [diff] [blame] | 130 | endif |