Android.mk revision 4f6e8d7a00cbeda1e70cc15be9c4af1018bdad53
1# 2# Copyright (C) 2008 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16LOCAL_PATH := $(my-dir) 17include $(CLEAR_VARS) 18 19commonSources := \ 20 array.c \ 21 hashmap.c \ 22 atomic.c \ 23 buffer.c \ 24 socket_inaddr_any_server.c \ 25 socket_local_client.c \ 26 socket_local_server.c \ 27 socket_loopback_client.c \ 28 socket_loopback_server.c \ 29 socket_network_client.c \ 30 config_utils.c \ 31 cpu_info.c \ 32 load_file.c \ 33 strdup16to8.c \ 34 strdup8to16.c \ 35 record_stream.c \ 36 process_name.c \ 37 properties.c \ 38 threads.c 39 40# some files must not be compiled when building against Mingw 41# they correspond to features not used by our host development tools 42# which are also hard or even impossible to port to native Win32 43WITH_MINGW := 44ifeq ($(HOST_OS),windows) 45 ifeq ($(strip $(USE_CYGWIN)),) 46 WITH_MINGW := 1 47 endif 48endif 49# USE_MINGW is defined when we build against Mingw on Linux 50ifneq ($(strip $(USE_MINGW)),) 51 WITH_MINGW := 1 52endif 53 54ifeq ($(WITH_MINGW),1) 55 commonSources += \ 56 uio.c 57else 58 commonSources += \ 59 mspace.c \ 60 selector.c \ 61 fdevent.c \ 62 tztime.c \ 63 adb_networking.c \ 64 zygote.c 65endif 66 67 68# Static library for host 69# ======================================================== 70LOCAL_MODULE := libcutils 71LOCAL_SRC_FILES := $(commonSources) ashmem-host.c 72LOCAL_LDLIBS := -lpthread 73LOCAL_STATIC_LIBRARIES := liblog 74include $(BUILD_HOST_STATIC_LIBRARY) 75 76 77ifeq ($(TARGET_SIMULATOR),true) 78 79# Shared library for simulator 80# ======================================================== 81include $(CLEAR_VARS) 82LOCAL_MODULE := libcutils 83LOCAL_SRC_FILES := $(commonSources) memory.c dlmalloc_stubs.c ashmem-host.c 84LOCAL_LDLIBS := -lpthread 85LOCAL_SHARED_LIBRARIES := liblog 86include $(BUILD_SHARED_LIBRARY) 87 88else #!sim 89 90# Shared and static library for target 91# ======================================================== 92include $(CLEAR_VARS) 93LOCAL_MODULE := libcutils 94LOCAL_SRC_FILES := $(commonSources) memset32.S atomic-android-arm.S mq.c \ 95 ashmem-dev.c 96LOCAL_C_INCLUDES := $(KERNEL_HEADERS) 97LOCAL_STATIC_LIBRARIES := liblog 98include $(BUILD_STATIC_LIBRARY) 99 100include $(CLEAR_VARS) 101LOCAL_MODULE := libcutils 102LOCAL_WHOLE_STATIC_LIBRARIES := libcutils 103LOCAL_SHARED_LIBRARIES := liblog 104include $(BUILD_SHARED_LIBRARY) 105 106endif #!sim 107