Android.mk revision 5feea6890875c9046f40bdadc0dbd4a411e7f3f5
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 19liblog_sources := logd_write.c 20 21# some files must not be compiled when building against Mingw 22# they correspond to features not used by our host development tools 23# which are also hard or even impossible to port to native Win32 24WITH_MINGW := 25ifeq ($(HOST_OS),windows) 26 ifeq ($(strip $(USE_CYGWIN)),) 27 WITH_MINGW := true 28 endif 29endif 30# USE_MINGW is defined when we build against Mingw on Linux 31ifneq ($(strip $(USE_MINGW)),) 32 WITH_MINGW := true 33endif 34 35ifndef WITH_MINGW 36 liblog_sources += \ 37 logprint.c \ 38 event_tag_map.c 39ifneq ($(HOST_OS),darwin) 40 liblog_sources += \ 41 log_read.c 42endif 43else 44 liblog_sources += \ 45 uio.c 46endif 47 48liblog_host_sources := $(liblog_sources) fake_log_device.c 49 50 51# Shared and static library for host 52# ======================================================== 53LOCAL_MODULE := liblog 54LOCAL_SRC_FILES := $(liblog_host_sources) 55LOCAL_LDLIBS := -lpthread 56LOCAL_CFLAGS := -DFAKE_LOG_DEVICE=1 57include $(BUILD_HOST_STATIC_LIBRARY) 58 59include $(CLEAR_VARS) 60LOCAL_MODULE := liblog 61LOCAL_WHOLE_STATIC_LIBRARIES := liblog 62include $(BUILD_HOST_SHARED_LIBRARY) 63 64 65# Static library for host, 64-bit 66# ======================================================== 67include $(CLEAR_VARS) 68LOCAL_MODULE := lib64log 69LOCAL_SRC_FILES := $(liblog_host_sources) 70LOCAL_LDLIBS := -lpthread 71LOCAL_CFLAGS := -DFAKE_LOG_DEVICE=1 -m64 72include $(BUILD_HOST_STATIC_LIBRARY) 73 74 75# Shared and static library for target 76# ======================================================== 77include $(CLEAR_VARS) 78LOCAL_MODULE := liblog 79LOCAL_SRC_FILES := $(liblog_sources) 80include $(BUILD_STATIC_LIBRARY) 81 82include $(CLEAR_VARS) 83LOCAL_MODULE := liblog 84LOCAL_WHOLE_STATIC_LIBRARIES := liblog 85include $(BUILD_SHARED_LIBRARY) 86 87include $(call first-makefiles-under,$(LOCAL_PATH)) 88