blob: 5dfbc06efd8f323abc5354a3c8f84ee47b5a7e17 [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001#
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 \
Mark Salyzyn6c1b07f2013-11-22 10:50:27 -080038 log_read.c \
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080039 event_tag_map.c
Colin Cross9227bd32013-07-23 16:59:20 -070040else
41 liblog_sources += \
42 uio.c
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080043endif
44
45liblog_host_sources := $(liblog_sources) fake_log_device.c
46
Andrew Hsieh99e7f7a2012-03-01 23:58:50 -080047
Elliott Hughesf82e7412011-07-13 17:37:07 -070048# Shared and static library for host
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080049# ========================================================
50LOCAL_MODULE := liblog
51LOCAL_SRC_FILES := $(liblog_host_sources)
52LOCAL_LDLIBS := -lpthread
53LOCAL_CFLAGS := -DFAKE_LOG_DEVICE=1
54include $(BUILD_HOST_STATIC_LIBRARY)
55
Elliott Hughesf82e7412011-07-13 17:37:07 -070056include $(CLEAR_VARS)
57LOCAL_MODULE := liblog
58LOCAL_WHOLE_STATIC_LIBRARIES := liblog
59include $(BUILD_HOST_SHARED_LIBRARY)
60
Andrew Hsieh99e7f7a2012-03-01 23:58:50 -080061
62# Static library for host, 64-bit
63# ========================================================
64include $(CLEAR_VARS)
65LOCAL_MODULE := lib64log
66LOCAL_SRC_FILES := $(liblog_host_sources)
67LOCAL_LDLIBS := -lpthread
68LOCAL_CFLAGS := -DFAKE_LOG_DEVICE=1 -m64
69include $(BUILD_HOST_STATIC_LIBRARY)
70
71
Jeff Brown29e1e732011-07-11 22:12:32 -070072# Shared and static library for target
73# ========================================================
74include $(CLEAR_VARS)
75LOCAL_MODULE := liblog
76LOCAL_SRC_FILES := $(liblog_sources)
77include $(BUILD_STATIC_LIBRARY)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080078
Jeff Brown29e1e732011-07-11 22:12:32 -070079include $(CLEAR_VARS)
80LOCAL_MODULE := liblog
81LOCAL_WHOLE_STATIC_LIBRARIES := liblog
82include $(BUILD_SHARED_LIBRARY)