2009-03-04 04:31:44 +01:00
|
|
|
# Copyright (C) 2008 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
|
|
|
|
# libutils is a little unique: It's built twice, once for the host
|
|
|
|
# and once for the device.
|
|
|
|
|
|
|
|
commonSources:= \
|
|
|
|
Asset.cpp \
|
|
|
|
AssetDir.cpp \
|
|
|
|
AssetManager.cpp \
|
2011-04-29 01:19:45 +02:00
|
|
|
BlobCache.cpp \
|
2009-03-04 04:31:44 +01:00
|
|
|
BufferedTextOutput.cpp \
|
|
|
|
CallStack.cpp \
|
|
|
|
Debug.cpp \
|
|
|
|
FileMap.cpp \
|
2010-02-12 02:30:52 +01:00
|
|
|
Flattenable.cpp \
|
2011-06-29 02:43:30 +02:00
|
|
|
LinearTransform.cpp \
|
2010-06-01 19:34:29 +02:00
|
|
|
ObbFile.cpp \
|
2010-11-30 02:37:49 +01:00
|
|
|
PropertyMap.cpp \
|
2009-03-04 04:31:44 +01:00
|
|
|
RefBase.cpp \
|
|
|
|
ResourceTypes.cpp \
|
|
|
|
SharedBuffer.cpp \
|
|
|
|
Static.cpp \
|
|
|
|
StopWatch.cpp \
|
2010-07-26 20:24:18 +02:00
|
|
|
StreamingZipInflater.cpp \
|
2009-03-04 04:31:44 +01:00
|
|
|
String8.cpp \
|
|
|
|
String16.cpp \
|
2009-06-05 10:26:23 +02:00
|
|
|
StringArray.cpp \
|
2009-03-04 04:31:44 +01:00
|
|
|
SystemClock.cpp \
|
|
|
|
TextOutput.cpp \
|
|
|
|
Threads.cpp \
|
|
|
|
Timers.cpp \
|
2010-11-11 01:03:06 +01:00
|
|
|
Tokenizer.cpp \
|
2010-11-09 23:37:23 +01:00
|
|
|
Unicode.cpp \
|
2009-03-04 04:31:44 +01:00
|
|
|
VectorImpl.cpp \
|
2010-06-14 05:21:19 +02:00
|
|
|
ZipFileCRO.cpp \
|
2009-03-04 04:31:44 +01:00
|
|
|
ZipFileRO.cpp \
|
|
|
|
ZipUtils.cpp \
|
2009-06-06 00:11:23 +02:00
|
|
|
misc.cpp
|
2009-03-04 04:31:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
# For the host
|
|
|
|
# =====================================================
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2009-06-05 23:56:35 +02:00
|
|
|
LOCAL_SRC_FILES:= $(commonSources)
|
2009-03-04 04:31:44 +01:00
|
|
|
|
|
|
|
LOCAL_MODULE:= libutils
|
|
|
|
|
|
|
|
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
|
|
|
|
LOCAL_C_INCLUDES += external/zlib
|
|
|
|
|
|
|
|
ifeq ($(HOST_OS),windows)
|
|
|
|
ifeq ($(strip $(USE_CYGWIN),),)
|
|
|
|
# Under MinGW, ctype.h doesn't need multi-byte support
|
|
|
|
LOCAL_CFLAGS += -DMB_CUR_MAX=1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2011-10-20 07:35:56 +02:00
|
|
|
ifeq ($(TARGET_OS),linux)
|
|
|
|
LOCAL_LDLIBS += -lrt -ldl
|
|
|
|
endif
|
|
|
|
|
2009-03-04 04:31:44 +01:00
|
|
|
include $(BUILD_HOST_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# For the device
|
|
|
|
# =====================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
|
|
|
|
# we have the common sources, plus some device-specific stuff
|
|
|
|
LOCAL_SRC_FILES:= \
|
|
|
|
$(commonSources) \
|
2010-06-14 05:21:19 +02:00
|
|
|
BackupData.cpp \
|
|
|
|
BackupHelpers.cpp \
|
2010-09-14 08:17:30 +02:00
|
|
|
Looper.cpp
|
2009-03-04 04:31:44 +01:00
|
|
|
|
|
|
|
ifeq ($(TARGET_OS),linux)
|
|
|
|
LOCAL_LDLIBS += -lrt -ldl
|
|
|
|
endif
|
|
|
|
|
|
|
|
LOCAL_C_INCLUDES += \
|
|
|
|
external/zlib \
|
|
|
|
external/icu4c/common
|
2009-07-13 08:11:20 +02:00
|
|
|
|
2009-03-04 04:31:44 +01:00
|
|
|
LOCAL_LDLIBS += -lpthread
|
|
|
|
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
|
|
libz \
|
|
|
|
liblog \
|
2011-09-29 02:33:11 +02:00
|
|
|
libcutils \
|
2011-10-20 05:32:43 +02:00
|
|
|
libdl \
|
|
|
|
libcorkscrew
|
2009-03-04 04:31:44 +01:00
|
|
|
|
|
|
|
LOCAL_MODULE:= libutils
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
|
2010-05-06 09:55:09 +02:00
|
|
|
ifeq ($(TARGET_OS),linux)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_C_INCLUDES += external/zlib external/icu4c/common
|
|
|
|
LOCAL_LDLIBS := -lrt -ldl -lpthread
|
|
|
|
LOCAL_MODULE := libutils
|
|
|
|
LOCAL_SRC_FILES := $(commonSources) BackupData.cpp BackupHelpers.cpp
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
endif
|
2010-07-01 01:10:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Include subdirectory makefiles
|
|
|
|
# ============================================================
|
|
|
|
|
|
|
|
# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
|
|
|
|
# team really wants is to build the stuff defined by this makefile.
|
|
|
|
ifeq (,$(ONE_SHOT_MAKEFILE))
|
|
|
|
include $(call first-makefiles-under,$(LOCAL_PATH))
|
2010-07-26 20:24:18 +02:00
|
|
|
endif
|